Help talk:Protection

Latest comment: 7 years ago by Yongchinlong in topic Move?

Is there a way to have different levels of protection? Most pages anyone can edit, some pages only registered users can edit and a few pages only developers can edit?

Answer:

Yes you can setup under protection change who can do what. Below I just create a guide on how to do it. I've spent the past 2 weeks figuring this out for an intranet wiki project I have been working on.

How to edit the "Protect Page" page to reflect the ability for new user groups to have access to protected pages.

In the file /includes/DefaultSettings.php

Look for the line around 900-930 for:

/**
 * Set of permission keys that can be selected via Special:Protect.
 * 'autoconfirm' allows all registerd users if $wgAutoConfirmAge is 0.
 */
$wgRestrictionLevels = array( ' ', 'autoconfirmed', 'sysop' );

This file shows that the ' ' - the Anonymous user, the 'autoconfirmed' user and the 'sysop' user are the only three options available to be set up to have access to a protected page. To change this change the line

$wgRestrictionLevels = array( ' ', 'autoconfirmed', 'sysop' );

To:

$wgRestrictionLevels = array( ' ', 'priveledged', 'sysop' );

The group name that you change should be exactly the same as the group you created from before.

If you check out your Special:Protect page now you'll notice that the group you just put in doesn't read properly. It says something along the lines of &lgt'protect-level-priveledged'&lgt. To change this go to to the /languages/Messages.php around line 1189 you will see:

'protect-level-autoconfirmed' => 'Block unregistered users',

Create a new line to place the text in for the Special:Protect page to read something like:

'protect-level-priveledged' => 'Priveledged Users Only',

Now when you go to a Special:Protect page you will see your changes and they will reflect appropriately.

This works in version 1.6.6


Question(s): The article states pages are generally unlocked after 90 days (three months). Is this enforced by mediawiki software? Or, is it a general rule for admins to unlock pages manually after 90 days? If enforced, how is the 90 day unlock removed so locks are indefinite? Cedarrapidsboy 22:37, 13 July 2007 (UTC)Reply

Expiry values

edit

When protecting a page, what are the valid Expiry values? Are they the same as in the "other time" option used when blocking a user?--Vjg 18:50, 17 August 2007 (UTC)Reply

Policy?

edit

Generally, articles become unprotected within three months of their original protection. <--- is that an official policy? Afaics, in most wikis this is not the case. Is it on en.wp? --Thogo (talk) 19:50, 20 November 2007 (UTC)Reply

핵실험 못하게 하는 아이디어 EunjooHwang (talk) 01:19, 17 April 2017 (UTC)Reply

Move?

edit

Should this be moved to Protection? It's mostly about the state of protection, and not the act of protecting, so Protection would make more sense. Timeroot 23:45, 1 March 2009 (UTC)Reply

Should this be moved to protection, Timeroot 23.45, 1 March 2009 (UTC) Yongchinlong (talk) 03:53, 28 September 2017 (UTC)Reply

after execute the function, id does not pass anything

edit

After execute the funtion protection to articles, id does not pass anything, the article ist not protectet. The apache server is logging the failure:


[error] an unknown filter was not added: PHP

Return to "Protection" page.