Help:Inputbox: Difference between revisions

From Pikmin Fanon
No edit summary
No edit summary
Line 2: Line 2:
An '''inputbox''' allows you to put a box on any page, which has a text field for users to fill and a customizable button for launching the action.
An '''inputbox''' allows you to put a box on any page, which has a text field for users to fill and a customizable button for launching the action.


There are three types: the '''article creation box''', the '''search box''', and the '''comment box'''.  The default width for all boxes is 50 characters.
There are three types: the '''create box''', the '''search box''', and the '''comment box'''.  The default width for all boxes is 50 characters.


== How do I add an article creation box to a page? ==
== How do I add a create box to a page? ==


An article creation box places a box on the page that lets the user create a new page by entering the page title. A new page will be opened at the title the user types in. Page creation is handled by the InputBox extension.
A create box places a box on the page that lets the user create a new page by entering the page title. A new page will be opened at the title the user types in.


To change the text on all Create buttons on this site, edit the [[Help:MediaWiki namespace|MediaWiki message]] "[[MediaWiki:Create]]".  
To change the text on all Create buttons on this site, edit the [[Help:MediaWiki namespace|MediaWiki message]] "[[MediaWiki:Create]]".  
Line 52: Line 52:
== How do I add a comment box to a page? ==
== How do I add a comment box to a page? ==


This box adds a section to an existing page -- this can be helpful in adding a new discussion to a talk page, or new items to a news page.   
A comment box adds a section to an existing page -- this can be helpful in adding a new discussion to a talk page, or new items to a news page.   


The text typed in the box is the page where to start a new section header. If you use as type ''commenttitle'' instead of ''comment'', the text typed in the box becomes the new section header, and is also used as the [[help:edit summary|edit summary]] for the addition. In this case, you additionally need to define a pagename with the ''page'' parameter.
The text typed in the box is the page where to start a new section header. If you use as type ''commenttitle'' instead of ''comment'', the text typed in the box becomes the new section header, and is also used as the [[help:edit summary|edit summary]] for the addition. In this case, you additionally need to define a pagename with the ''page'' parameter.
Line 128: Line 128:
|}
|}


== Using preloaded templates with an article creation box ==
== Using preloaded templates with a create box ==


: ''See [[Help:Preloaded template|Help:Preloaded templates]] for more detail''
: ''See [[Help:Preloaded template|Help:Preloaded templates]] for more detail''
Line 170: Line 170:
You can also create links that make use of the inputbox feature without inserting the box itself onto a page.
You can also create links that make use of the inputbox feature without inserting the box itself onto a page.


For example, http://fanon.pikminwiki.com/index.php?title=Test_Page&preload=Events&action=edit will open a new page at "Test Page" and preload it with the text from the "Events" page.
For example, http://www.pikminfanon.com/index.php?title=Test_Page&preload=Events&action=edit will open a new page at "Test Page" and preload it with the text from the "Events" page.


You can also open a new page for editing with a custom message at the top. For example, http://fanon.pikminwiki.com/index.php?title=Test_Page&editintro=Template:Policies&action=edit will load a blank page, with the "Template:Policies" displayed above the editing box.
You can also open a new page for editing with a custom message at the top. For example, http://www.pikminfanon.com/index.php?title=Test_Page&editintro=Template:Policies&action=edit will load a blank page, with the "Template:Policies" displayed above the editing box.


You can combine these two, to give a page that opens with the "Template:Policies" message at the top, and the content of "Events" loaded into the edit box. http://fanon.pikminwiki.com/index.php?title=Test_Page&preload=Events&action=edit&editintro=Template:Policies
You can combine these two, to give a page that opens with the "Template:Policies" message at the top, and the content of "Events" loaded into the edit box. http://www.pikminfanon.com/index.php?title=Test_Page&preload=Events&action=edit&editintro=Template:Policies


See [[Help:Preloaded template|Help:Preloaded templates]] for more information.
See [[Help:Preloaded template|Help:Preloaded templates]] for more information.

Revision as of 04:31, 13 August 2016

Pikilogo.png
This is one of Pikmin Fanon's help pages and is meant to aid users by improving their ability to positively contribute to the wiki. Expanding pages such as this with additional information is always welcome.
Pikilogo.png

An inputbox allows you to put a box on any page, which has a text field for users to fill and a customizable button for launching the action.

There are three types: the create box, the search box, and the comment box. The default width for all boxes is 50 characters.

How do I add a create box to a page?

A create box places a box on the page that lets the user create a new page by entering the page title. A new page will be opened at the title the user types in.

To change the text on all Create buttons on this site, edit the MediaWiki message "MediaWiki:Create".

Type this: To make this:
<inputbox>
type=create
</inputbox>

How do I add a search box to a page?

A search box provides an extra box for users to search Pikmin Fanon, in addition to the one in the sidebar.

To change the text on all Search buttons on your site, edit the MediaWiki messages "MediaWiki:Tryexact" and "MediaWiki:Searchfulltext" on this wiki.

Type this: To make this:
<inputbox>
type=search
</inputbox>

How do I add a comment box to a page?

A comment box adds a section to an existing page -- this can be helpful in adding a new discussion to a talk page, or new items to a news page.

The text typed in the box is the page where to start a new section header. If you use as type commenttitle instead of comment, the text typed in the box becomes the new section header, and is also used as the edit summary for the addition. In this case, you additionally need to define a pagename with the page parameter.

Type this: To make this:
<inputbox>
type=comment
</inputbox>

To change the text on all Comment buttons on your site, edit the MediaWiki message "MediaWiki:Postcomment" on Pikmin Fanon.

How can I customize the inputboxes?

There are several parameters you can use to customize the display of the inputboxes.

Background color:

bgcolor=#FFFFFF
Sets the background color using HTML color values. Do not use quotes. Make this the same as the page color to make the background disappear.

Width:

width=##
Sets width of input field, where ## is a number of characters. (The default is 50.)

Default text:

default=any text
Default text to put in the inputbox, such as "enter page title here"

Button label:

buttonlabel=any text
This label will be used for the main button of the form.

Search button label:

searchbuttonlabel=any text
This label will be used for the "Search full text" button of the search form.

Line break:

break=no
Removes the default line break between the input box and the button(s), displaying them side by side. This is the default for the create box and changed with break=yes.
Type this: To make this:
<inputbox>
type=create
bgcolor=#C0C0C0
width=15
default=Type here!
buttonlabel=Click here!
</inputbox>

Using preloaded templates with a create box

See Help:Preloaded templates for more detail

If you want to use a standard article template, you can specify this in the form.

Preloaded text: preload=pagename For comment and create boxes, the text of the page under pagename will be preloaded (see below) into the blank editbox when a new page is created.

Example: By specifying "preload=Template:New_page", the content of "Template:New page" will be loaded into the edit box for the new article.

Edit introduction: editintro=pagename For comment and create boxes, the text of the page under pagename will be added, as instructions, before the submission form for new pages. It is displayed instead of the text of MediaWiki:Newarticletext

Example: By specifying "editintro=Template:Welcome", the content of Template:Welcome will be shown above the article.
Type this: To make this:
<inputbox>
type=create
preload=Template:New_page
editintro=Template:Welcome
width=25
</inputbox>

Article creation links

You can also create links that make use of the inputbox feature without inserting the box itself onto a page.

For example, http://www.pikminfanon.com/index.php?title=Test_Page&preload=Events&action=edit will open a new page at "Test Page" and preload it with the text from the "Events" page.

You can also open a new page for editing with a custom message at the top. For example, http://www.pikminfanon.com/index.php?title=Test_Page&editintro=Template:Policies&action=edit will load a blank page, with the "Template:Policies" displayed above the editing box.

You can combine these two, to give a page that opens with the "Template:Policies" message at the top, and the content of "Events" loaded into the edit box. http://www.pikminfanon.com/index.php?title=Test_Page&preload=Events&action=edit&editintro=Template:Policies

See Help:Preloaded templates for more information.

See also