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
[
edit
]
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
[
edit
]
- 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.
Done
? Navigate to
Special:Version
on your wiki to verify that the extension is successfully installed.
Configuration
[
edit
]
$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
![](//upload.wikimedia.org/wikipedia/commons/thumb/e/ec/OOjs_UI_icon_information-progressive.svg/40px-OOjs_UI_icon_information-progressive.svg.png) | 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.
|