Extension:ProtectionIndicator
ProtectionIndicator Release status: beta |
|
---|---|
Implementation | Parser extension , User interface |
Description | Adds a protection icon to the top of the page when a page is protected |
Author(s) | Sohom Dattatalk |
Latest version | 0.1 |
MediaWiki | >= 1.39.0 |
License | GNU General Public License 2.0 or later |
Download | |
|
|
Quarterly downloads | 1 (Ranked 128th) |
Translate the ProtectionIndicator extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The ProtectionIndicator extension adds lock icons to the top left corner of the page based on the protection level of the page.
Installation
edit- Download and move the extracted
ProtectionIndicator
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ProtectionIndicator - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'ProtectionIndicator' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Configuration parameters
edit- $wgShowIconsOnMainPage
- Adds the icons to the top of the Main Page of the Wiki if it is protected. False by default.
- $wgShowLogInPopup
- Adds the last log entry to the popup. True by default.
CSS configuration
editA particular file, MediaWiki:ProtectionIndicatorCustom.css
is loaded by the extension while adding the icons. This file can be used to customize the icons. The css class names for the icons follow the format protectionindicator-extension-<level>-<action>
and protectionindicator-extension-cascading-<level>-<action>
for cascading protection. If you have flaggedrevs installed you can customise the flaggedrevs icons with the protectionindicator-extension-flaggedrevs-edit-flaggedrevs-<level>
code. This feature can also be used to completely hide an icon from view.
Other stuff
editA parser tag, <suppressprotectionindicator/>
can be used to prevent icons from appearing on a particular page.
Testing/Development/Bug fixing
edit- Clone the github repository into the extensions/ folder of a test MediaWiki installation (worked on mediawiki-docker-dev).
- Add
wfLoadExtension( 'ProtectionIndicator' );
to your LocalSettings.php file. - Test installation by navigating to a page which is protected.
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |