Extension:HideNamespace

HideNamespace enhances MediaWiki with ability to hide namespace in page title and its header.

Usage
This extension has two main functionalities. They're both explained in the following sections.

The $wgHideNsNamespaces array
The first option is to use global variable $wgHideNsNamespaces. By specifying namespaces in the $wgHideNsNamespaces array you can hide the namespace prefix in all pages within the namespaces.

Example ( put in LocalSettings.php after including the extension file ):

$wgHideNsNamespaces = array(	NS_FILE,	NS_USER,	NS_USER_TALK, );

This would hide the namespace prefix in all pages within the “File”, “User”, and “User talk” namespaces. Thus if there's a user page with name “User:Foo Bar”, it'd become “Foo Bar” when you visit the page.

Parser functions
The second option is to hide/unhide namespaces with two parser functions:   and   . Those two parser functions don't take any parameters.

Example:

Foo bar. Baz, 1926.

Download instructions
Copy and paste the code from this page and place it in $IP/extensions/HideNamespace/HideNamespace.php, HideNamespace.i18n.php, HideNamespace.i18n.magic.php respectively. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following code to your LocalSettings.php: