Content deleted Content added
TRANSWIKI: Copied from Meta:Help:Custom namespaces. |
TRANSWIKI: Copied from Meta:Help:Custom namespaces. |
||
Line 4:
If you want to add a [[Help:Namespace#Custom_namespaces|custom namespace]], you need to do the following:
#Pick the names of your namespaces and their associated talk pages. '''Do not include spaces in the name''', but instead use an underscore character. Then pick the namespace numbers. '''Even numbers are for namespaces containing actual articles, odd numbers are reserved for talk pages'''. Numbering for custom namespaces start at 100.
#Goto /includes/DefaultSettings.php and copy the variables <var>$wgExtraNamespaces</var>, <var>$wgNamespacesWithSubpages</var>, and <var>$wgNamespacesToBeSearchedDefault</var> into LocalSettings.php
#:
#
#*:Example:
$wgExtraNamespaces =
array('''100 => "Foo",
'''101 => "Foo_Talk"''');
#If you want [[sub pages]], add
$wgNamespacesWithSubpages =
array( -1 => 0, 0 => 0, 1 => 1, 2 => 1, 3 => 1,
Line 20 ⟶ 19:
8 => 0, 9 => 1, 10 => 0,11 => 1,
'''100 => 1, 101 => 1''' );
::*Example for MediaWiki 1.5.x:
#If you want the new namespace (or its talk page) searched by default, set <var>$wgNamespacesToBeSearchedDefault</var>▼
$wgNamespacesToBeSearchedDefault =▼
array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0,▼
4 => 0, 5 => 0, 6 => 0, 7 => 0,▼
8 => 0, 9 => 1, 10 => 0, 11 => 1,▼
'''100 => 1, 101 => 1''' );▼
$wgNamespacesWithSubpages = array(
NS_TALK => true,
Line 45 ⟶ 29:
NS_TEMPLATE_TALK => true,
NS_HELP_TALK => true,
NS_CATEGORY_TALK => true,
'''101 => true'''
);
▲#
$wgNamespacesToBeSearchedDefault = array(▼
::*Example for MediaWiki 1.4.x and older:
▲ NS_MAIN => true,
▲ $wgNamespacesToBeSearchedDefault =
▲ array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0,
▲ 4 => 0, 5 => 0, 6 => 0, 7 => 0,
▲ 8 => 0, 9 => 1, 10 => 0, 11 => 1,
▲ '''100 => 1, 101 => 1''' );
::*Example for MediaWiki 1.5.x:
▲ $wgNamespacesToBeSearchedDefault = array( -1 => 0, NS_MAIN => 1, NS_USER => 0,
NS_USER_TALK => 0, NS_PROJECT_TALK => 0, NS_IMAGE_TALK => 0,
NS_IMAGE_TALK => 0, NS_TEMPLATE_TALK => 0, NS_HELP_TALK => 0,
NS_CATEGORY_TALK => 0,
'''100 => 1, 102 => 1''' );
Other pages for further Namespaces information:
* http://meta.wikimedia.org/wiki/Sub_pages
* http://meta.wikimedia.org/wiki/Help:Namespace#List_of_namespaces
|