Manual:$wgUseInstantCommons
From MediaWiki.org
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' => 'http://commons.wikimedia.org/w/api.php', '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]
- InstantCommons
- Manual:Configuring file uploads (mainly for local uploads)
- Manual:$wgForeignFileRepos (to configure multiple file repositories)