Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎Nederlands • ‎português • ‎português do Brasil • ‎русский
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

Usage[edit | edit source]

Add to your LocalSettings.php:

$wgUseInstantCommons = true;

Details[edit | edit source]

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'                 => '',
   'hashLevels'              => 2,
   'fetchDescription'        => true,
   'descriptionCacheExpiry'  => 43200,
   'apiThumbCacheExpiry'     => 86400,

'hashLevels' was introduced in MediaWiki 1.16 (r59428).

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

See also[edit | edit source]