Extension:HideNamespace

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

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

=== The  (note the case) in version 1.4.3 (1.4.2a for MW 1.15). Please, change the corresponding code in your LocalSettings.php to avoid further complications.}}

The first option is to use global variable. By specifying namespaces in the  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.

If the previous page would be called, for instance, “Help:Bark”, it would become just “Bark” when you visit the page.

Other example:

Hello, my name's Joe. You can leave me a message on my talk page.

If we would define the  variable as in the very first example and the previous page would be called “User:Joe Doe”, the page title would still be “User:Joe Doe” when you visit the page, because you've overriden the setting with the   parser function.

Download instructions
Download the extension code from the Subversion repository and place it in your extensions directory.

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