Extension:CreateArticle

What can this extension do?
This extension is a derivation of the InputBox extension by Erik Moller, which can be found here. This extension can be used on MediaWiki installations utilizing InputBox with no discernable conflicts.

This extension is used to create articles only (the search features of Inputbox have been removed); however the extension has added capabilities. You can define an article creation prefix or subpage, which will be added either before or after the title of the article specified by the user.

Usage
Createarticle boxes are constructed like this:

The type parameter is mandatory, and at this time the only valid argument is createarticle. All other parameters are optional.

Parameters
Valid arguments for CreateArticle are as follows (do not enclose arguments in quotation marks):


 * type=createarticle (this is the only valid argument, but future functionality is under development) NOTE:  this is a required parameter
 * prefix=a prefix for page creation. This will be added to the beginning of the article name created.  Good for assigning articles to namespaces.  If you are using this to create an article in a namespace, make sure you include the colon  after the namespace name.
 * Example: prefix=Custom:


 * subpage=creates an article in a subpage with this subpage indicator. This will be added to the end of the article name created.  For valid subpages, make sure you use a "/" at the beginning of the subpage name (ex:  /article)
 * Example: subpage=/article


 * width=the width of the text creation input field (defaults to 50)
 * Example: width=30


 * preload=the name of the template in the MediaWiki namespace that holds the text you wish to preload in the newly created article page
 * Example: preload=Template:Preload


 * editintro=the name of the template in the MediaWiki namespace that holds the instructions you wish to have displayed above the article creation input box
 * Example: editintro=MediaWiki:Introduction


 * default=the default text you want to show in the article creation input box
 * Example: default=Article


 * bgcolor=color you want the background display to be
 * Example: bgcolor=#eeeeff


 * buttonlabel=text you want to show in the create article button. Defaults to label stored in MediaWiki:createarticle system message which is "create article" unless it has been overridden
 * Example: buttonlabel=Create Book Report


 * align=position of create article box on the page; valid arguments are left, center, and right; defaults to center
 * Example: align=right

Installation
Copy the sourcecode (see link below), and save it as "CreateArticle.php" in your MediaWiki /extensions subdirectory.

Changes to LocalSettings.php
Add the following to your LocalSettings.php file: require_once("extensions/CreateArticle.php" );

Code
The sourcecode for this extension can be found here: CreateArticle/sourcecode. Note: the source code was revised on 20 Mar 2007.

MediaWiki Versions
This extension has been tested and works fine on MediaWiki verson 1.6.9; however since it was derived from the InputBox and Create extensions, I don't anticipate that there will be a problem using it on any extension that allows InputBox and Create.