User:Austin J. Che/Extensions/UserSidebar

From OpenWetWare
Revision as of 15:40, 14 May 2006 by Austin J. Che (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Per-user customizable sidebar

This extension allows each user to have a customized sidebar by editing User:Username/sidebar. The format of the file is identical to that of the site-wide sidebar.

In addition, it is possible to include other files, so it may be useful to include {{MediaWiki:Sidebar}} to get the site default sidebar and any changes that may be added to it in the future. This inclusion mechanism also allows groups of links to be put together on a separate page so that people can include it if they choose into their sidebar.

Implementation

This extension is extraordinarily hacky but is the best I could do using an extension and not modifying the base MediaWiki code. It uses two hooks which don't really have anything to do with the sidebar but happen to surround the sidebar code. It disables the message cache for the code between those hooks so if any messages have been customized and don't show up, that's probably why.

It is possible to do the same thing as this extension (actually more) using client javascript as described here. However, this extension makes it easier to do the common things one wishes to do and looks better without the javascript changing everything after the page loads.


Send bugs and comments to Austin Che. Other extensions including sources can be found at User:Austin J. Che/Extensions.