Some people answered to this post asking for the code I used for
importing preserving the media's metadata.
I attach it here. For usage instructions see --help. For more details,
see the comments heading the smartImportImages.php file.
If there is a formal submission process for contribs, sorry for not
On Jan 12, 2010, at 16:46 , Mij wrote:
We want to implement a MW-based WikiFamily with a reserved "pool" instance,
very similarly to Wikipedia, but we're encountering some problems with the media
We followed this process:
1) we started from
- three language instances
- containing about 1000 images altogether
- configured with Wikipedia-style URL scheme:
2) we installed and set up one "pool" wiki instance, according to
3) we modified maintenance/importImages.php to import automatically from any
language instance to the "pool" all images along with metadata (description,
The pool contains all medias of all language instances, and the "Upload file"
link in the
toolbox of each wiki points to the pool's Special:Upload correctly.
The relevant configuration for the language wikis is as follows:
$wgUploadNavigationUrl = "http://pool.domain.com/wiki/Special:Upload";
$wgUseSharedUploads = true;
$wgSharedUploadPath = 'http://pool.domain.com/wiki/File:';
$wgSharedUploadDirectory = '/var/www/wikis/wiki-pool/images/';
$wgHashedSharedUploadDirectory = true;
$wgEnableUploads = false;
However, trying to enforce the "pool fallback lookup" documented
we tried moving away the instance's own images/ directory. Doing this, all images
result into a broken link.
We suspect the problem is in a misconfiguration of $wgSharedUploadPath , which
isn't quite clear from the WikiFamily example or its own documentation, but cannot
track down the problem more specifically.
Notably, we observed that none of the includes/filerepo/* files is loaded.
Can anyone help out with nailing down this problem?
MediaWiki-l mailing list