Last modified: 2009-12-15 10:23:16 UTC
It would be nice to have a hook at the end of the sidebar so extensions can add adverts for example. This would only be in Monobook as other skins use a different layout, they can be added for other skins in a different bug report.
Created attachment 3323 [details] Patch for this issue
Created attachment 3324 [details] ok this should work, but it still doesn't load in to BugZilla how I want ;(
Comment on attachment 3324 [details] ok this should work, but it still doesn't load in to BugZilla how I want ;( Documentation is incorrect.
Comment on attachment 3324 [details] ok this should work, but it still doesn't load in to BugZilla how I want ;( >Index: /docs/hooks.txt >=================================================================== >--- /docs/hooks.txt (revision 20260) >+++ /docs/hooks.txt (working copy) >@@ -416,6 +416,9 @@ > $mathRenderer: instance of MathRenderer > $errmsg: error message, in HTML (string). Nonempty indicates failure > of rendering the formula >+ >+'MonobookSkinSidebarEnd': at end of sidebar in Monobook page >+$this is an instance of the monobook skin > > 'OutputPageBeforeHTML': a page has been processed by the parser and > the resulting HTML is about to be displayed. >/skins/MonoBook.php >=================================================================== >--- /skins/MonoBook.php (revision 20260) >+++ /skins/MonoBook.php (working copy) >@@ -242,6 +242,7 @@ > </div> > </div> > <?php } ?> >+ wfRunHooks( 'MonoBookSkinSidebarEnd', array( &$this ) ); > </div><!-- end of the left (by default at least) column --> > <div class="visualClear"></div> > <div id="footer">
Comment on attachment 3324 [details] ok this should work, but it still doesn't load in to BugZilla how I want ;( Index: /docs/hooks.txt =================================================================== --- /docs/hooks.txt (revision 20260) +++ /docs/hooks.txt (working copy) @@ -416,6 +416,9 @@ $mathRenderer: instance of MathRenderer $errmsg: error message, in HTML (string). Nonempty indicates failure of rendering the formula + +'MonobookSkinSidebarEnd': at end of sidebar in Monobook page +$this: Code to be executed 'OutputPageBeforeHTML': a page has been processed by the parser and the resulting HTML is about to be displayed. Index: C:/Program Files/xampp/htdocs/mw/skins/MonoBook.php =================================================================== --- /skins/MonoBook.php (revision 20260) +++ /skins/MonoBook.php (working copy) @@ -242,6 +242,7 @@ </div> </div> <?php } ?> + wfRunHooks( 'MonoBookSkinSidebarEnd', array( &$this ) ); </div><!-- end of the left (by default at least) column --> <div class="visualClear"></div> <div id="footer">
Can the new SkinBuildSidebar hook (http://www.mediawiki.org/wiki/Manual:Hooks/SkinBuildSidebar) be usefult for this?
(In reply to comment #6) > Can the new SkinBuildSidebar hook > (http://www.mediawiki.org/wiki/Manual:Hooks/SkinBuildSidebar) be usefult for > this? > Yes. The hook allows you to add new items to the sidebar or inject arbitrary HTML. Marking this FIXED.