Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Extension:AControlImageLink

From mediawiki.org
MediaWiki extensions manual
AControlImageLink
Release status: beta
ImplementationHook
DescriptionCan prevent inclusion of thumbnails on non-allowed pages
Author(s)Edward Chernenko
Latest version0.0.1
Compatibility policySnapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki1.34+
Database changesNo
LicenseGNU General Public License 2.0 or later
Download
  • $wgAControlImageLinkRestrictedExtensions
Translate the AControlImageLink extension if it is available at translatewiki.net

With theAControlImageLink extension, you can configure someuploaded image to be includable (via[[File:Name.png|thumb]]) only into the pages where you allow this image to be.

Possible uses:

  1. 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.
  2. The image is a dick pic, and while potentially useful in medical articles, might not be especially appropriate in other contexts.
  3. in conjunction withExtension:AccessControl - for some permission tweaks.

How this works:

  1. IfFile: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)
  2. Files withoutaccesscontrol tag are not restricted.
  3. Only files with extensions listed in$wgAControlImageLinkRestrictedExtensions array (default: empty) are restricted.

Sample configuration

[edit]
wfLoadExtension('AControlImageLink');$wgAControlImageLinkRestrictedExtensions=['pdf'];

Installation

[edit]
  • Download and move the extractedAControlImageLink folder to yourextensions/ directory.
    Developers and code contributors should install the extensionfrom Git instead, using:
    cdextensions/gitclonehttps://gerrit.wikimedia.org/r/mediawiki/extensions/AControlImageLink
  • Add the following code at the bottom of yourLocalSettings.php file:
    wfLoadExtension('AControlImageLink');
  • YesDone – Navigate toSpecial:Version on your wiki to verify that the extension is successfully installed.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Extension:AControlImageLink&oldid=8040738"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp