Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1112,9 +1112,10 @@ |
1113 | 1113 | |
1114 | 1114 | 'MonoBookTemplateToolboxEnd': Called by Monobook skin after toolbox links have |
1115 | 1115 | been rendered (useful for adding more) |
1116 | | -Note: this is only run for the Monobook skin. To add items to the toolbox |
1117 | | -for all 'SkinTemplate'-type skins, use the SkinTemplateToolboxEnd hook |
1118 | | -instead. |
| 1116 | +Note: this is only run for the Monobook skin. This hook is deprecated and |
| 1117 | +may be removed in the future. To add items to the toolbox you should use |
| 1118 | +the SkinTemplateToolboxEnd hook instead, which works for all |
| 1119 | +'SkinTemplate'-type skins. |
1119 | 1120 | $tools: array of tools |
1120 | 1121 | |
1121 | 1122 | 'NewRevisionFromEditComplete': called when a revision was inserted |
Index: trunk/extensions/MultiUpload/MultiUpload.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | $wgSpecialPageGroups['MultipleUpload'] = 'media'; |
37 | 37 | |
38 | 38 | // Hooked functions |
39 | | -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfMultiUploadToolbox'; |
| 39 | +$wgHooks['SkinTemplateToolboxEnd'][] = 'wfMultiUploadToolbox'; |
40 | 40 | $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'wfSpecialMultiUploadNav'; |
41 | 41 | |
42 | 42 | // Add the link to Special:MultipleUpload to all SkinTemplate-based skins for users with the 'upload' user right |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | return true; |
53 | 53 | } |
54 | 54 | |
55 | | -// Add the link to Special:MultipleUpload to the Monobook skin |
| 55 | +// Add the link to Special:MultipleUpload to SkinTemplate based skins |
56 | 56 | function wfMultiUploadToolbox( &$monobook ) { |
57 | 57 | wfLoadExtensionMessages( 'MultiUpload' ); |
58 | 58 | if ( isset( $monobook->data['nav_urls']['multiupload'] ) ) { |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | $wgHooks['ParserFirstCallInit'][] = 'SMWParserExtensions::registerParserFunctions'; |
209 | 209 | |
210 | 210 | if ( $smwgToolboxBrowseLink ) { |
211 | | - if ( version_compare( $wgVersion, '1.13', '>' ) ) { |
| 211 | + if ( version_compare( $wgVersion, '1.13', '>=' ) ) { |
212 | 212 | $wgHooks['SkinTemplateToolboxEnd'][] = 'smwfShowBrowseLink'; // introduced only in 1.13 |
213 | 213 | } else { |
214 | 214 | $wgHooks['MonoBookTemplateToolboxEnd'][] = 'smwfShowBrowseLink'; |
Index: trunk/extensions/Tasks/Tasks.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | $wgHooks['ArticleInsertComplete'][] = 'wfTasksExtensionArticleSaveComplete'; |
88 | 88 | $wgHooks['ArticleDeleteComplete'][] = 'wfTasksExtensionArticleDeleteComplete'; |
89 | 89 | $wgHooks['SpecialMovepageAfterMove'][] = 'wfTasksExtensionAfterMove'; |
90 | | -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfTasksExtensionAfterToolbox'; |
| 90 | +$wgHooks['SkinTemplateToolboxEnd'][] = 'wfTasksExtensionAfterToolbox'; |
91 | 91 | $wgHooks['ArticleViewHeader'][] = 'wfTaskExtensionHeaderHook'; |
92 | 92 | $wgHooks['EditPage::showEditForm:initial'][] = 'wfTaskExtensionEditFormInitialHook'; |
93 | 93 | $wgHooks['ParserTestTables'][] = 'wfTasksTestTables'; |
Index: trunk/extensions/Duplicator/Duplicator.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | function efDuplicator() { |
44 | 44 | global $wgHooks; |
45 | 45 | $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'efDuplicatorNavigation'; |
46 | | - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'efDuplicatorToolbox'; |
| 46 | + $wgHooks['SkinTemplateToolboxEnd'][] = 'efDuplicatorToolbox'; |
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
Index: trunk/extensions/WikiArticleFeeds/WikiArticleFeeds.php |
— | — | @@ -205,7 +205,11 @@ |
206 | 206 | |
207 | 207 | # Attach Hooks |
208 | 208 | $wgHooks['OutputPageBeforeHTML'][] = 'wfAddWikiFeedHeaders'; |
209 | | -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; |
| 209 | +if ( version_compare( $wgVersion, '1.13', '>=' ) ) { |
| 210 | + $wgHooks['SkinTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; // introduced in 1.13 |
| 211 | +} else { |
| 212 | + $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; |
| 213 | +} |
210 | 214 | $wgHooks['UnknownAction'][] = 'wfWikiArticleFeedsAction'; |
211 | 215 | $wgHooks['ArticlePurge'][] = 'wfPurgeFeedsOnArticlePurge'; |
212 | 216 | |
— | — | @@ -262,7 +266,7 @@ |
263 | 267 | |
264 | 268 | /** |
265 | 269 | * Adds the Wiki feed links to the bottom of the toolbox in Monobook or like-minded skins. |
266 | | - * Usage: $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; |
| 270 | + * Usage: $wgHooks['SkinTemplateToolboxEnd'][] = 'wfWikiArticleFeedsToolboxLinks'; |
267 | 271 | * @param QuickTemplate $template Instance of MonoBookTemplate or other QuickTemplate |
268 | 272 | */ |
269 | 273 | function wfWikiArticleFeedsToolboxLinks( $template ) { |
Index: trunk/extensions/LanguageSelector/LanguageSelector.php |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | if ( $wgLanguageSelectorLocation != LANGUAGE_SELECTOR_MANUAL && $wgLanguageSelectorLocation != LANGUAGE_SELECTOR_AT_TOP_OF_TEXT ) { |
174 | 174 | switch ( $wgLanguageSelectorLocation ) { |
175 | 175 | case LANGUAGE_SELECTOR_IN_TOOLBOX: |
176 | | - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfLanguageSelectorSkinHook'; |
| 176 | + $wgHooks['SkinTemplateToolboxEnd'][] = 'wfLanguageSelectorSkinHook'; |
177 | 177 | break; |
178 | 178 | default: |
179 | 179 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'wfLanguageSelectorSkinTemplateOutputPageBeforeExec'; |
Index: trunk/extensions/LanguageSelector/README |
— | — | @@ -74,8 +74,8 @@ |
75 | 75 | content. This is the default, but it looks quite ugly without extra CSS |
76 | 76 | rules applied. |
77 | 77 | ** LANGUAGE_SELECTOR_IN_TOOLBOX: inject a dropdown box at the bottom of the |
78 | | - toolbox in the sidebar. This only works with the MonoBook skin, or skins |
79 | | - explicitly supporting the MonoBookTemplateToolboxEnd hook. |
| 78 | + toolbox in the sidebar. This doesn't work in all skins, mostly in skin |
| 79 | + MonoBook, or skins explicitly supporting the SkinTemplateToolboxEnd hook. |
80 | 80 | ** LANGUAGE_SELECTOR_AS_PORTLET: inject the language selector as a portlet |
81 | 81 | in the sidebar, similar to how interlanguage-links are shown. |
82 | 82 | Works with MonoBook skin, may also work with some SkinTemplate-based skins. |
Index: trunk/extensions/EmailPage/EmailPage.php |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | if ( isset( $_REQUEST['ea-send'] ) ) require_once( $wgPhpMailerClass ); |
49 | 49 | |
50 | 50 | # Add toolbox and action links |
51 | | -if ( $wgEmailPageToolboxLink ) $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfEmailPageToolboxLink'; |
| 51 | +if ( $wgEmailPageToolboxLink ) $wgHooks['SkinTemplateToolboxEnd'][] = 'wfEmailPageToolboxLink'; |
52 | 52 | if ( $wgEmailPageActionLink ) $wgHooks['SkinTemplateTabs'][] = 'wfEmailPageActionLink'; |
53 | 53 | |
54 | 54 | function wfEmailPageToolboxLink() { |
Index: trunk/extensions/Contributors/Contributors.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | $wgHooks['ArticleSaveComplete'][] = 'efContributorsInvalidateCache'; |
51 | 51 | # Good god, this is ludicrous! |
52 | 52 | $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'efContributorsNavigation'; |
53 | | - $wgHooks['MonoBookTemplateToolboxEnd'][] = 'efContributorsToolbox'; |
| 53 | + $wgHooks['SkinTemplateToolboxEnd'][] = 'efContributorsToolbox'; |
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | } |
204 | 204 | } |
205 | 205 | |
206 | | - if (version_compare($wgVersion,'1.13','>')) { |
| 206 | + if (version_compare($wgVersion,'1.13','>=')) { |
207 | 207 | $wgHooks['SkinTemplateToolboxEnd'][] = 'mvAddToolBoxLinks'; // introduced only in 1.13 |
208 | 208 | } else { |
209 | 209 | $wgHooks['MonoBookTemplateToolboxEnd'][] = 'mvAddToolBoxLinks'; |
Index: trunk/extensions/Wikidata/misc/FundButton.php |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | |
5 | 5 | global $wgHooks; |
6 | 6 | |
7 | | -$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfFundHook'; |
| 7 | +$wgHooks['SkinTemplateToolboxEnd'][] = 'wfFundHook'; |
8 | 8 | |
9 | 9 | function wfFundHook() { |
10 | 10 | $msg = <<<ENDHTML |
— | — | @@ -32,4 +32,4 @@ |
33 | 33 | echo( $msg ); |
34 | 34 | return true; |
35 | 35 | } |
36 | | -?> |
\ No newline at end of file |
| 36 | +?> |