Help:Inputbox

From WikiLou
Jump to: navigation, search

Using the Inputbox extension puts an input box on any page upon which it is used. See below for usage. This extension is fairly awkward, and should probably not be used much.

General Syntax

Inputboxes are constructed like this:

 <inputbox>
 type=box type
 parameter1=value
 parameter2=value
 </inputbox>

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

Box Types

Type Example
type=search

<inputbox> type=search </inputbox>

Generates a search box with a default width of 50 characters. The text field specifies the search criteria.
type=create

<inputbox> type=create </inputbox>

Allows creating a new page. The text field specifies which page is to be edited.
type=comment

<inputbox> type=comment </inputbox>

Add one or more sections to an existing page, or create a page, with an edit summary that is automatically the same as the (first) new section header. The text field specifies which page is to be edited.

Parameters

Parameter
Scope
Example
bgcolor=
All types
 
Sets the table background color (HTML color values). Do not use quotes.
<inputbox>
type=search
bgcolor=#eeeeff
</inputbox>

<inputbox> type=search bgcolor=#eeeeff </inputbox>

width=
All types
 
Sets the width of the inputbox in characters.
<inputbox>
type=create
width=24
</inputbox>

<inputbox> type=create width=24 </inputbox>

default=
All types
 
Default text to put in the inputbox.
<inputbox>
type=comment
default=User talk:Eloquence
</inputbox>

<inputbox> type=comment default=User talk:Eloquence </inputbox>

preload=
comment, create
 
The page under this title will be preloaded (see below) into the blank editbox when a new page is created.
<inputbox>
type=create
preload=MediaWiki:Editthispage
</inputbox>

<inputbox> type=create preload=MediaWiki:Editthispage </inputbox>

Enter the title of a non-existent page in the example inputbox above or below, and click "Create article" or "Post a comment" respectively to test this effect.
editintro=
comment, create
 
The text of the page under this title will be added, as instructions, before the submission form for new pages.
<inputbox>
type=comment
editintro=MediaWiki:Missingcommenttext
</inputbox>

<inputbox> type=comment editintro=Mediawiki:Missingcommenttext </inputbox>

buttonlabel=
All types
 
This label will be used for the main button of the form.
<inputbox>
type=comment
buttonlabel=Add new rumor
</inputbox>

<inputbox> type=comment buttonlabel=Add new rumor </inputbox>

searchbuttonlabel=
search
 
This label will be used for the "Search full text" button of the search form.
<inputbox>
type=search
searchbuttonlabel=Dig deeper
</inputbox>

<inputbox> type=search searchbuttonlabel=Dig deeper </inputbox>

break=
All types
 
Whether or not to insert a line break between the input box and the button(s). Defaults to using the line break unless set to no.
<inputbox>
type=create
width=24
break=no
</inputbox>

<inputbox> type=create width=24 break=no </inputbox>

Applying create  to an existing page simply gives the edit page. In that case editintro and preload are ignored. Applying comment  for a new page works, if the page already exists editintro is ignored.

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 and templates are not supported in inputbox parameters.


WikiLou Help Pages
IntroductionStarting a New PageTablesLinksCategoriesImagesVideoTemplatesInputboxVariablesCalendarsRevertingStubsUser PagesNPOVPolicyGuidelinesFAQUserboxes