Extension:InputBox

The InputBox extension is a MediaWiki extension that adds already created HTML forms to wiki pages. Users can "complete" a form (entering text, selecting menu items, etc.) by entering text into the box.

InputBox was originally created by Erik Möller for the purpose of adding a Create an article box to Wikinews. Extension:InputBox requires at least MediaWiki 1.5.

Installation
1. Create the folder InputBox in the extensions folder.

2. Download and save the files
 * InputBox.php
 * InputBox.i18n.php
 * InputBox.classes.php and
 * InputBox.hooks.php


 * ...to the extensions/InputBox/ folder of your MediaWiki installation.


 * The most recent version of InputBox.php does not work on older MediaWiki installations.

3. In LocalSettings.php add the following line with the other "require_once" lines:

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 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
An editor may find there is a need to define alignment each time they use an input box. One option is to just remove the div</tt> tag from the input box HTML and specified the div</tt> when posting the InputBox. Instead editors can add the following code which allows editors to change the alignment in the code, by installing an updated copy of the code then you can specify align=left</tt>, align=center</tt>, or align=right</tt>.

Known bugs

 * 5210 – and tags are not respected from a preloaded template.
 * 11777 – Multiple InputBoxes make page invalid due to repetitive similar id
 * 6640 – Prefix option for InputBox.
 * 13909 – Trying to 'indent' an input box breaks the formatting on the rest of the page.
 * 13834 – Too much formatting!