User:Austin J. Che/Extensions/UserSidebar

From OpenWetWare

< User:Austin J. Che | Extensions(Difference between revisions)
Jump to: navigation, search
Current revision (11:34, 17 November 2007) (view source)
 
(2 intermediate revisions not shown.)
Line 1: Line 1:
==Per-user customizable sidebar==
==Per-user customizable sidebar==
-
This extension allows each user to have a customized sidebar by editing [[Special:Mypage/sidebar|User:Username/sidebar]]. The format of the file is identical to that of the site-wide [http://meta.wikimedia.org/wiki/Help:Navigation_bar sidebar].
+
This extension allows each user to have a customized sidebar by editing [[Special:Mypage/sidebar|User:Username/sidebar]]. The format of the file is identical to that of the site-wide [http://www.mediawiki.org/wiki/Manual:Navigation_bar sidebar].
In addition, it is possible to include other files, so it may be useful to include <nowiki>{{MediaWiki:Sidebar}}</nowiki> 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.
In addition, it is possible to include other files, so it may be useful to include <nowiki>{{MediaWiki:Sidebar}}</nowiki> 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.
Line 13: Line 13:
----
----
Send bugs and comments to [[Austin Che]]. Other extensions including  sources can be found at [[../]].
Send bugs and comments to [[Austin Che]]. Other extensions including  sources can be found at [[../]].
 +
 +
[[category:Extensions]]

Current revision

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.

Personal tools