扩展:贡献得分
![]() 发行状态: 穩定版 |
|
---|---|
![]() |
|
实现 | 用户活动 , 特殊页面 , 解析器函数 |
描述 | 统计维基数据库中最高的用户贡献量。 |
作者 | Tim Laqua讨论 |
最新版本 | 1.26.0 (2021-02-08) |
MediaWiki | 1.33+ |
数据库更改 | 否 |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下載 | log |
示例 | |
$wgContribScoreIgnoreBots, $wgContribScoreIgnoreBlockedUsers, $wgContribScoreIgnoreUsernames, $wgContribScoresUseRealName, $wgContribScoreDisableCache, $wgContribScoreReports |
|
前往translatewiki.net翻譯Contribution Scores扩展 | |
問題 | 开启的任务 · 报告错误 |
贡献分数扩展统计维基数据库中最高的用户贡献量。它在诸如tranlatewiki.net这样的高度使用的维基上一样可以稳定工作。此扩展旨在用一个有趣的标准来衡量贡献者们到底做了多少贡献。
分数的计算方法是 编辑页面数 + 2 * (编辑数 - 编辑页面数)的平方根。
安裝
- 下载文件,并将其放置在您
extensions/
文件夹中的ContributionScores
目录内。 - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'ContributionScores' ); // Exclude Bots from the reporting - Can be omitted. $wgContribScoreIgnoreBots = true; // Exclude Blocked Users from the reporting - Can be omitted. $wgContribScoreIgnoreBlockedUsers = true; // Exclude specific usernames from the reporting - Can be omitted. $wgContribScoreIgnoreUsernames = []; // Use real user names when available - Can be omitted. Only for MediaWiki 1.19 and later. $wgContribScoresUseRealName = true; // Set to true to disable cache for parser function and inclusion of table. $wgContribScoreDisableCache = false; // Use the total edit count to compute the Contribution score. $wgContribScoreUseRoughEditCount = false; // Each array defines a report - 7,50 is "past 7 days" and "LIMIT 50" - Can be omitted. $wgContribScoreReports = [ [ 7, 50 ], [ 30, 50 ], [ 0, 50 ] ];
完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
致使用MediaWiki 1.35或更早版本的用户:
上面的说明介绍的是安装此扩展的新方法,它使用wfLoadExtension()
。
如果您需要在早期版本(MediaWiki 1.35和更早版本)中安装此扩展,而不是wfLoadExtension( 'ContributionScores' );
,您需要使用:
require_once "$IP/extensions/ContributionScores/ContributionScores.php";
Contribution score
The contribution score is computed using the following SQL formula:
page_count+SQRT(rev_count-page_count)*2
自定义
Appearance
默认使用下列CSS类型,但它们不是被定义的。你可以在你的"MediaWiki:Common.css"里定义它们:
.contributionscores-wrapper {
}
.contributionscores-title {
background-color: #aaa;
margin-bottom: 0px;
padding-left: .4em;
}
.contributionscores .header {
background-color: #ccc;
border-bottom: 1px solid #999;
font-weight: bold;
}
.contributionscores .odd {
background-color: #eee;
}
.contributionscores .header td {
padding-left: .2em;
padding-right: .2em;
}
.contributionscores .content {
padding-left: .2em;
padding-right: .2em;
}
在侧边栏加上一个链接
添加下面一行到MediaWiki:Sidebar
** Special:Contributionscores|contributionscores
用法
特殊页面
你将会有一个标题为“贡献得分”的特殊页面。
引用/嵌入
你可以使用下面的维基代码来在其他页面引用这个特殊页面:
{{Special:ContributionScores/<limit>/<days>/<options>}}
- 10 top contributors from the last 5 days
{{Special:ContributionScores/10/5}}
- 10 top contributors since the beginning of wiki
{{Special:ContributionScores/10/all}}
- 15 top contributors from the last 7 days, no tool links
{{Special:ContributionScores/15/7/notools}}
- 15 top contributors from the last 3 days, not sortable and no tool links
{{Special:ContributionScores/15/3/nosort,notools}}
#cscore
解析器函数的示例
Tim Laqua的贡献分数
{{#cscore:Tim Laqua|score}}
Tim Laqua的编辑数
{{#cscore:Tim Laqua|changes}}
Tim Laqua编辑的页面数
{{#cscore:Tim Laqua|pages}}
參見
![]() | 此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
Categories:
- Stable extensions/zh
- User activity extensions/zh
- Special page extensions/zh
- Parser function extensions/zh
- GPL licensed extensions/zh
- Extensions in Wikimedia version control/zh
- ParserFirstCallInit extensions/zh
- All extensions/zh
- Social tools/zh
- Extensions included in Canasta/zh
- Extensions included in Miraheze/zh
- Extensions included in WikiForge/zh
- Extensions included in WikiTide/zh
- Edit extensions/zh