Extension:DynamicSidebar

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg
DynamicSidebar

Release status:Extension status stable

Extension DynamicSidebar example.png
ImplementationTemplate:Extension#type Skin, MyWiki
DescriptionTemplate:Extension#description Provides dynamic sidebars based on user pages, groups, and categories.
Author(s)Template:Extension#username Ryan Lane (Ryan lanetalk)
Latest versionTemplate:Extension#version 1.1 (2017-07-17)
MediaWikiTemplate:Extension#mediawiki 1.25+
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
ParametersTemplate:Extension#parameters
* $wgDynamicSidebarUseUserpages
  • $wgDynamicSidebarUseGroups
  • $wgDynamicSidebarUseCategories
Hooks usedTemplate:Extension#hook
DebugManual:Hooks/Debug
SkinBuildSidebarManual:Hooks/SkinBuildSidebar
User

Translate the DynamicSidebar extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

The DynamicSidebar extends the capabilities of the sidebar for logged in users. If allowed, users can add their own custom sidebars via "User:<username>/Sidebar". Administrators can add sidebars for groups, and userpage categories via "MediaWiki:Sidebar/Group:<group>", and "MediaWiki:Sidebar/Category:<category>".

Installation[edit]

  • Download and place the file(s) in a directory called DynamicSidebar in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'DynamicSidebar' );
    
  • Configure as required.
  • YesY Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'DynamicSidebar' );, you need to use:

require_once "$IP/extensions/DynamicSidebar/DynamicSidebar.php";

Configuration[edit]

The following options are available:

// Enable debugging
$wgDebugLogGroups["dynamic-sidebar"] = "/tmp/sidebar-debug.txt";

// Allow users to create their own custom sidebars under User:<username>/Sidebar
// Default: true
$wgDynamicSidebarUseUserpages = true;

// Allow group sidebars under MediaWiki:Sidebar/Group:<group>
// Default: true
$wgDynamicSidebarUseGroups = true;

// Allow category based sidebars under MediaWiki:Sidebar/Category:<category>
// Default: true
$wgDynamicSidebarUseCategories = true;

Usage[edit]

Custom user sidebars[edit]

$wgDynamicSidebarUseUserpages must be enabled, then an administrator must add the following in "MediaWiki:Sidebar":

* USER-SIDEBAR

This string will be replaced with the user's sidebar.

Users should add their sidebar to "User:<username>/Sidebar".

Group sidebars[edit]

$wgDynamicSidebarUseGroups must be enabled, then an administrator must add the following in "MediaWiki:Sidebar":

* GROUP-SIDEBAR

This string will be replaced with the user's group sidebars.

Administrators must add a sidebar for each group at "MediaWiki:Sidebar/Group:<group>". If a user is in multiple groups, sidebars will be shown for each group.

Category sidebars[edit]

$wgDynamicSidebarUseCategories must be enabled, then an administrator must add the following in "MediaWiki:Sidebar":

* CATEGORY-SIDEBAR

This string will be replaced with the sidebars of the categories on the user's userpage.

Administrators must add a sidebar for each category at "MediaWiki:Sidebar/Category:<category>". If a user's userpage has multiple categories, sidebars will be shown for each category. Users can add sidebars by adding a category to their userpage.

See Also[edit]