Parser: $wgEnableImageWhitelist | |
---|---|
Enables an on-wiki external image whitelist |
|
Introduced in version: | 1.14.0 (r40310) |
Removed in version: | still in use |
Allowed values: | (boolean) |
Default value: | false (1.32+)true (1.14-1.31) |
Other settings: Alphabetical | By function |
Usage
If $wgAllowExternalImagesregular expression fragments that are each matched when an external image is being parsed. Items that match a whitelist entry will be displayed, those that do not match will be linked.
is false, enabling this will turn on an on-wiki external image whitelist at MediaWiki:External image whitelist (a page on the wiki). Items on this whitelist page areLines on the whitelist starting with #
and blank lines are not used to find a match
This setting may be used concurrently with $wgAllowExternalImagesFrom
without any issues.The following code snippets show how to enable and disable this feature, respectively.
// <translate nowrap><!--T:14--> Enable the [[MediaWiki:External image whitelist]] page</translate>
$wgAllowExternalImages = false;
$wgEnableImageWhitelist = true;
// <translate nowrap><!--T:15--> Disable the page</translate>
$wgEnableImageWhitelist = false;
An example MediaWiki:External image whitelist page
#<translate nowrap><!--T:16--> This line is a comment. The part below allows all images from commons</translate> ^http://upload\.wikimedia\.org/ #<translate nowrap><!--T:17--> Allow Photobucket</translate> ^http://.*?\.photobucket\.com/
See also
- $wgAllowExternalImagesFrom
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.