Last modified: 2012-10-21 15:47:47 UTC
I'd appreciate if there could be hook added after each portlet so one can easily add another portlet in extensions on pretty much any place. Also hook for very beginning might be handy.
So say something like:
<div id="p-cactions" class="portlet">...</div>
<div class="portlet" id="p-personal">...</div>
<div class="portlet" id="p-logo">...</div>
<div class='generated-sidebar portlet' id='p-navigation'>...</div>
<div id="p-search" class="portlet">...</div>
<div class="portlet" id="p-tb">...</div>
<div id="p-lang" class="portlet">...</div>
I am not perfectly familiar with hooks, so maybe this can be done via BeforePortletsHook and general AfterPortletHook while one can get the current portlet from some variable or so.
However any solution for simple adding of portlets would be very handy.
It would be more desireable to have a generalised interface for modifying the skin, the sheer number of hooks that would be required for this makes it look like a unmaintainable solution. There would also be the problem of interfacing with other skins, due to the extreme differences between monobook-based skins and the older skins such as cologne blue makes it difficult to integrate skin hooks within all the skins. Skin hooks are probably entirely undesireable as they do not really belong there and instead within contruction methods, if the skinning system was ever to be modified.
Wontfixing. This is impossible the way you describe, since you can modify every aspect of the sidebar using MediaWiki:Sidebar, including removing, reordering and adding portlets.
There is, however, the SkinBuildSidebar hook, which apparently allows you to do anything to the sidebar after it is generated from MediaWiki:Sidebar, including reordering and inserting items (although it requires some PHP hackery). (Maybe it wasn't there in 2008.)
There is also BaseTemplateToolbox for when you just want some new links in the toolbox.
Welp, I forgot the link.