Hi there !
How can I auto-protect pages when they are created? I.e. I want all newly created pages to have a specific protection level by default... how can I do this?
Thanks for your help and best regards,
Florian
Florian Knorn a écrit :
Hi there !
How can I auto-protect pages when they are created? I.e. I want all newly created pages to have a specific protection level by default... how can I do this?
Thanks for your help and best regards,
Florian
Your question is not clear: you can set the protection on pages using a few ways, and this will apply from the beginning = their creation.
I guess you already know about user rights and protection in mediawiki, but as it seems that nobody has yet answered your post, I give a few links:
http://meta.wikimedia.org/wiki/Help:User_rights http://meta.wikimedia.org/wiki/Setting_user_rights_in_MediaWiki
don't forget to have a look at the Talk paged of these articles: often, you will find experiences and tips on how users founds solutions to specific problems (for example, how to protect a specific namespace)
Do post again, explaining what the specificity of the protection is if you need more advice... and **do** give the version of your mediawiki. Some solutions only apply since 1.6 1.7 or 1.8.
Hope it helps
François
Hey FxParlant,
thank you for your reply -- sorry for being unclear.
Using Mediawiki 1.8.2, I'm talking about the [Protect] tab at the top of a page. When somebody creates a page, the page is not protected (the tab is labeled "Protect"). When I then go in there, non of the protection levels is selected (i.e. the page is unprotected). I can then select a specific level in the list and save and all is good (the page is protected, on-page edit links disappear etc.)
What I want is that all newly created pages are automatically protect with one of the levels...
Hope this made things more clear, thanks for supporting me on this,
Florian :-)
FxParlant wrote:
Florian Knorn a écrit :
Hi there !
How can I auto-protect pages when they are created? I.e. I want all newly created pages to have a specific protection level by default... how can I do this?
Thanks for your help and best regards,
Florian
Your question is not clear: you can set the protection on pages using a few ways, and this will apply from the beginning = their creation.
I guess you already know about user rights and protection in mediawiki, but as it seems that nobody has yet answered your post, I give a few links:
http://meta.wikimedia.org/wiki/Help:User_rights http://meta.wikimedia.org/wiki/Setting_user_rights_in_MediaWiki
don't forget to have a look at the Talk paged of these articles: often, you will find experiences and tips on how users founds solutions to specific problems (for example, how to protect a specific namespace)
Do post again, explaining what the specificity of the protection is if you need more advice... and **do** give the version of your mediawiki. Some solutions only apply since 1.6 1.7 or 1.8.
Hope it helps
François
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Ok, managed to do it myself (I'm getting better, hehe :-))
In case somebody finds this useful, here is my semi-quick&dirty solution:
1. In your LocalSettings.php create a variable $wgDefaultProtectionLevel = array( 'edit' => 'mitarbeiter', 'move' => 'mitarbeiter'); ... where you should replace 'mitarbeiter' by the specific level you want / need.
2. In includes/Article.php find the insertNewArticle function (for me it [with MediaWiki 1.8.2] it was around line 1100...), and add the following code to the end of the function (but, of course, before the doRedirect command):
/* default protection level hack */ global $wgDefaultProtectionLevel;
$ok = $this->updateRestrictions( $wgDefaultProtectionLevel, 'Initial protect' ); if( !$ok ) { throw new FatalError( "Unknown error at restriction save time." ); } /* end default protection level hack */
There you go, new pages should now automatically be protected with the levels you chose in the LocalSettings...
Cheers everyone,
Florian :-)
Florian Knorn wrote:
Hi there !
How can I auto-protect pages when they are created? I.e. I want all newly created pages to have a specific protection level by default... how can I do this?
Thanks for your help and best regards,
Florian _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org