Extension:AControlImageLink
![]() Release status: betaCategory:Beta status extensions |
|
---|---|
Implementation | HookCategory:Hook extensions |
Description | Can prevent inclusion of thumbnails on non-allowed pages |
Author(s) | Edward Chernenko |
Latest version | 0.0.1 |
Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible.Category:Extensions with release branches compatibility policy |
MediaWiki | 1.34+Category:Extensions with manual MediaWiki version |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | Category:Extensions in Wikimedia version control |
|
|
Quarterly downloads | 15 (Ranked 99th) |
Translate the AControlImageLink extension if it is available at translatewiki.net |
With the AControlImageLink extension, you can configure some uploaded image to be includable (via [[File:Name.png|thumb]]
) only into the pages where you allow this image to be.
Possible uses:
- the image contains spoilers for the movie, and you want to show it only on pages that are marked as "Can contain spoilers" (and have Disclaimers/Warnings). If so, you can allow this image to be included only into these whitelisted pages.
- in conjunction with Extension:AccessControl - for some permission tweaks.
How this works:
- If
File:Something.pdf
has<accesscontrol>HasSpoilers</accesscontrol>
, then articles without this exactly the sameaccesscontrol
tag won't render[[File:Something.pdf]]
syntax. (a link to image description page is shown instead of thumbnail) - Files without
accesscontrol
tag are not restricted. - Only files with extensions listed in
$wgAControlImageLinkRestrictedExtensions
array (default: empty) are restricted.
Sample configuration
wfLoadExtension( 'AControlImageLink' );
$wgAControlImageLinkRestrictedExtensions = [ 'pdf' ];
Installation
- Download and move the extracted
AControlImageLink
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/AControlImageLink - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'AControlImageLink' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed. Category:Page specific user rights extensions
Category:All extensions
Category:Beta status extensions
Category:Extensions in Wikimedia version control
Category:Extensions with manual MediaWiki version
Category:Extensions with release branches compatibility policy
Category:Extensions without an image
Category:GPL licensed extensions
Category:Hook extensions
Category:ImageBeforeProduceHTML extensions
Category:Page specific user rights extensions