扩展:贡献得分

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:Contribution Scores and the translation is 53% complete.

Other languages:
English • ‎português • ‎中文 • ‎日本語 • ‎한국어
MediaWiki扩展手册
OOjs UI icon advanced.svg
Contribution Scores
发布状态: 稳定版
ContributionScores.png
实现 User activity, Special page, Parser function
描述 投票维基数据库的最高用户贡献量。
作者 Tim Laquatalk
最新版本 1.25.0 (2016-02-17)
MediaWiki 1.25+
数据更新
许可协议 未指定许可协议
下载
log
例子 mixesdb.com,
translatewiki.net
参数
$wgContribScoreIgnoreBots, $wgContribScoreIgnoreBlockedUsers, $wgContribScoresUseRealName, $wgContribScoreDisableCache, $wgContribScoreReports
使用的钩子
ParserFirstCallInit
User
翻译Contribution Scores扩展如果在translatewiki.net可用
检查使用和版本矩阵。
问题 开放的工作 · 报告错误

The Contribution Scores extension polls the wiki database to locate contributors with the highest contribution volume – it is also in stable use on a high-volume wiki such as translatewiki.net. The extension is intended to add a fun metric for contributors to see how much they are helping out.

分数的计算方法是 编辑页面数 + 2 * (编辑数 - 编辑页面数)的平方根。

安装

  • 下载文件,并将其放置在您extensions/文件夹中的ContributionScores目录内。
  • 将下列代码放置在您的LocalSettings.php的底部:
    require_once "$IP/extensions/ContributionScores/ContributionScores.php";
    $wgContribScoreIgnoreBots = true;          // Exclude Bots from the reporting - Can be omitted.
    $wgContribScoreIgnoreBlockedUsers = true;  // Exclude Blocked Users from the reporting - Can be omitted.
    $wgContribScoresUseRealName = true;        // Use real user names when available - Can be omitted. Only for MediaWiki 1.19 and later.
    $wgContribScoreDisableCache = false;       // Set to true to disable cache for parser function and inclusion of table.
    
    //Each array defines a report - 7,50 is "past 7 days" and "LIMIT 50" - Can be omitted.
    $wgContribScoreReports = array(
        array(7,50),
        array(30,50),
        array(0,50));
    
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。

用法

特殊页面

你将会有一个标题为“贡献得分”的特殊页面。

Inclusion/Transclusion

You can include this special page in to other pages using the following wikitext:

{{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}}

自定义

The following CSS classes are used, but NOT defined - you can define them in your MediaWiki:Common.css article:

.contributionscores-wrapper       {  }
.contributionscores-title         { background-color: #aaaaaa; margin-bottom: 0px; padding-left: .4em; }
.contributionscores .header { background-color: #cccccc; border-bottom: 1px solid #999999; font-weight: bold; }
.contributionscores .odd        { background-color: #eeeeee; }
.contributionscores .header td   { padding-left: .2em; padding-right: .2em; }
.contributionscores .content   { padding-left: .2em; padding-right: .2em; }

#cscore Parser Function Examples

Contribution Score for Tim Laqua

{{#cscore:Tim Laqua|score}}

Changes Made for Tim Laqua

{{#cscore:Tim Laqua|changes}}

Unique Pages Edited for Tim Laqua

{{#cscore:Tim Laqua|pages}}

在侧边栏加上一个链接

Edit MediaWiki:Sidebar and add the line

** Special:Contributionscores|contributionscores

参见