Extension:InputBox

The InputBox extension is a MediaWiki extension by Erik Möller to add predefined HTML forms to wiki pages. It was originally created for the purpose of adding a Create an article box to Wikinews. It requires at least MediaWiki 1.5 and an extensions script (see below).

Installation

 * 1) Download and save the files InputBox.php and InputBox.i18n.php and  and  to the extensions/InputBox/ folder of your MediaWiki installation. The most recent version of InputBox.php may not work on older MediaWiki installations. Version 1.17 works for MediaWiki 1.6.8.

You can as well check out from the subversion repository directly to the $IP/extensions/ folder, if you so wish:
 * 1) Open and edit the LocalSettings.php file by adding the following line near the bottom:

Example
This kind was found on the main page of a Wikipedia. It could be used for starting new articles, since it doesn’t go to the edit box of articles that already exist.

General syntax
InputBoxes are constructed like this:

The type parameter is mandatory. All other parameters are optional.

Parameters
Applying create &#160;to an existing page simply gives the edit page. In that case preload is ignored. Applying comment &#160;for a new page works.

The texts taken from the MediaWiki: namespace are of course only examples, any existing page can be used for editintro</tt> or preload</tt>. Unfortunately preload</tt> does not yet work for the Special:Upload summary.

Please note that variables, templates, parser functions and template parameters are not supported in InputBox parameters.

Alignment enhancement
I found that there was a need to define alignment each time I use an input box. I could have just removed the div</tt> tag from the input box HTML and specified the div</tt> when posting the InputBox. Instead I added a parameter that allows you to define the align in the code.

To use this, get an updated copy of the code here then you can specify align=left</tt>, align=center</tt>, or align=right</tt> with the other parameters.

I hope you find it useful.

Known bugs

 * 5210 – and tags are not respected from a preloaded template.
 * 5216 – Use more flexible CSS instead of bgcolor attribute for InputBox bgcolor option.
 * 13262 – New Talk Page Option.
 * 11777 – Multiple InputBoxes make page invalid due to repetitive similar id
 * 6640 – Prefix option for InputBox.
 * 5067 – InputBox background should be transparent by default
 * 5552 – add a fulltext-only search mode to InputBox
 * 13909 – Trying to 'indent' an input box breaks the formatting on the rest of the page.
 * 13834 – Too much formatting!