To add a new namespace, just set $wgExtraNamespaces in LocalSettings.php.
Custom namespaces must begin at 100.
This is primarily intended to let us add a bunch of international versions
of the "Help:" namespace on Meta, so we can finally have a single place for
all documentation and easily dump/import it to other wikis.
# Use RC Patrolling to check for vandalism
$wgUseRCPatrol = true;
+# Additional namespaces. If the namespaces defined in Language.php and Namespace.php are insufficient,
+# you can create new ones here, for example, to import Help files in other languages.
+# PLEASE NOTE: Once you delete a namespace, the pages in that namespace will no longer be accessible.
+# If you rename it, then you can access them through the new namespace name.
+#
+# Custom namespaces should start at 100.
+#$wgExtraNamespaces=
+# array(100 => "Hilfe",
+# 101 => "Hilfe_Diskussion",
+# 102 =>"Aide",
+# 103 =>"Discussion_Aide"
+# );
+
} else {
die();
}
NS_CATEGORY_TALK => 'Category_talk'
);
+if(isset($wgExtraNamespaces)) {
+ $wgCanonicalNamespaceNames=$wgCanonicalNamespaceNames+$wgExtraNamespaces;
+}
+
class Namespace {
/* These functions are deprecated */
function isTalk( $index )
{
+ global $wgExtraNamespaces;
return ( $index == NS_TALK || $index == NS_USER_TALK ||
$index == NS_PROJECT_TALK || $index == NS_IMAGE_TALK ||
$index == NS_MEDIAWIKI_TALK || $index == NS_TEMPLATE_TALK ||
- $index == NS_HELP_TALK || $index == NS_CATEGORY_TALK );
+ $index == NS_HELP_TALK || $index == NS_CATEGORY_TALK
+ || ( (isset($wgExtraNamespaces) && $index % 2) )
+ );
+
}
# Get the talk namespace corresponding to the given index
NS_CATEGORY_TALK => 'Category_talk'
);
+if(isset($wgExtraNamespaces)) {
+ $wgNamespaceNamesEn=$wgNamespaceNamesEn+$wgExtraNamespaces;
+}
+
/* private */ $wgDefaultUserOptionsEn = array(
'quickbar' => 1, 'underline' => 1, 'hover' => 1,
'cols' => 80, 'rows' => 25, 'searchlimit' => 20,