Extension:CustomEdit

The following file shows you how to write an extension so that you can present users with a custom editing form for certain pages on your wiki. You should customize for your own needs. More information is in the comments in the file:


 * Download CustomEdit.php

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:

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.

To enable this extension place the following in LocalSettings.php:

require_once("extensions/CustomEdit.php");

This example is released to the public domain.