Difference between revisions of "Reference:InputBox"
(→Configuration Possibilities for InputBox) |
With InputBox you can integrate HTML forms into wiki pages.
Contents
What kind of InputBoxes can be created?[edit | edit source]
Typ | Ergebnis | Beschreibung |
---|---|---|
type=search |
|
Creates a search box which has a default width of 50 characters. Information added in the text box is searched for. |
type=search2 |
For type=search2 the default location for the search button is to the right. Currently, it does not seem to be possible to add other parameters to this type of input box. This search box searches the entire wiki that it is placed on. |
|
type=create |
|
Creates a new page. Information added in the text box is the name of the page which is edited. |
type=comment |
|
Adds a new section to the bottom of the page specified in the text box. |
type=commenttitle |
|
Adds a new section with the section header typed into the text box. The title can be specified with default= parameter. The page has to be specified with page= parameter. |
type=fulltext |
|
Search only with the fulltext search button, without the 'Go' button. |
type=move |
|
Move (rename) a page to a different name. |
Sample Code as Template[edit | edit source]
For using the InputBox, please insert the following code into the content field of the wiki article:
<inputbox> type= placeholder= bgcolor= width= preload= editintro= buttonlabel= hidden= searchbuttonlabel= break= namespaces= prefix= </inputbox>
Configuration Possibilities for InputBox[edit | edit source]
Parameter Typ |
Type Beschreibung |
Description |
bgcolor= |
All types |
Sets the table background color (HTML color values, e.g. #eeeeff) |
width= |
All types |
Sets the width of the InputBox in characters. |
default= |
All types |
Default text to put in the InputBox (displayed in grey |
preload= |
create, comment, commentitle |
The page under this title will be preloaded into the blank editbox when a new page is created. |
editintro= |
create, comment |
The page which is given under this parameter will be shown, as instructions, above the editing window. |
buttonlabel= |
All types |
This label will be used for the main button of the form. |
hidden= |
create, comment |
This specifies that there is no InputBox. It is used with parameter "default", now not being a default, but the fixed value of the name of the page. |
searchbuttonlabel= |
search, fulltext |
This label will be used for the "Search full text" button of the search form. |
fulltextbutton= |
search2 |
Show the full text search button on search2 form |
break= |
All types |
Whether or not to insert a line break between the input box and the button(s). Defaults to yes (use a line break). |
labeltext= |
search2 |
Text to print beside the button |
namespaces= |
search, fulltext |
Support for namespace checkboxes in fulltext search.
With " |
prefix= |
search, fulltext, create |
Remark: underscores aren't recognized as spaces. |
placeholder= |
All types |
Define placeholder text that will display in the input box when it is empty. |
page= |
comment, move |
Page to posts comment to, or page to move |
minor= |
comment, move |
Minor edit. |
nosummary= |
comment |
Edit summary (headline) not required for new comment. |
summary= |
comment, move, create |
Edit summary or move reason. |
id= |
All types | id attribute for<form></form>. |
inline= |
search2 |
Make the InputBox be an inline element (no line break at beginning). |
dir= |
All types |
Right to left (rtl) or left to right (ltr). Defaults to directionality of the page's language. |
preloadparams[]= |
create, comment, commentitle |
Specify parameters to the preload text. |
Related Links[edit | edit source]
With InputBox you can integrate HTML forms into wiki pages. ==What kind of InputBoxes can be created?== {| class="wikitable contenttable" |- !|Typ !|Ergebnis !|Beschreibung |- ||type=search ||<inputbox> type=create </inputbox> ||Creates a search box which has a default width of 50 characters. Information added in the text box is searched for. |- ||type=search2 ||<inputbox> type=search2 </inputbox> || For type=search2 the default location for the search button is to the right. Currently, it does not seem to be possible to add other parameters to this type of input box. This search box searches the entire wiki that it is placed on. |- ||type=create ||<inputbox> type=create </inputbox> ||Creates a new page. Information added in the text box is the name of the page which is edited. |- ||type=comment ||<inputbox> type=comment </inputbox> ||Adds a new section to the bottom of the page specified in the text box. |- ||type=commenttitle ||<inputbox> type=commenttitle </inputbox> ||Adds a new section with the section header typed into the text box. The title can be specified with <code>default=</code> parameter. The page has to be specified with <code>page=</code> parameter. |- ||type=fulltext ||<inputbox> type=fulltext </inputbox> ||Search only with the fulltext search button, without the 'Go' button. |- ||type=move ||<inputbox> type=move </inputbox> ||Move (rename) a page to a different name. |} ==Sample Code as Template== For using the InputBox, please insert the following code into the content field of the wiki article: <pre><inputbox> type= placeholder= bgcolor= width= preload= editintro= buttonlabel= hidden= searchbuttonlabel= break= namespaces= prefix= </inputbox> </pre> ==Configuration Possibilities for InputBox== {| class="wikitable contenttable" |- | style="border: 1px solid #ebecec;"| '''Parameter''' | style="border: 1px solid #ebecec;"| TypType | style="border: 1px solid #ebecec;"| BeschreibungDescription |- | style="border: 1px solid #ebecec;"| '''bgcolor=''' | style="border: 1px solid #ebecec;"| All types | style="border: 1px solid #ebecec;"| Sets the table background color (HTML color values, e.g. #eeeeff) |- | style="border: 1px solid #ebecec;"| '''width=''' | style="border: 1px solid #ebecec;"| All types | style="border: 1px solid #ebecec;"| Sets the width of the InputBox in characters. |- | style="border: 1px solid #ebecec;"| '''default=''' | style="border: 1px solid #ebecec;"| All types | style="border: 1px solid #ebecec;"| Default text to put in the InputBox (displayed in grey |- | style="border: 1px solid #ebecec;"| '''preload=''' | style="border: 1px solid #ebecec;"|create, comment, commentitle | style="border: 1px solid #ebecec;"| The page under this title will be preloaded into the blank editbox when a new page is created. |- | style="border: 1px solid #ebecec;"| '''editintro=''' | style="border: 1px solid #ebecec;"| create, comment | style="border: 1px solid #ebecec;"| The page which is given under this parameter will be shown, as instructions, ''above'' the editing window. |- | style="border: 1px solid #ebecec;"| '''buttonlabel=''' | style="border: 1px solid #ebecec;"| All types | style="border: 1px solid #ebecec;"| This label will be used for the main button of the form. |- | style="border: 1px solid #ebecec;"| '''hidden=''' | style="border: 1px solid #ebecec;"| create, comment | style="border: 1px solid #ebecec;"| This specifies that there is no InputBox. It is used with parameter "default", now not being a default, but the fixed value of the name of the page. |- | style="border: 1px solid #ebecec;"| '''searchbuttonlabel=''' | style="border: 1px solid #ebecec;"| search, fulltext | style="border: 1px solid #ebecec;"| This label will be used for the "Search full text" button of the search form. |- | style="border: 1px solid #ebecec;"| '''fulltextbutton=''' | style="border: 1px solid #ebecec;"| search2 | style="border: 1px solid #ebecec;"| Show the full text search button on search2 form |- | style="border: 1px solid #ebecec;"| '''break=''' | style="border: 1px solid #ebecec;"| All types | style="border: 1px solid #ebecec;"| Whether or not to insert a line break between the input box and the button(s). Defaults to '''yes''' (use a line break). |- | style="border: 1px solid #ebecec;"| '''labeltext=''' | style="border: 1px solid #ebecec;"| search2 | style="border: 1px solid #ebecec;"| Text to print beside the button |- | style="border: 1px solid #ebecec;"| '''namespaces=''' | style="border: 1px solid #ebecec;"| search, fulltext | style="border: 1px solid #ebecec;"| Support for namespace checkboxes in fulltext search. With "<code>Main'''**'''</code>", main article namespace is checked by default. |- | style="border: 1px solid #ebecec;"| '''prefix=''' | style="border: 1px solid #ebecec;"| search, fulltext, create | style="border: 1px solid #ebecec;"| * Narrow down search to pages beginning with certain prefix. Note this only works with certain search back-ends, currently only latest [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:lucene-search Extension:lucene-search]. Defaults to empty string (search all pages). * Create new page beginning with a certain prefix. * In type=move, the prefix is prepended to the default parameter. Remark: underscores aren't recognized as spaces. |- | style="border: 1px solid #ebecec;"| '''placeholder=''' | style="border: 1px solid #ebecec;"| All types | style="border: 1px solid #ebecec;"| Define placeholder text that will display in the input box when it is empty. |- | style="border: 1px solid #ebecec;"| '''page=''' | style="border: 1px solid #ebecec;"| comment, move | style="border: 1px solid #ebecec;"| Page to posts comment to, or page to move |- | style="border: 1px solid #ebecec;"| '''minor=''' | style="border: 1px solid #ebecec;"| comment, move | style="border: 1px solid #ebecec;"| Minor edit. |- | style="border: 1px solid #ebecec;"| '''nosummary=''' | style="border: 1px solid #ebecec;"|comment | style="border: 1px solid #ebecec;"| Edit summary (headline) not required for new comment. |- | style="border: 1px solid #ebecec;"| '''summary=''' | style="border: 1px solid #ebecec;"|comment, move, create | style="border: 1px solid #ebecec;"| Edit summary or move reason. |- | style="border: 1px solid #ebecec;"| '''id=''' | style="border: 1px solid #ebecec;"|All types | style="border: 1px solid #ebecec;"|id attribute for<form></form>. |- | style="border: 1px solid #ebecec;"| '''inline=''' | style="border: 1px solid #ebecec;"|search2 | style="border: 1px solid #ebecec;"| Make the InputBox be an inline element (no line break at beginning). |- | style="border: 1px solid #ebecec;"| '''dir=''' | style="border: 1px solid #ebecec;"|All types | style="border: 1px solid #ebecec;"| Right to left (rtl) or left to right (ltr). Defaults to directionality of the page's language. |- | style="border: 1px solid #ebecec;"| '''preloadparams[]=''' | style="border: 1px solid #ebecec;"|create, comment, commentitle | style="border: 1px solid #ebecec;"| Specify parameters to the preload text. |} ==Related Links== * [http://www.mediawiki.org/wiki/Extension:InputBox Documentation at mediawiki.org] [[en:{{FULLPAGENAME}}]][[de:InputBox]]
Line 81: | Line 81: | ||
| style="border: 1px solid #ebecec;"| | | style="border: 1px solid #ebecec;"| | ||
− | + | Type | |
| style="border: 1px solid #ebecec;"| | | style="border: 1px solid #ebecec;"| | ||
− | + | Description | |
|- | |- |