{{Extension
|name        = SidebarEx
|status      = stable
|type        = mywiki
|author      = [[user:jldupont|Jean-Lou Dupont]]
|image       =
|version     = 1.0.0
|update      =
|mediawiki   = 1.82, 1.93, 1.10, 1.11
|download    = [http://mediawiki.googlecode.com/svn/tags/ SVN]
|readme      =
|changelog   = See SVN ($Id: SidebarEx.doc.wikitext 524 2007-10-11 20:13:21Z jeanlou.dupont $)
|description = 
|parameters  =
|rights      =
|example     =
}}
== Purpose ==
Provides a means of adding page links to the 'sidebar' based on group membership & per-user basis.

== Features ==
* Can be used independantly of BizzWiki environment
* all defined groups are supported (standard MW and ones defined in installation)
* sidebar page name corresponds to 'group' name
* No patches to standard MW installation for MW version >= 1.10
* Group name prioritization
* Per-User sidebars using 'username/Sidebar' page
* Per-Namespace sidebars using 'MediaWiki:Sidebar/Ns/...namespace name here...'

== Usage Note ==
This extension replaces the standard sidebar defined at [[MediaWiki:Sidebar]]. The new default sidebar
is located at [[MediaWiki:Sidebar/*]].

== DEPENDANCY ==
* ExtensionClass extension (>v1.5)
** Tested Compatibility:  MW 1.10
** Patches for MW 1.8.x and MW 1.9.x available

=== Parameters ===
<source lang='php'>
//Define (if desired) the base namespace where the pages will be fetched:
$bwSidebarNs = NS_ADMIN;  // must be defined prior, defaults to 'NS_MEDIAWIKI'
 
//Define (if desired) the base page where the 'sidebar' pages will be fetched:
$bwSidebarPage = 'Sidebars';

// Define the priority list i.e. group membership search order.
$bwSidebarSearch = array ('somegroup', 'sysop', 'user', '*' );
</source>

== INSTALLATION NOTES ==
=== Group membership based sidebars ===
<pre>
 Add to LocalSettings.php:
 
 1) Define (if desired) the base namespace where the pages will be fetched:
    $bwSidebarNs = NS_ADMIN;  // must be defined prior
 
 2) Define (if desired) the base page where the 'sidebar' pages will be fetched:
    $bwSidebarPage = 'Sidebars';
 
 3) Define the priority list i.e. group membership search order.
    $bwSidebarSearch = array ('somegroup', 'sysop', 'user', '*' );
 
    Corresponding sidebar pages:
		MediaWiki:Sidebar/somegroup
		MediaWiki:Sidebar/sysop
		MediaWiki:Sidebar/user
		MediaWiki:Sidebar/*
 
 4) Include the required scripts: 
  require("extensions/ExtensionClass.php");
  require("extensions/SidebarEx/SidebarEx.php");
</pre>
=== Per-User sidebars ===
Edit the page 'User:username/Sidebar'.

=== Per-Namespace sidebars ===
Examples:
* MediaWiki:Sidebar/Ns/Main
* MediaWiki:Sidebar/Ns/Category
* ...

{{Pear|SidebarEx}}

== History ==
* Corrected bug with article validity checking (e.g. affects BizzWiki fresh installs)
* Moved singleton invocation to address some PHP warning
* Added 'per-user' sidebars
* Added 'per-namespace' sidebars
* Fix for PHP warning when NS_MAIN is not defined (Thanks Dr DBW)
