Différences entre les versions de « MultipleFileRepos »
De Semantic MediaWiki - Sandbox
(chg) |
|||
Ligne 7 : | Ligne 7 : | ||
# commonswiki | # commonswiki | ||
− | $ | + | $wgForeignFileRepos[] = [ |
− | + | 'class' => 'ForeignAPIRepo', | |
+ | 'name' => 'commonswiki', | ||
+ | 'apibase' => 'https://commons.wikimedia.org/w/api.php', | ||
+ | 'url' => 'https://upload.wikimedia.org/wikipedia/commons', | ||
+ | 'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/commons/thumb', | ||
+ | 'hashLevels' => 2, | ||
+ | 'transformVia404' => true, | ||
+ | 'fetchDescription' => true, | ||
+ | 'descriptionCacheExpiry' => 43200, | ||
+ | 'apiThumbCacheExpiry' => 86400 | ||
+ | ]; | ||
+ | |||
# enwiki | # enwiki | ||
$wgForeignFileRepos[] = [ | $wgForeignFileRepos[] = [ |
Version du 14 février 2019 à 16:38
Reference
https://phabricator.wikimedia.org/T190168
Configuration
## Repositories
# commonswiki
$wgForeignFileRepos[] = [
'class' => 'ForeignAPIRepo',
'name' => 'commonswiki',
'apibase' => 'https://commons.wikimedia.org/w/api.php',
'url' => 'https://upload.wikimedia.org/wikipedia/commons',
'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/commons/thumb',
'hashLevels' => 2,
'transformVia404' => true,
'fetchDescription' => true,
'descriptionCacheExpiry' => 43200,
'apiThumbCacheExpiry' => 86400
];
# enwiki
$wgForeignFileRepos[] = [
'class' => 'ForeignAPIRepo',
'name' => 'enwiki',
'apibase' => 'https://en.wikipedia.org/w/api.php',
'url' => 'https://upload.wikimedia.org/wikipedia/en',
'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/en/thumb',
'hashLevels' => 2,
'transformVia404' => true,
'fetchDescription' => true,
'descriptionCacheExpiry' => 43200,
'apiThumbCacheExpiry' => 86400
];
# frwiki
$wgForeignFileRepos[] = [
'class' => 'ForeignAPIRepo',
'name' => 'frwiki',
'apibase' => 'https://fr.wikipedia.org/w/api.php',
'url' => 'https://upload.wikimedia.org/wikipedia/fr',
'thumbUrl' => 'https://upload.wikimedia.org/wikipedia/fr/thumb',
'hashLevels' => 2,
'transformVia404' => true,
'fetchDescription' => true,
'descriptionCacheExpiry' => 43200,
'apiThumbCacheExpiry' => 86400
];
Results
commonswiki
Fichier:Mallnitz Seebachtal Wasserfälle 02.jpg
enwiki
Fichier:The Pursuit of Happiness I'm An Adult Now.jpg