Thanks, Ben, you jogged my brain. Something I am finding I need of lot of lately. Defining the Namespace is not necessary because it already exists. It was created when the wiki was installed. NS_My Wiki Name is technically, NS_PROJECT, 4. My Wiki Name:Some page, is just a better looking, IMO, name than Project:Some page. I had completely forgot PROJECT is the Wiki's Name, Namespace.
Here is the api info from Wikipedia’s site for its Project namespace. <ns id="4" case="first-letter" subpages="" canonical="Project" xml:space="preserve">Wikipedia</ns> <ns id="5" case="first-letter" subpages="" canonical="Project talk" xml:space="preserve">Wikipedia talk</ns> Anyone can use the link if your api is turned on. Here is Wikipedia's. http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces Just sub in your domain name...subfolder if needed or not. So....the new code in LocalSettings is $wgDefaultRobotPolicy = 'noindex,nofollow'; $wgNamespaceRobotPolicies = array( NS_MAIN => 'index,follow', NS_USER => 'index,follow', NS_Timeline => 'index,follow', NS_PROJECT => 'index,follow' ); Already tried it, works like a charm. Now, all pages except are noindex,nofollow except those in the namespaces, Main, User, Timeline(my case), and Project(My wiki's name). Tom -----Original Message----- From: Benjamin Lees Sent: Thursday, January 12, 2012 6:12 PM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] $wgNamespaceRobotPolicies for Wiki's Namespace On Thu, Jan 12, 2012 at 7:55 AM, Tom Hutchison <[email protected]> wrote: > NS_MY_WIKI_NAME, NS_My_Wiki_Name, 'NS_My Wiki Name' (had to use ' ' to > enclose, 500 error without), and every variation I can think of, but it > still excludes the Wiki's NameSpace. I even tried %20 in between. The value you use is the namespace number, not its name. If you want to use its name, you have to define a constant for it first. See http://www.mediawiki.org/wiki/Manual:Using_custom_namespaces define('NS_MY_WIKI_NAME', 10000); $wgExtraNamespaces[NS_MY_WIKI_NAME] = 'My_Wiki_Name'; $wgNamespaceRobotPolicies[NS_MY_WIKI_NAME] = 'index,follow'; _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
