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
* Made FlaggedRevs specify files by sha1,timestamp to handle renames with no redirects. This makes them handled as well as templates in this regard. (bug 27836)
* Moved BeforeGalleryFindFile hook to proper place (don't trigger for non-NS_FILE titles)
* Removed unused mRevisionId field from ImageGallery
* Removed old hotfix from makeMediaLinkObj(); all the current callers would crash beforehand if the title was null anyway
* Updated hook docs (some prior params were missing)
* Broke some long lines and cleaned up some whitespace
* TODO: track file info in core rather than fr_fileSHA1Keys and ugly, duplicated, queries. This should be easy to do now.
Patch supplied by DieBuche (bug #27338) along with screenshot
demonstrating fix.
Took out fix for bug #27458 (“<gallery> has a white background now”)
since bug it conflicts with a fix for bug #26470.
Patch by DieBuche, who explains the CSS:
If the image height is lower than the line-height, the margin-top
is applied to the top of the line. a very short image will not
follow for 3-4px laters, thus leading to a bigger distance from
the top than it should be. vertical-align:text-top moves the
picture up, so this problem doesn't happen
I've not tested this, but DieBuche and Derk-Jan Hartman tested and
provided screenshots in the bug.
1. Adds a line css to actually fix Bug 3770 (Sorry, I had forgotten to paste it
there as well)
2. Fixes a problem, where the box size would be slighty higher if the image
thumb has a height of less than 8px
3. Normalize the calculation of the vertical padding to be exactly the same one
as the horizontal padding. (This is only relevant for unusually large
galleries, eg. previously it returned a not-exactly-square box if you specified
500px as both width and height)
Bug 3276. Patch by DieBuche, with style cleanups by me, plus a tweak
from comment 27 of the bug to fix spacing. This incidentally removes
the border around galleries, but this was hard to notice anyway, and
could be easily readded if desired. Tested in a few browsers, including
IE6, but more testing and/or input from CSS gurus would be appreciated.
Updates parser tests, including for Cite.
* (bug 25670) wfFindFile() now checks the namespace of the given title, only "File" and "Media" are allowed now
The problem with bug 19944 was that the cache in RepoGroup was holding a file with a Title that has its namespace set to NS_MEDIA; the cache is now only used for title with namespace set to NS_FILE.
Also modified ImageGallery to not call wfFindFile() on non-NS_FILE title; was obviously breaking the above fix.
* Fixed the formal parameter bloat in the file finding functions by making wfFindFile(), RepoGroup::findFile() and FileRepo::findFile() take an associative array of options instead of a rapidly growing collection of formal parameters. Maintained backwards compatibility for the $time parameter, which was the only one used in an extension.
* Took the advice of the todo comment on FileRepo::findFiles() and implemented a calling convention for specifying times (and other options)
* Removed the file object cache from Parser, redundant with the RepoGroup file cache
* Deleted clueless and non-functional LocalRepo::findFiles(). Does not respect redirects, deletion bitfields, or anything else nuanced about FileRepo::findFile(). Does not have the same calling convention as FileRepo::findFiles().