Extension:CustomEdit
From MediaWiki.org
|
Release status: stable |
|||
|---|---|---|---|
| Description | Present custom editing forms for certain pages | ||
| Author(s) | User:Barrylb User:Flominator |
||
| Last Version | 1.1 (September 2008) | ||
| MediaWiki | 1.11 | ||
| License | GPL/GFDL | ||
| Download | /CustomEdit.php | ||
|
|||
|
check usage (experimental) |
|||
With this extension you can present users with a custom editing form for certain pages on your wiki.
[edit] Example
This example assumes you have a set of articles named Person/John_Smith, Person/John_Brown ... etc
Whenever you are editing an article named Person/*, a form is shown with fields Sex, Age, Description.
When you first create the article, the fields are put together with a template named Person, eg:
{{Person|sex=M|age=60}}My description
When you next edit the article, this form extracts the fields from the text and allows the user to edit them.
You also need to create a template called Template:Person to display the fields as you would like. For example the template could be simply be:
Age: {{{age}}}<br>
Sex: {{{sex}}}<br>
Before activating the extension you also have to register the name of the template to the page MediaWiki:CustomEditTemplates in order to activate it for CustomEdit:
* [[Template:Person]] - used to describe persons
Of course you can add more templates to this page e.g. "Person", "Car", "Room" etc.
[edit] Installation
To enable this extension place the following in LocalSettings.php:
require_once("extensions/CustomEdit.php");
[edit] History
This extension is based on this version of User:Barrylb/Custom article editing form with fields/CustomEdit.php. I'm not sure if it works with MediaWiki 1.12 without any changes, but if you implement these changes it definitely should.