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).

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 or preload. Unfortunately preload 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.

Preload
Preloading can be done with an inputbox (see above), but also with a URL like which links to the edit box of a new page, preloaded with.

The wikitext of the preloaded page, including noinclude parts, tags and includeonly tags, is loaded into the editbox if the target page does not exist yet. If the target of the preload operation already exists then only its wikitext is loaded, the preload command is ignored.

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 tag from the input box html and specified the div 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, align=center, or align=right with the other parameters.

I hope you find it useful.

Installation
require_once(&quot;$IP/extensions/inputbox.php&quot;); NOTE: Make sure that it is still above the closing php tag so that it looks like this: require_once(&quot;$IP/extensions/inputbox.php&quot;); ?>
 * 1) Download and save the files inputbox.php and InputBox.i18n.php to the extensions folder of your MediaWiki installation.
 * 2) Open and edit the LocalSettings.php file by adding the following line near the bottom:

Example
type=search width=42 buttonlabel=Go searchbuttonlabel=Search break=no 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.