Différences entre les versions de « MultipleFileRepos »
De Semantic MediaWiki - Sandbox
(add) |
(add) |
||
Ligne 1 : | Ligne 1 : | ||
+ | == Configuration == | ||
+ | <syntaxhighlight lang="php" | ||
+ | ## Repositories | ||
+ | |||
+ | # commonswiki | ||
+ | $wgUseInstantCommons = true; | ||
+ | |||
+ | # 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 | ||
+ | ]; | ||
+ | </syntaxhighlight> | ||
== commonswiki == | == commonswiki == | ||
[[:Fichier:Mallnitz Seebachtal Wasserfälle 02.jpg]] | [[:Fichier:Mallnitz Seebachtal Wasserfälle 02.jpg]] | ||
Ligne 13 : | Ligne 48 : | ||
[[Fichier:Porte Liadski.jpg|350px|Porte Liadski]] | [[Fichier:Porte Liadski.jpg|350px|Porte Liadski]] | ||
+ | |||
+ | [[Category:Example]] |
Version du 13 février 2019 à 16:41
Configuration
'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
];
commonswiki
Fichier:Mallnitz Seebachtal Wasserfälle 02.jpg
enwiki
Fichier:The Pursuit of Happiness I'm An Adult Now.jpg