Manual:Hooks/BeforeGalleryFindFile

From MediaWiki.org

Jump to: navigation, search
BeforeGalleryFindFile
Available from version 1.10.1
Allows extensions to specify a specific version of an image to display in a gallery.

*Define function:
function fnMyHook($imagegallery, $title, $time) { ... }

*Attach hook:
$wgHooks['BeforeGalleryFindFile'][] = 'fnMyHook';
Called from: ImageGallery.php

*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:BeforeGalleryFindFile extensions.


[edit] Details

$imagegallery - The ImageGallery object.
$title - The title object of the image.
$time - The time the image was uploaded.

To specify a specific instance of the file to use in the gallery, an extension must set the $title and the $time to correct values for a revision of the file.

Personal tools