[Mediawiki-l] Function to get imagepath by wiki-imagename?
robchur at gmail.com
Mon Mar 13 20:51:32 UTC 2006
Call the built-in Image class functions. Given a title like
"Image:Foo.png", do something like...
$title = Title::newFromText( $text );
$image = new Image( $title );
...then use the accessors, e.g. $image->getUrl() etc. to access it.
On 13/03/06, Kraus, Alexander (KBV) <AKraus at kbv.de> wrote:
> I'm writing an extension to display an linked image within an article.
> Usualy any displayed image in mediawiki ist linked to its own article.
> I need to display images what are linked to an other article - for example Main_Page.
> My problem is, that i like to use the common wiki imagename as a parameter and I don't know how to get the image's path by its name.
> For exapmle:
> The question is, how to get the location (path) of the image represented by 'Image:Imagename.png'.
> Is there any function to get the path, by Imagename or something similar?
> thanks in advance
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
More information about the MediaWiki-l