From: Bryan Tong Minh Date: Sat, 7 Nov 2009 09:31:16 +0000 (+0000) Subject: Add hook ImagePageAfterImageLinks for showing extra information on the image page... X-Git-Tag: 1.31.0-rc.0~38927 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=d3fe87c552e346f89ed9cd175f12ace164015d1e;p=lhc%2Fweb%2Fwiklou.git Add hook ImagePageAfterImageLinks for showing extra information on the image page after the imagelinks --- diff --git a/docs/hooks.txt b/docs/hooks.txt index 3ce13b471d..cbf84d78c6 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -834,6 +834,11 @@ $title: Title object, pages linked to this title are purged. $imagePage: ImagePage object ($this) $output: $wgOut +'ImagePageAfterImageLinks': called after the image links section on an image + page is built +$imagePage: ImagePage object ($this) +&$html: HTML for the hook to add + 'ImagePageFileHistoryLine': called when a file history line is contructed $file: the file $line: the HTML of the history line diff --git a/includes/ImagePage.php b/includes/ImagePage.php index d1fa75c468..c42c736a77 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -132,6 +132,12 @@ class ImagePage extends Article { # Yet we return metadata about the target. Definitely an issue in the FileRepo $this->imageRedirects(); $this->imageLinks(); + + # Allow extensions to add something after the image links + $html = ''; + wfRunHooks( 'ImagePageAfterImageLinks', array( $this, &$html ) ); + if ( $html) + $wgOut->addHTML( $html ); if( $showmeta ) { global $wgStylePath, $wgStyleVersion;