Last modified: 2012-10-21 15:47:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13676 - Hooks request after/before portlets
Hooks request after/before portlets
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-09 23:42 UTC by Danny B.
Modified: 2012-10-21 15:47 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Danny B. 2008-04-09 23:42:38 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:

BeforePortletsHook
<div id="p-cactions" class="portlet">...</div>
AfterCactionsPortletHook
<div class="portlet" id="p-personal">...</div>
AfterPersonalPortletHook
<div class="portlet" id="p-logo">...</div>
AfterLogoPortletHook
<div class='generated-sidebar portlet' id='p-navigation'>...</div>
AfterNavigationPortletHook
<div id="p-search" class="portlet">...</div>
AfterSearchPortletHook
<div class="portlet" id="p-tb">...</div>
AfterTbPortletHook
<div id="p-lang" class="portlet">...</div>
AfterLangPortletHook

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.
Comment 1 Robert Leverington 2008-04-10 14:53:20 UTC
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.
Comment 2 Bartosz Dziewoński 2012-10-21 15:46:01 UTC
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[1], 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.
Comment 3 Bartosz Dziewoński 2012-10-21 15:47:47 UTC
Welp, I forgot the link.

[1] https://www.mediawiki.org/wiki/Manual:Hooks/SkinBuildSidebar

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links