Manual:Hooks/BeforeGalleryFindFile

From MediaWiki.org
Jump to: navigation, search
BeforeGalleryFindFile
Available from version 1.10.1
Removed in version 1.18.0
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'][] = 'MyExtensionHooks::someExample';
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
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox