User:Egingell/Uber Sidebar

Description edit

  • Add dynamic content to the sidebar. This is not really an extension, it's more of a replacement.

Change Log edit

  • Special pages produced an error when attempting to fetch the User's Sidebar. This has been fixed.

Features edit

  • Dynamic User Links
    • Pulls sidebar formatted data from User:{username}/Sidebar and adds it to the sidebar.
  • Namespace Based Links
    • Pulls sidebar formatted data from MediaWiki:Sidebar{namespace number} and adds it to the sidebar.
  • Category Links
    • Adds "Category" section complete with links to the article's categories.
  • Category Page Links
    • Adds "Sub Categories", "Articles in Category", and "Images in Category" sections complete with their respective content.
  • Sorting
    • Sorts sections alphabetically (leaving the first section always first).
    • Sorts links alphabetically.
  • Conditionals
    • use the following to create conditionals base on permissions in $wgGroupPermissions:
      • Note: Quotation marks (") in {section header or target}(|{text}) will kill the statement. Use MediaWiki:{msg} whenever you need to use them.
*(*) if ? ({permission type}) "{section header or target}(|{text})" ?

example (only show a link to MediaWiki:Sidebar if the user can edit the interface):

** if ? (editinterface) "MediaWiki:Sidebar|Sidebar" ?

Instructions edit

  • Edit includes/Skin.php


if ( ! defined( 'MEDIAWIKI' ) )
    die( 1 );


if ( ! defined( 'MEDIAWIKI' ) )
    die( 1 );

// Use a modded version of the Skin class
if (is_file('includes/LocalSkin.php')) {
    $localSkin = 'includes/LocalSkin.php';
} else if (is_file('LocalSkin.php')) {
    $localSkin = 'LocalSkin.php';
if ($localSkin) {

See Also edit


Known Issues edit

There are no known issues at this time. --Egingell (talk) 12:42, 4 August 2007 (UTC)