|This extension stores its source code on a wiki page. Please be aware that this code may be unreviewed or maliciously altered. They may contain security holes, outdated interfaces that are no longer compatible etc.
request access to MediaWiki's code repository to address this.
Release status: beta
|Implementation||Tag, Page action|
|Description||Article creation inputbox|
|Latest version||0.91 beta (2007-03-20)|
|MediaWiki||tested on version 1.6.9, 1.6.10 & 1.11 and above|
Translate the CreateArticle extension if it is available at translatewiki.net
|Check usage and version matrix.|
What can this extension do?
CreateArticle is a derivation of the Inputbox extension by Erik Möller. This extension can be used on MediaWiki installations utilizing Inputbox with no discernable conflicts.
CreateArticle 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.
Createarticle boxes are constructed like this:
<createarticle> type=createarticle parameter1=value parameter2=value </createarticle>
The type parameter is mandatory, and at this time the only valid argument is createarticle. All other parameters are optional.
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
- br=Whether or not to insert a line break between the input box and the button. Default is yes.
- Example: br=no
- hidden=Will hide the input box which will work nontheless. Default is no.
- Example: hidden=yes
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($IP . "/extensions/CreateArticle.php" );
The sourcecode for this extension can be found here: CreateArticle/sourcecode. Note: the source code was revised on 20 Mar 2007.
This extension has been tested and works fine on MediaWiki verson 1.6.9 and 1.6.10; 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.
Note: There have been some reported problems with this extension that are not duplicable across all platforms; I am changing the status from beta to experimental until I have a chance to delve into the problems further and rewrite this extension. In the meantime, I've implemented a workaround in the sourcecode that should fix some of them.