Extension:DynamicSidebar

This page is a translated version of the page Extension:DynamicSidebar and the translation is 54% complete.
MediaWiki 拡張機能マニュアル
DynamicSidebar
リリースの状態: 安定
実装 外装 , 自分のウィキ
説明 利用者ページ、グループ、カテゴリに基づいた動的なサイドバーを提供する。
作者 Ryan Lane (Ryan laneトーク)
最新バージョン 1.1 (2020-05-12)
互換性の方針 MediaWiki とともにリリースされるスナップショット。 master には後方互換性がありません。
MediaWiki 1.29+
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
  • $wgDynamicSidebarUseUserpages
  • $wgDynamicSidebarUseCategories
  • $wgDynamicSidebarUsePageCategories
  • $wgDynamicSidebarUseGroups
Quarterly downloads 75 (Ranked 77th)
translatewiki.net で翻訳を利用できる場合は、DynamicSidebar 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

DynamicSidebar は、ログインしている利用者のサイドバーの機能を拡張します。 許可されている場合、利用者は「User:<username>/Sidebar」ページを介して独自のカスタム サイドバーを追加できます。 管理者は、「MediaWiki:Sidebar/Group:<group>」と「MediaWiki:Sidebar/Category:<category>」のページを介して、グループや利用者ページのカテゴリのためのサイドバーを追加できます。

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のDynamicSidebarという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/DynamicSidebar
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'DynamicSidebar' );
    
  • 必要に応じて設定します。
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

設定

以下のオプションを利用できます:

// デバッグを有効にする
$wgDebugLogGroups['dynamic-sidebar'] = '/tmp/sidebar-debug.txt';

// 利用者が User:<username>/Sidebar で自身のカスタム サイドバーを作成できるようにする
// 既定値: true
$wgDynamicSidebarUseUserpages = true;

// MediaWiki:Sidebar/Group:<group> でグループ サイドバーを使用できるようにする
// 既定値: true
$wgDynamicSidebarUseGroups = true;

// MediaWiki:Sidebar/Category:<category> でサイドバーに基づいたカテゴリを使用できるようにする (It will only show the sidebar if the category is set on the user page.)
// 既定値: true
$wgDynamicSidebarUseCategories = true;

// Allow category based sidebars under MediaWiki:Sidebar/Category:<category> (will only show the sidebar if the category is set on the page).
// Default: false
$wgDynamicSidebarUsePageCategories = true;

使用法

カスタムの利用者サイドバー

$wgDynamicSidebarUseUserpages を有効にしてから、管理者がページ「MediaWiki:Sidebar」に以下のように追加する必要があります:

* USER-SIDEBAR

この文字列は、利用者のサイドバーに置換されます。

Users should define their sidebar on the page "User:<username>/Sidebar".

Group sidebars

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

* GROUP-SIDEBAR

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

Administrators must add a sidebar for each group on the page "MediaWiki:Sidebar/Group:<group>". If a user is in multiple groups, sidebars will be shown for each group. The group name listed here should be as expressed in LocalSettings.php, so "MediaWiki:Sidebar/Group:sysop", not "MediaWiki:Sidebar/Group:Administrator" or "MediaWiki:Sidebar/Group:Administrators".

Category sidebars

$wgDynamicSidebarUseCategories must be enabled to allow Users to add sidebars to pages based on the category set in their own user page.

$wgDynamicSidebarUsePageCategories must be enabled to allow Users to add sidebars to pages based on the category set in the page.

Then an administrator must add the following on the page "MediaWiki:Sidebar":

* CATEGORY-SIDEBAR

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

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 or directly by adding a category in the page.

起こりうる問題点

If the Dynamic sidebar doesn't appear or the menu is not collapsible then you need install the CollapsibleVector (link below):

See also