Release status: unstable
|Description||Add new namespaces from Special:Namespaces page|
|Author(s)||Carib, derived from Extension:Interwiki|
|Latest version||1.0 (2009-09-06)|
|Compatibility policy||Snapshots releases along with MediaWiki. Master is not backward compatible.|
|License||GNU General Public License 2.0 or later|
|Quarterly downloads||11 (Ranked 145th)|
|Translate the SpecialNamespaces extension if it is available at translatewiki.net|
|Issues||Open tasks · Report a bug|
The SpecialNamespaces extension allows authorized users to create and modify custom namespaces without directly editing the configuration files. It is based on Extension:Interwiki code, originally released under GPL by Stephanie Amanda Stevens. This extension requires memcached.
- Download and place the file(s) in a directory called
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'SpecialNamespaces' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
- When creating new namespaces (as opposed to mere aliases for existing namespaces), it is normally advisable that 'default' and 'canonical' both be set to 1. Custom namespaces are each numbered, with 0-15 being reserved for MediaWiki's built-in namespaces. The convention of using even numbers (n) for primary namespaces and odd (n+1) for the corresponding talk pages still applies.
- When renaming any of the existing MediaWiki namespaces (0-15), in most cases you will want the new name to be default (1) but not canonical (0). Setting both default and canonical to zero is only advisable if the name is merely an alias, used as an alternate link for something already listed.
- The extension is relying heavily on memcached to store all of the information which it initially read from the database; this may cause problems in an environment in which multiple webservers are operating with one shared memcache and database serving MediaWiki installations across multiple machines. The scalability of this extension is therefore unknown.
- This extension does not check for nor resolve existing page names that conflict with the names of new namespaces. There is a command-line utility provided as part of the base MediaWiki package that can move pages that are inaccessible due to naming conflicts:
php maintenance/namespaceDupes.php --fix
This code was intended to be a short-lived 'kludge', adapting or twisting an existing extension to fill a new task.
There was one branch ("wikidata") of MediaWiki 1.6 which included a partially-complete Special:Namespaces editor. Namespaces could simply be created, renamed or removed using a handy web interface. While some of the proposed capabilities (such as automatic moves of existing pages into the new namespaces) hadn't been implemented, Special:Namespaces did appear to have the makings of a useful tool.
A Special:Namespaces page was proposed for inclusion in core MediaWiki code from version 1.7 onward, but this never happened. While some of the code was used in OmegaWiki, the main MediaWiki package still lacks a built-in namespace editor.
As some wikis (including a few in the Uncyclopedia Babel series) were actively using Special:Namespaces (MW1.6-wikidata) in 2006, a need arose to preserve at least minimal namespaces functionality despite site upgrades to newer MediaWiki versions. As the original Special:Interwiki is GPL'ed, a modified version was hastily contrived to provide Special:Namespaces functions. This 'temporary solution' unfortunately still exists.
While the extension has been updated once (to incorporate changes made to the original Special:Interwiki), it is unsupported code and is neither created nor maintained by any of the authors of the original Special:Interwiki extension.
See also edit
- Help:Namespaces and Manual:Namespace for general info on the use of namespaces in MediaWiki.
- Extension:Interwiki, from which this code was blatantly stolen. All install requirements there, including setting privilege levels to edit the data, also apply here.
- OmegaWiki, based on MediaWiki 1.10alpha (r26222), is the successor to WikiData 1.6