Extension:DynamicSidebar/zh
DynamicSidebar 发行状态: 稳定版 |
|
---|---|
实现 | 皮肤 , MyWiki |
描述 | Provides dynamic sidebars based on user pages, groups, and categories. |
作者 | Ryan Lane (Ryan lane留言) |
最新版本 | 1.1 (2020-05-12) |
兼容性政策 | 快照跟随MediaWiki发布。 master分支不向后兼容。 |
MediaWiki | 1.29+ |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下載 | |
|
|
季度下載量 | 71 (Ranked 68th) |
前往translatewiki.net翻譯DynamicSidebar扩展 | |
問題 | 开启的任务 · 报告错误 |
The DynamicSidebar extends the capabilities of the sidebar for logged in users. If allowed, users can add their own custom sidebars via the page "User:<username>/Sidebar". Administrators can add sidebars for groups, and userpage categories via the pages "MediaWiki:Sidebar/Group:<group>", and "MediaWiki:Sidebar/Category:<category>".
安裝
- 下载文件,并将解压后的
DynamicSidebar
文件夹移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/DynamicSidebar - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'DynamicSidebar' );
- 按需求配置。
- 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
配置
提供以下选项:
// 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 user-category based sidebars under MediaWiki:Sidebar/Category:<category>. (It will only show the sidebar if the category is set on the user page.)
// Default: 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;
用法
Custom user sidebars
$wgDynamicSidebarUseUserpages
must be enabled, then an administrator must add the following on the page "MediaWiki:Sidebar":
* USER-SIDEBAR
This string will be replaced with the user's 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
此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |