Extension:External image whitelist

From MediaWiki.org

Jump to: navigation, search
Crystal Clear app error.png

This extension is obsolete!
It has been replaced by core functionality in the MediaWiki software (which was added in version 1.14.0).

             

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
External image whitelist

Release status: stable

Implementation  MyWiki
Description Allows external images only from sites matching a regex whitelist
Author(s)  Ryan Schmidt (SkizzerzTalk)
Last Version  1.0
MediaWiki  1.13.0
License GPL
Download Subversion [Help]

Browse source code

check usage (experimental)

Contents

[edit] Usage

Make sure that $wgAllowExternalImages is false in your LocalSettings.php before installing this extension. It will not work otherwise.

Then, follow the directions on your wiki's "MediaWiki:External image whitelist" page to add regular expression fragments that will be matched whenever an external image is about to be displayed. Items matching that regex will have the respective image displayed ("hot linked"), otherwise only a link to that image will be shown.

Note: This is not the extension that Wikia uses
Warning Warning: This extension's functionality is available by default in versions 1.14.0 and above. Do not install this extension on such wikis. The usage of the core feature is exactly the same as this extension

[edit] Download instructions

Download the extension from the Subversion repository and save it into the ExternalImageWhitelist directory of your wiki. If you have shell access to your server, you may do the following to download the extension.

Warning: Before you download read Requirements or you might install the wrong version:

cd extensions
svn co http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_13/extensions/ExternalImageWhitelist


[edit] Requirements

  • MediaWiki version 1.13.x. This feature is present in the core MediaWiki software as of version 1.14.0.

[edit] Installation

To install this extension, add the following to LocalSettings.php:

require_once("$IP/extensions/ExternalImageWhitelist/ExternalImageWhitelist.php");

[edit] Configuration parameters

$wgExtImgWlExtensions
Array of extensions to search for before matching URLs to the whitelist regex. Default value: array('gif', 'jpg', 'jpeg', 'bmp', 'png', 'svg').