Extension:貢献スコア

From mediawiki.org
This page is a translated version of the page Extension:Contribution Scores and the translation is 100% complete.
MediaWiki 拡張機能マニュアル
Contribution Scores
リリースの状態: 安定
実装 利用者アクティビティ , 特別ページ , パーサー関数
説明 データベースから貢献度が高い利用者を検索します。
作者 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 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

拡張機能 貢献スコアは、ウィキのデータベースを調査して、貢献度の高い貢献者を検索します。 この拡張機能は、利用者がウィキにどれだけ貢献しているかを確認するための楽しい指標を追加することを目的としています。

スコアは、(編集されたユニークページ数)+2×平方根((編集数)-(編集されたユニークページ数))で計算します。

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のContributionScoresという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/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 ]
    ];
    
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

MediaWiki 1.35以前を稼働させている利用者へ:

上記の手順では、wfLoadExtension()を使用してこの拡張機能をインストールする新しい方法を記載しています。 この拡張機能をこれらの過去のバージョン (MediaWiki 1.35以前) にインストールする必要がある場合は、wfLoadExtension( 'ContributionScores' );の代わりに以下を使用する必要があります:

require_once "$IP/extensions/ContributionScores/ContributionScores.php";

貢献スコア

貢献スコアは次のSQL式で計算します。

page_count+SQRT(rev_count-page_count)*2

カスタマイズ

外観

以下の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

使用法

特別ページ

「貢献スコア」(Contribution Scores)というタイトルの新しい特別ページが作成されます

インクルージョン/参照読み込み

この特別ページは、以下のwikitextを使って、他のページに組み込むことができます。

{{Special:ContributionScores/<limit>/<days>/<options>}}

過去5日間の上位10名の貢献度

{{Special:ContributionScores/10/5}}

Wikiの全期間の上位10人の貢献者

{{Special:ContributionScores/10/all}}

過去7日間の上位15人の貢献者、ツールリンクなし

{{Special:ContributionScores/15/7/notools}}

過去3日間の上位15人の貢献者、並び替え不可、ツールリンクなし

{{Special:ContributionScores/15/3/nosort,notools}}

#cscore パーサ関数の例

ティム・ラクアの貢献度スコア

{{#cscore:Tim Laqua|score}}

ティム・ラクアの変更点

{{#cscore:Tim Laqua|changes}}

Tim Laquaのために編集されたユニークなページ

{{#cscore:Tim Laqua|pages}}

関連項目