[Mediawiki-l] Namespace Question

Lennie Jarratt ljarratt at gmail.com
Tue Apr 15 16:34:25 UTC 2008


I am setting up several custom namespaces and want to make sure I have them
correct.  Any advice or examples would be very helpful.  This is what I have
so far in LocalSettings.php

#
# Skins Per Namespace
#
require_once( "$IP/extensions/SkinPerNamespace/SkinPerNamespace.php" );

#
# Illinois
#
define("NS_ILLINOIS", 100);  # defining the numbers here allow you to use
the ID later instead of the number
define("NS_ILLINOIS", 101);
$wgExtraNamespaces[NS_ILLINOIS]  = "Illinois";
$wgExtraNamespaces[NS_ILLINOIS]  = "Illinois_talk";
$wgNamespaceProtection[NS_ILLINOISILLINOIS] = array( 'editIllinois' );
$wgGroupPermissions['sysop']['editsouthdakota'] = true;
$wgSkinPerNamespace[NS_ILLINOIS]     = "cologneblue";
$wgSkinPerNamespace[NS_ILLINOIS_TALK]= "cologneblue";

#
# South Dakota
#
define("NS_SOUTHDAKOTA", 102);  # defining the numbers here allow you to use
the ID later instead of the number
define("NS_SOUTHDAKOTA", 103);
$wgExtraNamespaces[NS_SOUTHDAKOTA]  = "South_Dakota";
$wgExtraNamespaces[NS_SOUTHDAKOTA]  = "South_Dakota_talk";
$wgNamespaceProtection[NS_SOUTHDAKOTA] = array( 'editsouthdakota' );
$wgGroupPermissions['sysop']['editsouthdakota'] = true;
$wgSkinPerNamespace[NS_SOUTHDAKOTA]     = "cologneblue";
$wgSkinPerNamespace[NS_SOUTHDAKOTA_TALK]= "cologneblue";

#
# Add all additional namespaces here for searching and site statistics
#
$wgContentNamespaces[] = array(100,102);

I will be adding a namespace for multiple topics, but I just want to get
this working with 2 first.  I have a few other questions as well:

What goes in the main page for a namespace?  Should it be a normal page,
i.e. www.domain.com/index.php/Illinois or shout it be
www.domain.com/index.php/Illinois:Main_Page?
Do all pages in the namespace have to be defined as Illinois:mypage?  I am
assuming that for now.
Is there a way to have a page in multiple namespaces? i.e.say I have Chicago
Illinois which is under  Illinois:Chicago.  But, Chicago has a group that
wants to make Chicago look different so it becomes its own namespace so I
can do a skin for it.  How would I handle that since it needs its own
namespace, yet it is still apart of Illinois?

Thanks in advance for the help.

Lennie


More information about the MediaWiki-l mailing list