Extension:ProtectSite

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
ProtectSite

Release status:Extension status stable

ProtectSite MediaWiki extension.png
ImplementationTemplate:Extension#type Special page
DescriptionTemplate:Extension#description Allows a site administrator to temporarily block various site modifications
Author(s)Template:Extension#username Eric Johnston
Chris Stafford
Jack Phoenix
Latest versionTemplate:Extension#version 0.5.0 (2015-11-20; 14 months ago (2015-11-20))
MediaWikiTemplate:Extension#mediawiki 1.28+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
ParametersTemplate:Extension#parameters

$wgProtectSiteLimit
$wgProtectSiteDefaultTimeout
$wgProtectSiteExempt

Added rightsTemplate:Extension#rights

protectsite

Translate the ProtectSite extension if it is available at translatewiki.net

Check usage and version matrix.

ProtectSite extension adds a new special page, Special:ProtectSite, where users with the protectsite user right can block various site modifications.

When the ProtectSite extension is used, it will show up in the protection log (Special:Log/protect) as a protection of Special:AllPages.

Installation[edit]

  • Download and place the file(s) in a directory called ProtectSite in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'ProtectSite' );
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'ProtectSite' );, you need to use:

require_once "$IP/extensions/ProtectSite/ProtectSite.php";

User rights[edit]

By default, bureaucrat and staff groups have the protectsite right, which is required to access the special page.

Parameters[edit]

  • $wgProtectSiteLimit — maximum time allowed for protection of the site
  • $wgProtectSiteDefaultTimeout — default timeout, 1 hour by default
  • $wgProtectSiteExempt — array of non-sysop user groups to be not affected by rights changes