On 10/26/14, Ricordisamoa ricordisamoa@openmailbox.org wrote:
There is the ImagePageFileHistoryLine https://www.mediawiki.org/wiki/Manual:Hooks/ImagePageFileHistoryLine hook already, but it is for data rows only. Any help appreciated. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Well if you want to be really hacky, you can do something like:
onImagePageFileHistoryLine( $this, $file, &$row, &$rowClass ) { if ( /* some condition that I want to insert header here */ ) { $row .= '<th>header col 1</th><th>header col 2</th>...</tr><tr>'; } return true; }
Since the $row variable is considered raw html to insert between a <tr>,</tr> pair.
Alternatively you could hook into ArticleFromTitle, replace ImagePage with some subclass which overrides imageHistory method, then possibly make some different subclass of ImageHistoryPseudoPager which overrides getBody() method.
If neither of those two methods work for you, we could perhaps introduce a new hook. However I think I would recommend the ArticleFromTitle hook class overriding method if possible.
--bawolff