(bug 34852) new optional 'link' parameter to <gallery>
authorKim Eik <kim@heldig.org>
Tue, 10 Apr 2012 10:30:17 +0000 (12:30 +0200)
committerKim Eik <kim@heldig.org>
Mon, 16 Apr 2012 08:09:31 +0000 (10:09 +0200)
commit0a5278266790a6fb4a197aa1e0fbf415075b2297
tree4117e5d7e302fe02be9f9e4dcd954966ce0f4c86
parentdd69dbe2517e96b6181419723159c8d2e7f3db1f
(bug 34852) new optional 'link' parameter to <gallery>

The patch adds an optional parameter |link= to the <gallery>
tag. This will allow for images to link to other pages and
externals urls instead of being hardlinked to the image file
that is displayed in the gallery.

Here are a couple of examples.

Link as WikiLink:
<gallery>
File:20120106_001.jpg|link=Main_Page
</gallery>

Link as absolute URI:
<gallery>
File:20120106_001.jpg|my caption|alt=my alt
text|link=http://bugzilla.wikimedia.org
</gallery>

this would cause the link on the thumbnails rendered by the gallery tag to link
to a custom page/url instead of the actual media/image.

a link should be an internal wiki link or an absolute uri as shown in the examples.

Change-Id: I21b276ad5c7a8df13b3a716957d23fd53c37d29e
includes/ImageGallery.php
includes/parser/Parser.php
tests/parser/parserTests.txt