Extension:Uniwiki Layouts
| This extension is obsolete! You are advised against using this extension on a live site. According to one of the developers, Uniwiki extensions for MediaWiki are not maintained anymore. |
|
Uniwiki Layouts Release status: experimental |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Implementation | Page action | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | Populate newly-created pages with editable "layouts", to encourage a common structure to articles | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Author(s) | Merrick Schaefer, Mark Johnston, Evan Wheeler, Adam Mckaig (Uniwikitalk) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Last version | 0.1 (2008-07-18) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MediaWiki | 1.12.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| License | GPLv3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Download | From Subversion | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Without Uniwiki Generic Edit Page:
With Uniwiki Generic Edit Page:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Check usage and version matrix | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bugs: list open list all report | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents |
What can this extension do? [edit]
This extension allows the WikiSysop (or anyone with the "editlayouts" permission) to create pages in the "Layout" namespace, which are subsequently offered as pre-built "templates" (but not in the MediaWiki sense!) to users creating new pages. This is intended to encourage (but not force) users to use a common structure throughout the wiki.
Directives available:
- @namespace: If layout text has an @namespace restriction, if so only add the layout as a choice if we find the namespace of this page in the layout text (ex. @namespace User Main)
There are also some enhancements when running this extension alongside the Generic Edit Page extension. Before pre-filling the edit page, each section of the chosen Layout is parsed for optional "directives", which provide hints to the Generic Edit Page, slightly affecting its behavior. Currently, the following directives are available:
- @optional: The section will not be added to the new page as default, but a relevant checkbox will be added to the "sections" menu in the top-right of the Generic Editor.
- @required: The section will be added to the new page, along with a checkbox in the menu, but it will be disabled, dissuading (not preventing) the user from removing the section. The user is still able to remove the section via the "Classic Mode" of the Generic Edit Page.
- @lock-header: The section will be added to the new page, but the ==Title== will not be editable in the usual way. As above, this is not enforced in "Classic Mode".
- @lock-text: As above, but applied to the section body.
Sample Layout With Directives [edit]
This stuff only really works in conjunction with the Extension:Uniwiki_Generic_Edit_Page. == This is a Section == @lock-header This section is editable, but its title is not. == This is Another Section == @lock-header @lock-text Nothing about this section is editable! == One More Section == @optional This won't be added to the created page, but an un-checked checkbox will be added to the menu in the top-right, and this text will be inserted once it is checked.
Installation [edit]
Create a subdirectory in your extensions directory:
(we do this to make it easy to distribute all Uniwiki extensions as a bundle)
cd /your/wiki/extensions mkdir uniwiki
Download the extension and its dependencies using Subversion:
cd /your/wiki/extensions/uniwiki svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/uniwiki/Layouts
Add the following to LocalSettings.php:
require_once("$IP/extensions/uniwiki/Layouts/Layouts.php");
Configuration parameters [edit]
todo
Installing the entire Uniwiki bundle [edit]
Download all of the Uniwiki extensions using Subversion:
cd /your/wiki/extensions svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/uniwiki uniwiki
Add the following to LocalSettings.php:
# uniwiki # ======= $uw = "$IP/extensions/uniwiki"; require_once("$uw/CssHooks/CssHooks.php"); require_once("$uw/Javascript/Javascript.php"); require_once("$uw/MooTools12core/MooTools12core.php"); require_once("$uw/AutoCreateCategoryPages/AutoCreateCategoryPages.php"); require_once("$uw/GenericEditPage/GenericEditPage.php"); require_once("$uw/CatBoxAtTop/CatBoxAtTop.php"); require_once("$uw/CustomToolbar/CustomToolbar.php"); require_once("$uw/Layouts/Layouts.php"); require_once("$uw/Authors/Authors.php"); require_once("$uw/CreatePage/CreatePage.php");
Internationalizing Uniwiki extensions [edit]
The Uniwiki extensions are available in several languages already, and it is very easy to add a new language. Each extension that has interface text includes a .i18n file with the internationalized system messages. Follow the instructions here to add the new language to the file.
See also [edit]
- Sites using uniwiki extensions
- Wikimini - Encyclopedia written by children
- Appropedia
- iAIDS wiki
- Metia
- WikiMama - Photo- and Video- driven Wiki Recipes
- Other extensions from the Uniwiki bundle
