[Mediawiki-l] excluding namespaces from RecentChanges
Frederik Dohr
fdg001 at gmx.net
Sun Mar 18 20:35:25 UTC 2007
Thanks for the extensive info, Jim!
For now, I'll exclude the USER namespace - though that means the USER
TALK namespace will still be listed...
-- F.
----- Original Message -----
From: Jim Wilson
Date: 2007-03-18 19:27
> If you want to only show a single Namespace, you can use the 'namespace' url
> parameter.
>
> For example, consider mediawiki.org:
>
> Original:
> http://www.mediawiki.org/wiki/Special:Recentchanges
> Only Main:
> http://www.mediawiki.org/wiki?title=Special:Recentchanges&namespace=0
> Only Template:
> http://www.mediawiki.org/wiki?title=Special:Recentchanges&namespace=10
>
> It's a relatively simple hack to change the default 'namespace' filter to
> one of these (currently it defaults to null). To do this, crack open
> $IP/includes/Specialrecentchanges.php and find this line:
>
> /* text */ 'namespace' => null,
>
> Change 'null' to whatever Namespace you want to display - 0 for Main, 2 for
> User, 4 for Project, etc.
>
> Along those same lines, if you only want to omit one namespace (for example
> User), you can do the same steps as above, and also change the default value
> for the 'invert' parameter. When 'invert' is set to true, the 'namespace'
> parameter acts as a blacklist instead of a whitelist.
>
> Filtering on more than one namespace requires more hacking. If many people
> have this request, it may make sense to patch-in a 'namespaces' parameter,
> which is a comma separated list of namespaces to filter on.
>
> It might also make sense to move the $defaults specification from inside the
> wfSpecialRecentchanges() method to somewhere in DefaultSettings.php to make
> modifications to the default behavior easier.
>
> -- Jim R. Wilson (jimbojw)
More information about the MediaWiki-l
mailing list