How does commons.wikipedia work? Can this be imitated in other people's own installation of MediaWiki? Is there a technical document under meta explaining this, I can't find any.
Yongho
Yongho Kim wrote:
How does commons.wikipedia work? Can this be imitated in other people's own installation of MediaWiki? Is there a technical document under meta explaining this, I can't find any.
All configurable settings are in DefaultSettings.php; please always refer to this file first.
# If you operate multiple wikis, you can define a shared upload # path here. Uploads to this wiki will NOT be put there - they # will be put into $wgUploadDirectory. # # If $wgUseSharedUploads is set, the wiki will look in the # shared repository if no file of the given name is found in # the local repository (for [[Image:..]], [[Media:..]] links). # Thumbnails will also be looked for and generated in this # directory. # $wgUseSharedUploads = false; # Full path on the web server where shared uploads can be found $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images"; # Path on the file system where shared uploads can be found $wgSharedUploadDirectory = "/var/www/wiki3/images"; # Set this to false especially if you have a set of files that need to be # accessible by all wikis, and you do not want to use the hash (path/a/aa/) # directory layout. $wgHashedSharedUploadDirectory = true;
# Path on the file system where shared uploads can be found $wgSharedUploadDBname = "commons";
# set true if the repository uses latin1 filenames $wgSharedLatin1=false;
-- brion vibber (brion @ pobox.com)
Thank you Brion! will check into DefaultSettings next time.
Can :en/images be simply set up as a commons replacement? I set up the following in a spanish localization (http://mpkb.net/es/Portada ), which doesn't seem to work:
$wgSharedUploadPath = "http://mpkb.net/wikien/images"; $wgSharedUploadDirectory = "/public_html/wikien/images";
$wgHashedSharedUploadDirectory = true; $wgSharedUploadDBname = "commons"; $wgSharedLatin1=false;
(wikien is the english copy)
I left wgHashedSharedUploadDirectory wgSharedUploadDBname as they were because I didn't know what they stood for.
In particular what is the "file system where shared uploads can be found"? Is that supposed to equal $wgSharedUploadDirectory = "/public_html/wikien/images"; or is it some other directory? It's confusing because the comments say it's a file system but the veraible name says "DB" should I link it to the english MediaWiki db? (but the spanish mediawiki has no access right to the english db)
yongho
On 5/11/05, Brion Vibber brion@pobox.com wrote:
Yongho Kim wrote:
How does commons.wikipedia work? Can this be imitated in other people's own installation of MediaWiki? Is there a technical document under meta explaining this, I can't find any.
All configurable settings are in DefaultSettings.php; please always refer to this file first.
# If you operate multiple wikis, you can define a shared upload # path here. Uploads to this wiki will NOT be put there - they # will be put into $wgUploadDirectory. # # If $wgUseSharedUploads is set, the wiki will look in the # shared repository if no file of the given name is found in # the local repository (for [[Image:..]], [[Media:..]] links). # Thumbnails will also be looked for and generated in this # directory. # $wgUseSharedUploads = false; # Full path on the web server where shared uploads can be found $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images"; # Path on the file system where shared uploads can be found $wgSharedUploadDirectory = "/var/www/wiki3/images"; # Set this to false especially if you have a set of files that need to be # accessible by all wikis, and you do not want to use the hash (path/a/aa/) # directory layout. $wgHashedSharedUploadDirectory = true;
# Path on the file system where shared uploads can be found $wgSharedUploadDBname = "commons";
# set true if the repository uses latin1 filenames $wgSharedLatin1=false;
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Yongho Kim wrote:
In particular what is the "file system where shared uploads can be found"?
That's the place on the disk where you put the files.
If you're referring to the misplaced comment, obviously that's wrong. The database name is a database name.
-- brion vibber (brion @ pobox.com)
I am still unable to set the commons wiki properly. Could someone paste here a working LocalSettings.php wgSharedUpload configuration? Or could I see wikipedia's configuration? That would make it a lot easier to retroengineer it and adapt to my site's setup.
Yongho
On 5/11/05, Yongho Kim yokima@gmail.com wrote:
Thank you Brion! will check into DefaultSettings next time.
Can :en/images be simply set up as a commons replacement? I set up the following in a spanish localization (http://mpkb.net/es/Portada ), which doesn't seem to work:
$wgSharedUploadPath = "http://mpkb.net/wikien/images"; $wgSharedUploadDirectory = "/public_html/wikien/images";
$wgHashedSharedUploadDirectory = true; $wgSharedUploadDBname = "commons"; $wgSharedLatin1=false;
(wikien is the english copy)
I left wgHashedSharedUploadDirectory wgSharedUploadDBname as they were because I didn't know what they stood for.
In particular what is the "file system where shared uploads can be found"? Is that supposed to equal $wgSharedUploadDirectory = "/public_html/wikien/images"; or is it some other directory? It's confusing because the comments say it's a file system but the veraible name says "DB" should I link it to the english MediaWiki db? (but the spanish mediawiki has no access right to the english db)
yongho
On 5/11/05, Brion Vibber brion@pobox.com wrote:
Yongho Kim wrote:
How does commons.wikipedia work? Can this be imitated in other people's own installation of MediaWiki? Is there a technical document under meta explaining this, I can't find any.
All configurable settings are in DefaultSettings.php; please always refer to this file first.
# If you operate multiple wikis, you can define a shared upload # path here. Uploads to this wiki will NOT be put there - they # will be put into $wgUploadDirectory. # # If $wgUseSharedUploads is set, the wiki will look in the # shared repository if no file of the given name is found in # the local repository (for [[Image:..]], [[Media:..]] links). # Thumbnails will also be looked for and generated in this # directory. # $wgUseSharedUploads = false; # Full path on the web server where shared uploads can be found $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images"; # Path on the file system where shared uploads can be found $wgSharedUploadDirectory = "/var/www/wiki3/images"; # Set this to false especially if you have a set of files that need to
be
# accessible by all wikis, and you do not want to use the hash
(path/a/aa/)
# directory layout. $wgHashedSharedUploadDirectory = true;
# Path on the file system where shared uploads can be found $wgSharedUploadDBname = "commons";
# set true if the repository uses latin1 filenames $wgSharedLatin1=false;
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Yongho Kim wrote:
I am still unable to set the commons wiki properly. Could someone paste here a working LocalSettings.php wgSharedUpload configuration? Or could I see wikipedia's configuration? That would make it a lot easier to retroengineer it and adapt to my site's setup.
First you need to set the URL prefix to where the common uploaded files will appear on the web:
$wgSharedUploadPath = 'http://upload.wikimedia.org/wikipedia/commons';
You also need a local filesystem directory, so files can be checked for existence and thumbnails generated:
$wgSharedUploadDirectory = '/mnt/upload3/wikipedia/commons';
On by default, using the subdirectories to split up the file set:
$wgHashedSharedUploadDirectory = true;
To load image data for shared images, you'll also need to specify the database name (all your wikis will need to use the same prefix, in separate databases on the same server, or I'm not sure this works):
$wgSharedUploadDBname = 'commonswiki';
I'm not sure if this made it into 1.5 or not, but you can optionally have it fetch the description page contents to show when you go to 'Image:Foo.jpg'. This might require additional configuration (appropriate interwiki table etc):
$wgFetchCommonsDescriptions = true;
Unfortunately I'm not sure any of the above is any clearer than the examples in the earlier message you quoted, but that's our settings...
-- brion vibber (brion @ pobox.com)
Hmm, I feel like I would need to enter more information to LocalSettings.phpfor this to work.
As I understand it, Wikimedia Commons is a MediaWiki installation that *could* have text information but instead was dedicated to media files. And the other languages, english, german, etc.. will "look up" Wikimedia Commons when an Image: request does not show any local file. Right? So I'm assuming the configuration given by Brion Vibber
$wgSharedUploadPath = 'http://upload.wikimedia.org/wikipedia/commons'; $wgSharedUploadDirectory = '/mnt/upload3/wikipedia/commons'; $wgHashedSharedUploadDirectory = true; $wgSharedUploadDBname = 'commonswiki';
is a LocalSettings.php insert for every single language wikipedia installation, except for Commons itself, right?
If this is the case, why is given language MediaWiki X (let's say the english installation) not provided with the MySQL user and password for the UploadDBname "commonswiki"? Shouldn't there be entries for $wgSharedUploadDBuser and $wgeSharedUploadDBpassword ?
For instance, our MediaWiki installs at mpkb.net are structured as follows:
MySQL english wiki (/en) DB mpkbnet_wiki, prefix en_ (en_archive, en_brokenlinks, etc..) spanish wiki (/es) DB mpkbnet_wiki, prefix es_ (es_archive, es_brokenlinks) user for mpkbnet_wiki = mpkbnet_mpkbnet
Then I try to set up the spanish wiki as subordinated to the english wiki, and so all images in spanish will be coming from the ones already uploaded at the english one. So I tried to set up the english one as a Commons.
I inserted the following at the spanish wiki LocalSettings.php
$wgSharedUploadPath = 'http://mpkb.net/wikien/images'; $wgSharedUploadDirectory = '/home/mpkbnet/public_html/wikien/images'; $wgHashedSharedUploadDirectory = true; $wgSharedUploadDBname = 'mpkbnet_wiki';
( /wikien is the real directory and /en is a rewrite mask)
and obviously it doesn't work, but.. how can this be done? Should I separate the english and spanish wiki into different databases?
english wiki DB mpkbnet_wikien, prefix wp_ spanish wiki DB mpkbnet_wikies, prefix wp_
like this?
But still, I can't see how one wiki would be able to access DB information for the other "commons" wiki.
Help.
Yongho
On 11/29/05, Brion Vibber brion@pobox.com wrote:
Yongho Kim wrote:
I am still unable to set the commons wiki properly. Could someone paste
here
a working LocalSettings.php wgSharedUpload configuration? Or could I see wikipedia's configuration? That would make it a lot easier to
retroengineer
it and adapt to my site's setup.
First you need to set the URL prefix to where the common uploaded files will appear on the web:
$wgSharedUploadPath = 'http://upload.wikimedia.org/wikipedia/commons';
You also need a local filesystem directory, so files can be checked for existence and thumbnails generated:
$wgSharedUploadDirectory = '/mnt/upload3/wikipedia/commons';
On by default, using the subdirectories to split up the file set:
$wgHashedSharedUploadDirectory = true;
To load image data for shared images, you'll also need to specify the database name (all your wikis will need to use the same prefix, in separate databases on the same server, or I'm not sure this works):
$wgSharedUploadDBname = 'commonswiki';
I'm not sure if this made it into 1.5 or not, but you can optionally have it fetch the description page contents to show when you go to 'Image:Foo.jpg'. This might require additional configuration (appropriate interwiki table etc):
$wgFetchCommonsDescriptions = true;
Unfortunately I'm not sure any of the above is any clearer than the examples in the earlier message you quoted, but that's our settings...
-- brion vibber (brion @ pobox.com)
MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Yongho Kim wrote: [snip]
If this is the case, why is given language MediaWiki X (let's say the english installation) not provided with the MySQL user and password for the UploadDBname "commonswiki"?
It's accessed on the same database connection, so your DB user needs permissions on the shared database as well.
For instance, our MediaWiki installs at mpkb.net are structured as follows:
MySQL english wiki (/en) DB mpkbnet_wiki, prefix en_ (en_archive, en_brokenlinks, etc..) spanish wiki (/es) DB mpkbnet_wiki, prefix es_ (es_archive, es_brokenlinks) user for mpkbnet_wiki = mpkbnet_mpkbnet
If you're using prefixes, you may also need to set $wgSharedUploadDBprefix. (You did look in DefaultSettings.php for all the available settings, right?) I've never tested it with prefixes, so can't guarantee it'll work properly.
But still, I can't see how one wiki would be able to access DB information for the other "commons" wiki.
You can access as many databases on the server as you like, as long as the user has permissions for them.
-- brion vibber (brion @ pobox.com)
Can commons repository be used to upload a batch of images?
mediawiki-l@lists.wikimedia.org