Extension:MediaSpoiler

Category:Extensions without an imageCategory:GPL licensed extensions
MediaWiki extensions manual
MediaSpoiler
Release status: experimentalCategory:Experimental extensions
Implementation Parser extension Category:Parser extensions, MediaCategory:Media handling extensions
Description Hide media that may make readers uncomfortable
Author(s) 沈澄心talk
Latest version 0.1.0
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.Category:Extensions with release branches compatibility policy
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
  • $wgMediaSpoilerEnableMark
Quarterly downloads 0
Translate the MediaSpoiler extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensions

The MediaSpoiler extension allows editors to mark sensitive media and make them hidden by default. It also gives users an option to show/hide all media.

Usage

Add |class=spoiler to images/videos you want to hide (only works with images/videos with |frame or |thumb options). It adds notpageimage class to those media automatically, excluding them from page image candidates.

Registered users can change the “Media display” option to choose to hide sensitive media, show all media, hide all media, or show links to media description pages only by default (the latter three are still available when $wgMediaSpoilerEnableMark = false.

Installation

  • Download and move the extracted MediaSpoiler folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MediaSpoiler
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'MediaSpoiler' );
    
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

$wgMediaSpoilerEnableMark

Allow editors to mark sensitive media. If set to false, |class=spoiler option will not hide media (but still exclude media from page image candidates), and “Hide media marked as sensitive” option will be unavailable. Default value: true

Category:All extensions Category:Experimental extensions Category:Extensions in Wikimedia version control Category:Extensions included in Miraheze Category:Extensions with release branches compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:GetPreferences extensions Category:Media handling extensions Category:OutputPageBeforeHTML extensions Category:ParserMakeImageParams extensions Category:ParserModifyImageHTML extensions Category:ParserOptionsRegister extensions Category:Parser extensions Category:UserGetDefaultOptions extensions