New VectorAfterToolbox and VectorBeforeFooter hooks
Example use case: the ShoutWiki Ads extension Change-Id: I0eadf18b9a20147a097729f5f8053cfc65594553
This commit is contained in:
parent
29561ff4d1
commit
6807fdeffc
|
@ -195,6 +195,7 @@ class VectorTemplate extends BaseTemplate {
|
||||||
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
|
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php Hooks::run( 'VectorBeforeFooter' ); ?>
|
||||||
<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
|
<div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
|
||||||
<?php
|
<?php
|
||||||
foreach ( $this->getFooterLinks() as $category => $links ) {
|
foreach ( $this->getFooterLinks() as $category => $links ) {
|
||||||
|
@ -271,6 +272,7 @@ class VectorTemplate extends BaseTemplate {
|
||||||
break;
|
break;
|
||||||
case 'TOOLBOX':
|
case 'TOOLBOX':
|
||||||
$this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );
|
$this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );
|
||||||
|
Hooks::run( 'VectorAfterToolbox' );
|
||||||
break;
|
break;
|
||||||
case 'LANGUAGES':
|
case 'LANGUAGES':
|
||||||
if ( $this->data['language_urls'] !== false ) {
|
if ( $this->data['language_urls'] !== false ) {
|
||||||
|
|
11
hooks.txt
11
hooks.txt
|
@ -4,3 +4,14 @@ Hooks provided by the Vector skin.
|
||||||
loaded by the Vector skin.
|
loaded by the Vector skin.
|
||||||
$skin: SkinVector object
|
$skin: SkinVector object
|
||||||
&$styles: Array of module names whose style will be loaded for the skin
|
&$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.
|
Loading…
Reference in New Issue