Rob,
I only need this to include the images of my own wiki.
In the end I found in Image.php this method:
$hash = md5($image);
$url = $wgUploadPath.'/'.$subdir.'/' . $hash{0} . '/' .
substr( $hash, 0, 2 ) . '/'.$image;
This works fine.
Again, thanks for your answer,
Nanda
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Rob Church
Sent: donderdag 16 februari 2006 12:42
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Information about Hashed Upload Directory
If you were to "include" the special page, with parameters, then you'd end
up including the image. Aevar's extension sends a Location header if it
finds the image.
Slapping in
http://commons.wikimedia.org/w/index.php?title=Special:Filepath/Fitz_Roy_1.j
pg
as the SRC attribute of an IMG tag gives that photo, for instance, so usage
would be quite flexible.
Just a brief note: Please *don't* use this method to include a lot of image
from Wikimedia wikis or the Commons. As it happens, Erik Moeller and I have
conversed a mite on the subject of something which *would* allow any wiki,
anywhere, to transparently use our images while caching them locally. And in
fact, I reckon this extension could be a useful springboard for that, so I
think I'll go email him now...
Rob Church
On 13/02/06, N Jansen <njansen(a)natuurlijk.nl> wrote:
Thanks, this works. But, the problem is that I would
like to use a lot
of Images in another website.
>From the database the only information I can get is the name of the
images:
For example:
2006_Olympics_Opening_Ceremony.jpg
Now I would like to know the directory information of the images. In
this
case: 5/5a.
http://upload.wikimedia.org/wikipedia/en/5/5a/2006_Olympics_Opening_Ce
remony
.jpg
Nanda
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Rob Church
Sent: zondag 12 februari 2006 15:02
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Information about Hashed Upload Directory
Special:Filepath special page, an extension of Avar's. See
http://en.wikipedia.org/wiki/Special:Filepath.
Rob Church
On 12/02/06, N Jansen <njansen(a)natuurlijk.nl> wrote:
I would like to know the directory information of
a given Image.
For example. This is the Image:
http://upload.wikimedia.org/wikipedia/en/5/5a/2006_Olympics_Opening_
Ce
remony
.jpg
I only have this information:
Image:2006_Olympics_Opening_Ceremony.jpg
How can I get the directory structure: 5/5a?
Nanda
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l