![]() Release status: unmaintained |
|
---|---|
Implementation | Tag |
Description | Given the name of a template page generates a form that the user can populate with values of the template's parameters; when the hit the 'create' button, generates a new page, with name of their choice, based on the parameterised template |
Author(s) | Julian Douglas St Michael Porter (julianportertalk) |
Latest version | 0.1 (2010-11-09) |
MediaWiki | 1.16.0 |
PHP | 5.3.2+ |
License | GNU General Public License 2.0 or later |
Download | Source Code README |
Tags
<makearticle> |
|
Hooks used
|
|
What can this extension do?
Say you have defined a template, Template:MyTemplate
which contains a number of parameters. Adding the following to a page:
<makearticle>
Template:MyTemplate
</makearticle>
will generate a form which lets you specify values for:
- A page name
- Each of the parameters in
Template:MyTemplate
When you click on the 'create' button you are taken to a newly created page with the specified name and based Template:MyTemplate
populated with the values you specified. So the extension provides a simple user interface for creating pages from parameterised templates.
What this means is that this extension is a more flexible version of extensions like CreateArticle, in that it can work with any template, and parses the template on the fly to determine what fields there are in it that the user needs to fill in.
Usage
<makearticle>
Template:MyTemplate
</makearticle>
Where Template:MyTemplate
is a parameterised template.
Installation
To install this extension:
- Place the downloaded file
makearticle.tar.gz
in the folder$IP/extensions
, where $IP is the configuration variable defined in LocalSettings.php that points to the root of your MediaWiki install. - Uncompress and extract the archive, resulting in the creation of a folder
$IP/extensions/makearticle
containing two files:makearticle.php
Style.css
- Add the following to LocalSettings.php :
require_once("$IP/extensions/makearticle/makearticle.php");
See also
I would like to acknowledge the authors of the following extensions, as they were extremely useful to me as a source of ideas while I was developing the extension:
- CreateArticle by Lisa Ridley, from which I took the basic approach.
- PageCSS by Ævar Arnfjörð Bjarmason, from which I took the code to inject a stylesheet into the page containing the form.