Manual:$wgUseInstantCommons

From MediaWiki.org
Jump to: navigation, search
Shared uploads: $wgUseInstantCommons
Enable the use of Wikimedia Commons as a shared repository
Introduced in version: 1.16.0 (r58652)
Removed in version: still in use
Allowed values: boolean
Default value: false

Other settings: Alphabetical | By Function


[edit] Usage

Add to your LocalSettings.php:

$wgUseInstantCommons = true;

[edit] Details

Settings this variable to true allows to automatically use in the local wiki images hosted in Wikimedia Commons.

It is a shorthand for

$wgForeignFileRepos[] = array(
   'class'                   => 'ForeignAPIRepo',
   'name'                    => 'wikimediacommons',
   'apibase'                 => 'http://commons.wikimedia.org/w/api.php',
   'hashLevels'              => 2,
   'fetchDescription'        => true,
   'descriptionCacheExpiry'  => 43200,
   'apiThumbCacheExpiry'     => 86400,
);

'hashLevels' was added in r59428.

See Manual:$wgForeignFileRepos#Using files from Wikimedia Commons : ForeignAPIRepo for details.

[edit] See also

Language: English  • Русский
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox