[MediaWiki-commits] [Gerrit] Added two hooks for ad integration - change (mediawiki...Metrolook)
Paladox has submitted this change and it was merged. Change subject: Added two hooks for ad integration .. Added two hooks for ad integration An additional extension, such as [[mw:Extension:ShoutWiki Ads]], can contain all the actual logic and CSS for displaying ads, but we still need a few hook points here so that we can insert the ads in the correct locations. Technically speaking I guess even the #mw-panel-right HTML could be offloaded to the advertising extension, but I don't see an empty div doing much harm to anyone. An example implementation is PidgiWiki (http://www.pidgi.net/wiki/Main_Page), which is actually running an older version of Metrolook. We don't want to bundle any ad code with Metrolook itself, as such code would likely be site-specific as well as outside the scope of what a skin should provide. Change-Id: I7d93d304776b1f8c5bf274e89b29a9988d570fc2 --- M MetrolookTemplate.php M hooks.txt 2 files changed, 17 insertions(+), 2 deletions(-) Approvals: Paladox: Looks good to me, approved diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index e864641..ce60255 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -544,8 +544,14 @@ ?> - printTrail(); ?> + + + + printTrail(); ?> renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' ); + // Hook point for the ShoutWiki Ads extension + Hooks::run( 'MetrolookAfterToolbox', array( $this ) ); break; case 'LANGUAGES': if ( $this->data['language_urls'] !== false ) { diff --git a/hooks.txt b/hooks.txt index f226ef3..f59618d 100644 --- a/hooks.txt +++ b/hooks.txt @@ -1,6 +1,13 @@ Hooks provided by the Metrolook skin. +'MetrolookAfterToolbox': Called after the toolbox (#p-tb) has been rendered +$tpl: MetrolookTemplate object + +'MetrolookRightPanel': Called inside div#mw-panel-right; can be used to populate +that div element with ad HTML, for example. +$tpl: MetrolookTemplate object + 'SkinMetrolookStyleModules': Called when defining the list of module styles to be -loaded by the Vector skin. +loaded by the Metrolook skin. $skin: SkinMetrolook object &$styles: Array of module names whose style will be loaded for the skin \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/224736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d93d304776b1f8c5bf274e89b29a9988d570fc2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Metrolook Gerrit-Branch: master Gerrit-Owner: Jack Phoenix Gerrit-Reviewer: Paladox Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added two hooks for ad integration - change (mediawiki...Metrolook)
Jack Phoenix has uploaded a new change for review. https://gerrit.wikimedia.org/r/224736 Change subject: Added two hooks for ad integration .. Added two hooks for ad integration An additional extension, such as [[mw:Extension:ShoutWiki Ads]], can contain all the actual logic and CSS for displaying ads, but we still need a few hook points here so that we can insert the ads in the correct locations. Technically speaking I guess even the #mw-panel-right HTML could be offloaded to the advertising extension, but I don't see an empty div doing much harm to anyone. An example implementation is PidgiWiki (http://www.pidgi.net/wiki/Main_Page), which is actually running an older version of Metrolook. We don't want to bundle any ad code with Metrolook itself, as such code would likely be site-specific as well as outside the scope of what a skin should provide. Change-Id: I7d93d304776b1f8c5bf274e89b29a9988d570fc2 --- M MetrolookTemplate.php M hooks.txt 2 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Metrolook refs/changes/36/224736/1 diff --git a/MetrolookTemplate.php b/MetrolookTemplate.php index e864641..ce60255 100644 --- a/MetrolookTemplate.php +++ b/MetrolookTemplate.php @@ -544,8 +544,14 @@ ?> - printTrail(); ?> + + + + printTrail(); ?> renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' ); + // Hook point for the ShoutWiki Ads extension + Hooks::run( 'MetrolookAfterToolbox', array( $this ) ); break; case 'LANGUAGES': if ( $this->data['language_urls'] !== false ) { diff --git a/hooks.txt b/hooks.txt index f226ef3..f59618d 100644 --- a/hooks.txt +++ b/hooks.txt @@ -1,6 +1,13 @@ Hooks provided by the Metrolook skin. +'MetrolookAfterToolbox': Called after the toolbox (#p-tb) has been rendered +$tpl: MetrolookTemplate object + +'MetrolookRightPanel': Called inside div#mw-panel-right; can be used to populate +that div element with ad HTML, for example. +$tpl: MetrolookTemplate object + 'SkinMetrolookStyleModules': Called when defining the list of module styles to be -loaded by the Vector skin. +loaded by the Metrolook skin. $skin: SkinMetrolook object &$styles: Array of module names whose style will be loaded for the skin \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/224736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d93d304776b1f8c5bf274e89b29a9988d570fc2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Metrolook Gerrit-Branch: master Gerrit-Owner: Jack Phoenix ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits