扩展:管理员链接
发行状态: 稳定版 |
|
|---|---|
| 实现 | 特殊页面, 函数钩, API |
| 描述 | Defines a special page, "AdminLinks", meant to serve as a "control panel" for administrators; and adds a link to this page to their "user links" |
| 作者 | Yaron Koren <yaron57@gmail.com> (Yaron Koren留言) |
| 最新版本 | 0.7.1 (2025年9月) |
| 兼容性政策 | master分支维持向后兼容。 |
| MediaWiki | 1.41+ |
| 数据库更改 | 否 |
| 许可协议 | GNU通用公眾授權條款2.0或更新版本 |
| 下載 | README |
| 示例 | The "Admin links" page for Discourse DB |
|
|
|
adminlinks |
|
| 前往translatewiki.net翻譯Admin Links扩展 | |
| 問題 | 开启的任务 · 报告错误 |
Admin Links is an extension to MediaWiki that defines a special page, Special:AdminLinks, that holds links meant to be helpful for wiki administrators; it is meant to serve as a "control panel" for the functions an administrator would typically perform in a wiki.
All users can view this page; however, for those with the adminlinks permission (sysops/administrators, by default), a link to the page also shows up in their Personal URLs, between "Talk" and "Preferences".
管理员链接为其他扩展提供一个钩子和API以便他们添加自己的链接或章节到这个页面。
You can see an example of this page with additional links and sections added by other extensions here.
MediaWiki自带“特殊:特殊页面”这个页面,列出了wiki上安装的所有扩展的特殊页面,这可能会让您想知道为什么还需要这样一个额外的“管理员链接”页面。 但是呢,有数个重要的不同点让“管理员链接”变得有用:
- "SpecialPages" holds links to every special page in the wiki, including many (such as Unused categories) that are not specifically helpful to administrators; "AdminLinks" attempts to link only to the administrator-specific ones
- "AdminLinks" can hold links to pages that are not special pages, such as the "Edit sidebar" page and documentation for various extensions
- Finally, the Admin Links extension puts a link to "AdminLinks" in administrators' personal tools, which makes things more convenient.
代码与下载
You can download the Admin Links code, in .zip format, here.
您也可以直接从MediaWiki源代码库通过Git下载代码。 在命令行界面,可以输入以下命令:
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AdminLinks.git
如需在线查阅代码(包含每个文件的版本历史),请前往: phab:diffusion/EADL/browse/master/
安裝
- 下载文件,并解压
AdminLinks文件夹到extensions/目录中。
开发者和代码贡献人员应改从Git安装此扩展,输入:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AdminLinks
- 請新增下列代码到您的LocalSettings.php文件的底部:
wfLoadExtension( 'AdminLinks' );
- 按需配置。
完成 – 請导航至您的wiki上的Special:Version,以验证此扩展已成功安装。
配置
如果您想让除了 'sysop' 组以外的成员在他们的导航链接中看到指向 AdminLinks 页面的链接,您也可以在它之后添加类似以下的内容:
$wgGroupPermissions['my-group']['adminlinks'] = true;
By default, links are separated by an interpunct (·) You can change this via the global variable $wgAdminLinksDelimiter; for example, to have links separated by a pipe, add the following:
$wgAdminLinksDelimiter = '|';
作者
Admin Links was written by Yaron Koren, reachable at yaron57@gmail.com.
版本历史
Admin Links is currently at version 0.7.1.
版本历史如下:
- 0.1 (2009-05-13) - Initial version
- 0.1.1 (2009-06-02) - Support for many languages added
- 0.1.2 (2009-09-09) - Support for many more languages added
- 0.1.3 (2010-07-12) - More links added; some section headers renamed
- 0.1.4 (2011-02-22) - Handling improved for MW 1.16+; link to Special:ListFiles added
- 0.1.5 (2011-10-10) - Handling improved for MW 1.17+; link to Special:Log added
- 0.1.6 (2012-01-06) - Support removed for MW < 1.16
- 0.1.7 (2012-11-12) - Handling improved for MW 1.18+; support removed for MW < 1.18
- 0.1.8 (2013-05-01) - Fix for ALItem::newFromPage()
- 0.2 (2014-05-30) - i18n messages moved into JSON files; grouping added for Special:AdminLinks within Special:SpecialPages
- 0.2.1 (2015-01-20) - Minor code fixes
- 0.2.2 (2015-06-24) - Support for Composer added; handling improved for MW 1.21+
- 0.2.3 (2016-06-07) - Fix for nonexistent special pages; support removed for MW < 1.23
- 0.3 (2018-05-24) - extension.json added
- 0.3.1 (2018-05-31) - Re-added accidentally-removed support for MW < 1.28; dedicated link to Special:CreateAccount added
- 0.4 (2020-01-16) - AdminLinks.php removed; support removed for MW < 1.28; link escaping improved
- 0.4.1 (2020-06-22) - Handling improved for MW 1.32+
- 0.4.2 (2021-06-08) - Handling improved for MW 1.35+
- 0.5 (2022-02-07) - Support removed for MW < 1.32; coding improvements
- 0.6 (2023-01-27) - Support removed for MW < 1.35; $wgAdminLinksDelimiter setting added; coding improvements
- 0.6.1 (2023-03-28) - Fix for display within Chameleon skin
- 0.6.2 (2023-08-21) - Updated hook handling; support removed for PHP 7.3
- 0.6.3 (2024-08-27) - Ignore, instead of displaying error for, nonexistent special pages; added "data-row-name" CSS attribute for each row
- 0.7 (2025-04-11) - Support removed for MW < 1.41; handling improved for MW 1.44+
- 0.7.1 (2025-09-25) - Handling further improved for MW 1.44+; added icon for Admin Links link in user actions dropdown
Admin Links 扩展提供的 API
为了让其他扩展能够向 AdminLinks 页面添加链接和分段(sections),它必须定义一个新的函数,并将其注册到“AdminLinks”钩子中。 See the AdminLinks hook manual for more info.
使用 Admin Links 的扩展
如果安装了某些扩展或皮肤,它们会在管理员链接页面添加链接。 See Category:AdminLinks extensions for the current list.
为本项目贡献一份力量
Bug 报告和功能请求
Send any bug reports and requests to Yaron Koren, at yaron57@gmail.com.
为本项目贡献修复补丁
If you found some bug and fixed it, or if you wrote code for a new feature, please create a patch by going to the "AdminLinks" directory, and typing:
git diff > descriptivename.patch
向 Yaron Koren 发送相关修复,并附带一些描述。
| 此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
- Stable extensions/zh
- Special page extensions/zh
- Hook extensions/zh
- API extensions/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- Extensions which add rights/zh
- SkinTemplateNavigation::Universal extensions/zh
- All extensions/zh
- Extensions included in Canasta/zh
- Extensions included in Miraheze/zh
- Extensions included in MyWikis/zh
- Extensions included in Open CSP/zh
- Extensions included in ProWiki/zh
- Extensions included in semantic::core/zh
