Jump to content

Extension:WatchAnalytics

From mediawiki.org
This page is a translated version of the page Extension:WatchAnalytics and the translation is 40% complete.
Outdated translations are marked like this.
MediaWiki 拡張機能マニュアル
WatchAnalytics
リリースの状態: 安定
実装 特別ページ , 利用者アクティビティ , 通知
説明 Encourages good distribution of watchers
作者 James Montalvo,
Kris Field (Jamesmontalvo3トーク)
メンテナー Sanjay Thiyagarajan (User:Techwizzie)
最新バージョン 4.3 (2024年9月)
MediaWiki 1.38+
データベースの変更 はい
Composer mediawiki/watch-analytics
ライセンス MIT ライセンス
ダウンロード
README

  • $egWatchAnalyticsPageScoreNamespaces
  • $egPendingReviewsEmphasizeDays
  • $egPendingReviewsNumberWatchSuggestions
  • $egPendingReviewsShowWatchSuggestionsIfReviewsUnder
  • $egWatchAnalyticsWatchQualityColors
  • $egWatchAnalyticsReviewStatusColors

  • viewpagescore
  • clearreviews
  • pendingreviewslink
四半期ごとのダウンロード数 7 (Ranked 133rd)
translatewiki.net で翻訳を利用できる場合は、WatchAnalytics 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

WatchAnalytics 拡張機能は watchlist テーブルを利用して、個々のページとウィキ全体がどれだけよく守られているかの統計を表示し、また、放置されたページを見たりレビューしたりするように利用者を招待します。

さらに、この拡張機能をインターネットに公開されたWiki用に設定可能にすることは、現在のところほとんど考慮されていません。 すべての機能は企業での使用を念頭に置いて設計されており、この拡張機能を呼び出す前に、利用者のプライバシーを保護するための設定オプションが利用可能である必要があります。

Download

You can download version 4.3 in .zip format.

You can also download the code directly via Git from the MediaWiki source code repository. From a command line in the extensions/ directory, run the following:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WatchAnalytics

To view the code online, including version history for each file, go here: view WatchAnalytics code.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のWatchAnalyticsという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WatchAnalytics
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'WatchAnalytics' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  • お好みで設定を変更してください
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

使用法

Page scores

On each page in the main namespace (or any namespace added to the $egWatchAnalyticsPageScoreNamespaces variable) two scores are displayed near the heading which indicate how well the page is being watched in general (the "scrutiny") and the total number of people who have reviewed the latest version of the page. Clicking on these scores brings you to the PageStatistics special page.

Showing page scores added by Watch Analytics
Showing page scores added by Watch Analytics

Special:PageStatistics

Provides explanations of what "scrutiny" and "reviewers" mean. Below this it lists the page editors in order of number of revisions, who is watching the page, and whether or not they have reviewed the latest revision. At the bottom of the page it has a chart showing how many reviewers the page had at any given time in the past. In future versions this data will be used to determine an average length of time for the page to get n-reviewers, thus making it possible to find pages that tend to not be reviewed quickly.

Special:WatchAnalytics

The WatchAnalytics special page provides information about pages, users and the overall state of watchers on the wiki.

ページ情報

For pages it provides information like the number of people watching, the number people who have reviewed the latest revision, and the "watch quality" of the page. Watch quality refers to how well the watchers of the page do at quickly reviewing changes to the page. Right now the algorithm for this number is pretty poor, and in future uses it will hopefully provide better page scoring.

利用者情報

Provides similar information but for users. This includes how many pages the user is watching, how many pending reviews they have, how long their oldest review is, etc. This table can be filtered by user group and page category, which can be helpful to see how sub-organizations (e.g. creating a group type "Engineering") are doing at watching certain pages.

User-page relationship visualization

A D3.js force-directed graph showing how users are watching pages. Users are represented by orange dots around the outside, and pages are represented by blue dots. Lines between users and pages indicate that the user is watching the page. If the line is red it means that the user has not seen the most recent version of the page. Note that this visualization will not work well for very large wikis.

Watch analytics visualization
A D3.js force-directed graph showing the watch-relationship between users and pages.

Special:PendingReviews

This special page is a simplified version of Special:Watchlist. Special:Watchlist is very daunting for new editors and has a lot of unnecessary information even for seasoned editors. Pending Reviews shows which pages the user has not seen the latest version (of pages in the user's watchlist). These pages are prioritized by how important it is for the wiki to have the page reviewed, which right now is entirely determined by how many people have reviewed the page. In the future it will hopefully take into account revision scoring methods.

Approved Revs

If you have the Approved Revs extension installed, Special:PendingReviews will show pages needing approval below your pending reviews. Clicking on the pending approval will show you the diff between the current edit and the last approved version of the page. There is also an "approve" button which allows you to approve the page from the diff page.

Watch suggestions

利用者の保留中のレビューの一覧の下には、利用者が見るべき他のページの候補があります。これらは、利用者のウォッチリストにリンクされている、またはウォッチリストからリンクされているすべてのページを検索して決定されます。 これらのページは、ウォッチリストのページからのリンク数、現在のウォッチャーの数、ページのトラフィック量によってランク付けされます。したがって、ウォッチャーの数が少なく、トラフィックの多いページが高い優先順位を得られます。

Special:ClearPendingReviews

この特別ページでは 'clearreviews' 権限 (既定値: sysop) を持つ利用者が、カテゴリおよび/またはページ名に基づいて、一定期間の保留レビューを消去できるようにします。これは管理者が大量のレビューを作成するReplaceTextを使用するようなウィキで行われるメンテナンスに便利でしょう。

メンテナンス スクリプト

forgivePendingReviews.php
used to clear reviews. This script has not been used by the author in a long time, and users should only execute it after backing up their database. Make sure it does what you want before using.
watchAnalyticsRecordState.php
records the user and page watch state (how many watchers, how many pending, etc).

addCategoryToWatchlist.php

Adds every page in a category (or categories) to a user's (or multiple users') watchlist. Called like: php addCategoryToWatchlist.php --usernames=Jamesmontalvo3,Darenwelsh --categories="List of ISS Spacewalks,Astronauts"

設定

変数
変数 既定 説明
$egWatchAnalyticsPageScoreNamespaces NS_MAIN, NS_TALK ページスコアを表示する名前空間を指定するための配列。
$egPendingReviewsEmphasizeDays 7 After how many days should the pending reviews link in the top-right become bigger and threateningly shake at the user. To disable this feature set this value to zero.
$egPendingReviewsNumberWatchSuggestions 20 How many pages to show in Pending Reviews. This should also be user-configurable.
$egPendingReviewsShowWatchSuggestionsIfReviewsUnder 5 When number of pending reviews is under this number, show Watch Suggestions. Set to zero to disable.
$egWatchAnalyticsWatchQualityColors "50" : "plaid",

"5" : "excellent",

"1.5" : "okay",

ページスコアの色付け方法を定義するために使用する配列。
$egWatchAnalyticsReviewStatusColors "5" : "excellent",

"3" : "okay"

ページスコアの色付け方法を定義するために使用する配列。
$egWatchAnalyticsPageCounter false
$egWatchAnalyticsShowUnreviewDiff true Set true to display page diff in yellow unreview banner on page. This makes it more obvious that a page is being reviewed when a user navigates to the page directly (not through Special:PendingReviews)
$egPendingReviewMaxDiffChar

$egPendingReviewMaxDiffRows

3500

15

Max number of Chars or Rows in a diff to show inline diff on Special:PendingReviews

利用者権限

  • To enable the Page Scores for users, they need to be granted the viewpagescore right (既定では管理者のみ有効です)。
  • To allow a user to clear reviews using Special:ClearPendingReviews, they need to be granted the clearreviews right (default: sysop).

Version history

  • 0.3.0 - 2015-07-01 - First officially numbered version
  • 1.0.0 - 2016-11-07 - Switch to extension.json; drop support for MW < 1.25
  • 2.0.0 - 2018-11-19 - Add Special:ClearPendingReviews; add pagination to Special:PendingReviews; open links in new tab; many bug fixes
  • 2.0.1 - 2018-11-27 - Make CSS configurable; bug fixes
  • 3.0.0 - 2019-02-24 - Show Approved Revs info in Special:PendingReviews; bug fixes
  • 3.1.0 - 2019-03-20 - Add diff to 'unreview' banner and Special:PendingReviews; bug fixes
  • 3.1.1 - 2019-03-22 - Improve diff display
  • 3.2.0 - 2020-06-12 - Add nav button during page review; remove $egWatchAnalyticsHidePrintScores; bug fixes
  • 4.0.0 - 2023-03-04 - Fix major bugs; minor UI update; replace deprecated hooks; translation added
  • 4.1.0 - 2023-03-29 - More bug fixes
  • 4.1.1 - 2023-09-14 - Remove (no-longer-working) #watchers_needed parser function; remove PHP entry point; bug fixes
  • 4.1.2 - 2023-11-06 - Get clearing of pending reviews working again; get addCategoryToWatchlist.php script working again; change from using PageContentSaveComplete hook to PageSaveComplete; remove dependence on jQuery UI; add support for DB prefix; i18n security fixes; general code cleanup
  • 4.2 - 2024-01-29 - Drop support for MW < 1.37; replace hardcoded English text with i18n messages; bug fixes
  • 4.3 - 2024-09-02 - Drop support for MW 1.37; fix for SQL querying with MW 1.42+; PHP 8 fixes; coding improvements

今後の検討課題

  • 利用者の個人設定を追加し、「保留レビュー」を使用するかどうかを選択できるようにする
  • 保留中のレビューに表示する結果の数を利用者が選択できるようにする
  • Allow disabling of the force-directed graph visualization (since it may not work with large wikis)