[Mediawiki-l] Is there a way to control edit rights for talk pages differently from content pages?

Derrick Farnell derrick.farnell at gmail.com
Wed May 7 20:54:08 UTC 2008


Thanks - I'll give that a try also.

Derrick


On Wed, May 7, 2008 at 8:15 PM, Daniel Barrett <danb at vistaprint.com> wrote:

> 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' );
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>


More information about the MediaWiki-l mailing list