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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Lennie Jarratt wrote:
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
[snip]
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?
There's no such thing as a main page for a namespace.
There's one main page on the wiki, which is the page which is linked to from various locations and redirected to when you don't specify any page. It can be in any namespace. Its title is specified in the message 'MediaWiki:Mainpage'.
Do all pages in the namespace have to be defined as Illinois:mypage?
Yes; if they didn't have the namespace in their titles then they would not be in the namespace.
Is there a way to have a page in multiple namespaces?
No.
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?
You might want to be using categories here instead of namespaces. Namespaces exist primarily to make functional distinctions between different types of pages which behave in different ways.
- -- brion vibber (brion @ wikimedia.org)
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?
Up to you. Something predictably consistent across your whole wiki is best for usability.
Do all pages in the namespace have to be defined as Illinois:mypage? I am assuming that for now.
That's the sensible user friendly approach.
Is there a way to have a page in multiple namespaces?
Templates
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?
Instead of unnecesary namespace complexity, why not keep most pages in a main flat namespace? Simplicity is the key to maintainability. You may be interested in studying how Wikitravel.org is organized. Note their flat namespace -- the whole Earth fits into the main namespace. It is after all one World. Subpages are kept to a minimum but used to divide large city pages into districts.
Geographical bread crumbs are another interesting feature on Wikitravel.org. http://wikitravel.org/en/Wikitravel:Breadcrumb_navigation
Per namespace skins? Such complexity may do a project more harm than good over time.
Happy trails,
Roger
On 15/04/2008, roger@rogerchrisman.com roger@rogerchrisman.com wrote:
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?
Up to you. Something predictably consistent across your whole wiki is best for usability.
/Illinois would have nothing to do with the namespace. If you're having a main page of the namespace (not that there is any technical meaning to that), wouldn't you want it to be in the namespace?
Do all pages in the namespace have to be defined as Illinois:mypage? I am assuming that for now.
That's the sensible user friendly approach.
And the only way that works. The namespace is simply the bit before the colon, so to be in the Illinois namespace, a page needs to be called Illinois:XYZ.
Is there a way to have a page in multiple namespaces?
Templates
Huh?
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?
Instead of unnecesary namespace complexity
Namespaces can't be complicated - there is one per article and that's that, what do you mean?
mediawiki-l@lists.wikimedia.org