[Mediawiki-l] Is there a way to control edit rights for talk pages differently from content pages?
Daniel Barrett
danb at VistaPrint.com
Wed May 7 19:15:19 UTC 2008
Something like this loop should work, if you haven't defined any custom namespaces in your wiki:
global $wgCanonicalNamespaceNames;
foreach ($wgCanonicalNamespaceNames as $ns => $name) {
// If namespace ID is non-negative and even, protect it.
if ($ns >= 0 && $ns % 2 == 0) {
$wgNamespaceProtection[$ns] = array( 'sysop' );
}
}
DanB
-----Original Message-----
Derrick Farnell writes:
That went above my head! Perhaps if I just added a line for each non-talk
namespace? That is:
$wgNamespaceProtection[NS_MAIN] = array( 'sysop' );
$wgNamespaceProtection[NS_MEDIAWIKI] = array( 'sysop' );
$wgNamespaceProtection[NS_TEMPLATE] = array( 'sysop' );
$wgNamespaceProtection[NS_WIKI_TITLE] = array( 'sysop' );
More information about the MediaWiki-l
mailing list