From 3e996679d9619e13b422879d8a2a055dcb2813c4 Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Wed, 30 Apr 2008 10:17:51 +0000 Subject: [PATCH] (bug 13584) New hook: SkinTemplateToolboxEnd --- RELEASE-NOTES | 1 + docs/hooks.txt | 6 ++++++ skins/Modern.php | 5 +++-- skins/MonoBook.php | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c41d10a76c..3a0d2a9d02 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -95,6 +95,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 889) Improve conflict-handling between shared upload repository and local one * Update documentation links in auto-generated LocalSettings.php +* (bug 13584) The new hook SkinTemplateToolboxEnd was added. === Bug fixes in 1.13 === diff --git a/docs/hooks.txt b/docs/hooks.txt index 886190b60b..5b02bfff47 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -791,6 +791,9 @@ $title: title of the message (string) $message: value (string), change it to the message you want to define 'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have been rendered (useful for adding more) +Note: this is only run for the Monobook skin. To add items to the toolbox +for all 'SkinTemplate'-type skins, use the SkinTemplateToolboxEnd hook +instead. $tools: array of tools 'OutputPageBeforeHTML': a page has been processed by the parser and @@ -1005,6 +1008,9 @@ $checkEdit: Whether or not the action=edit query should be added if appropriate. $sktemplate: SkinTemplate object $content_actions: array of tabs +'SkinTemplateToolboxEnd': Called by SkinTemplate skins after toolbox links have been rendered (useful for adding more) +$tools: array of tools + 'SpecialContributionsBeforeMainOutput': Before the form on Special:Contributions $id: User identifier diff --git a/skins/Modern.php b/skins/Modern.php index 9377cbffb8..433d14bd31 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -224,8 +224,9 @@ class ModernTemplate extends QuickTemplate { } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?> - + + wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); +?> diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 4774e20ee1..c97eea8eb6 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -223,6 +223,7 @@ class MonoBookTemplate extends QuickTemplate { } wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) ); + wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) ); ?> -- 2.20.1