[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: New VectorAfterToolbox and VectorBeforeFooter hooks
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/330935 ) Change subject: New VectorAfterToolbox and VectorBeforeFooter hooks .. New VectorAfterToolbox and VectorBeforeFooter hooks Example use case: the ShoutWiki Ads extension Change-Id: I0eadf18b9a20147a097729f5f8053cfc65594553 --- M VectorTemplate.php M hooks.txt 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Isarra: Looks good to me, approved diff --git a/VectorTemplate.php b/VectorTemplate.php index 5b27141..6e3495d 100644 --- a/VectorTemplate.php +++ b/VectorTemplate.php @@ -195,6 +195,7 @@ renderPortals( $this->data['sidebar'] ); ?> + html( 'userlangattributes' ) ?>> getFooterLinks() as $category => $links ) { @@ -271,6 +272,7 @@ break; case 'TOOLBOX': $this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' ); + Hooks::run( 'VectorAfterToolbox' ); break; case 'LANGUAGES': if ( $this->data['language_urls'] !== false ) { diff --git a/hooks.txt b/hooks.txt index 6ba9de6..84ca7fe 100644 --- a/hooks.txt +++ b/hooks.txt @@ -4,3 +4,14 @@ loaded by the Vector skin. $skin: SkinVector object &$styles: Array of module names whose style will be loaded for the skin + +'VectorAfterToolbox': Called after rendering the toolbox portlet (div#p-tb). +You can use this to inject items (such as ads or a hit counter, for example) +from an extension. +This is the Vector couterpart to the MonoBookAfterToolbox hook in the MonoBook +skin. + +'VectorBeforeFooter': Called before the footer (div#footer) is output, but after +div#mw-navigation has been closed. +You can use this to inject items (such as ads or a hit counter, for example) +from an extension. \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/330935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0eadf18b9a20147a097729f5f8053cfc65594553 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Jack PhoenixGerrit-Reviewer: Isarra Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: New VectorAfterToolbox and VectorBeforeFooter hooks
Jack Phoenix has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/330935 ) Change subject: New VectorAfterToolbox and VectorBeforeFooter hooks .. New VectorAfterToolbox and VectorBeforeFooter hooks Example use case: the ShoutWiki Ads extension Change-Id: I0eadf18b9a20147a097729f5f8053cfc65594553 --- M VectorTemplate.php M hooks.txt 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector refs/changes/35/330935/1 diff --git a/VectorTemplate.php b/VectorTemplate.php index 5b27141..6e3495d 100644 --- a/VectorTemplate.php +++ b/VectorTemplate.php @@ -195,6 +195,7 @@ renderPortals( $this->data['sidebar'] ); ?> + html( 'userlangattributes' ) ?>> getFooterLinks() as $category => $links ) { @@ -271,6 +272,7 @@ break; case 'TOOLBOX': $this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' ); + Hooks::run( 'VectorAfterToolbox' ); break; case 'LANGUAGES': if ( $this->data['language_urls'] !== false ) { diff --git a/hooks.txt b/hooks.txt index 6ba9de6..84ca7fe 100644 --- a/hooks.txt +++ b/hooks.txt @@ -4,3 +4,14 @@ loaded by the Vector skin. $skin: SkinVector object &$styles: Array of module names whose style will be loaded for the skin + +'VectorAfterToolbox': Called after rendering the toolbox portlet (div#p-tb). +You can use this to inject items (such as ads or a hit counter, for example) +from an extension. +This is the Vector couterpart to the MonoBookAfterToolbox hook in the MonoBook +skin. + +'VectorBeforeFooter': Called before the footer (div#footer) is output, but after +div#mw-navigation has been closed. +You can use this to inject items (such as ads or a hit counter, for example) +from an extension. \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/330935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0eadf18b9a20147a097729f5f8053cfc65594553 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Vector Gerrit-Branch: master Gerrit-Owner: Jack Phoenix___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits