Extension:PageTriage/ja

PageTriage拡張機能は、新しく作成された記事をトリアージするための機能豊富なインターフェイスを提供します. It is intended to replace the new page patrol core function while adding additional functionality for reviewing, tagging, and improving new articles. It adds a Special:NewPagesFeed page, and a page curation toolbar to new pages for those with the 'patrol' permission. It was developed by the Wikimedia Foundation's Features Engineering team. For additional details see Page Curation.

An important note is that some of the configuration and code is specific to the English-language Wikipedia's workflows and as it's constructed now the extension is pretty much impossible to internationalize. (T50552 を参照してください. )

インストール
To actually see the extension working:


 * 被ログインユーザーとして新しいスタブページを追加.
 * Special:NewPagesFeedをご覧ください

The new page should appear, flagged as "", "", etc. ページキュレーションツールバーを見るには :


 * Login as a user with the 'sysop' permission, or add a group with the "patrol" permission, and add some user to that group, and login as that user.
 * Special:NewPagesFeedをご覧ください
 * Now you should see a "" button next to the new page.
 * Click this and you should see the page curation toolbar on the new page.



拡張機能の設定
拡張機能は「巡回」権限に基づいています. 巡回の設定については、を参照してください.

The following configuration variables can be set from your LocalSettings.php file:

See extension.json for the full list of config variables.



wiki上の設定
It is possible to configure much of PageTriage on-wiki via the pages  and , although the structure of the configuration may change in the future (to better accommodate wikis besides English Wikipedia).

You can get a general idea of how the configuration works by looking at the following:

Both of these files operate in much the same way.

There are two top-level jQuery variables that define the curation templates that are listed in the curation toolbar under the (add tags) and  (nominate for deletion) buttons. これら :

The 'Main' and 'User' refer to the namespace of the page being curated. Each sub-item in the three sets above defines the tabs shown at the left side of the toolbar, and has the following form:

Then the actual templates that are listed are defined under the above  variable. Each deletion template has the following form:

At the moment, some tags must be present:



例
So, if you don't want to use any of the built-in deletion templates (which can be imported from NewPagesFeed_Templates.xml, by the way) then you can replace them all with a single one by adding the following at the bottom of your  page:



クライアント側のフック
PageTriage provides a specialized action queue system to allow other scripts and gadgets to integrate with it. This is similar to  except that it uses promises. This is done using the  module. See the comments in the for documentation on how the system works.

The actionQueue module is available after the mw.hook  fires. PageTriage will give the action queue handler an Object with the following data, in addition to other data as noted below:


 * — レビューするページのID.
 * — 名前空間を含むページ名.
 * — PageTriageを使用している利用者の利用者名.
 * — ページ作成者の利用者名.
 * — Whether or not the page is currently or will be marked as reviewed.



利用できる操作

 * — Fired when the reviewer tags a page for deletion. The data given to the handler also includes:
 * — An object of all the templates added to the page. The keys are the template title, and the values are an object of metadata, including things like the speedy deletion code.
 * — Fired when the review status of a page is changed. Also includes:
 * — The personal message the reviewer added for the creator of the page. This may be blank.
 * — Fired when maintenance tags are added to the page. Also includes:
 * — An array of the titles of all templates that were added to the page.
 * — The personal message the reviewer added for the creator of the page. This may be blank.

例
操作のクエリを使うには、上記の操作により発動する関数を登録します. PageTriage は非同期のコードの入力を待って操作を終わらせてから、その他の操作すなわちページの再読み込みなどを実行します. たとえば査読済みとマークされたサンドボックスを編集する場合は次の構文を使います.

API
PageTriage adds the following API endpoints which can be used:


 * - 当該のページに査読の有無をマーク
 * - Retrieves the list of pages in the queue, and each page's metadata, including their reviewed status. To retrieve one page, you must provide the page_id. To provide multiple pages, you must select one of showreviewed/showunreviewed, and one of showredirs/showdeleted/showothers, or no pages will be returned.
 * - クエリで検知したページの一覧と最も活発な査読者の統計を取得
 * - Mark an article as a potential copyright violation.
 * - Add clean-up tags or deletion templates to a page.

Special:Log
The following logs are created by the extension:

Status codes
There are status codes used to track whether a page is reviewed or not. These are the values given when you query,  , and  :


 * Unreviewed
 * 0 - unreviewed
 * Reviewed
 * 1 - reviewed (someone clicked the green check mark in the Page Curation toolbar)
 * 2 - patrolled (someone clicked the "Mark as patrolled" link at the bottom right corner of a page)
 * 3 - autopatrolled (someone with the  user right created the page, or moved the page from a non-tracked namespace to a tracked namespace)
 * no result - will occur if the page is not in a tracked namespace (mainspace, userspace, and draftspace), if the article was created before PageTriage was installed, or if the article was reviewed for longer than 30 days (these records are deleted by a cron job)

Via the API
To check the review status of pages using an API query, you can use, and check the   field. Follow the directions above to interpret the values of this field.

Sample JavaScript code:

Via SQL
To check the review status of pages using an SQL query, you need to query the  table and the   field. Follow the directions above to interpret the values of this field.

NOINDEX
NOINDEX refers to the HTML code, which can be inserted into a page to stop the page from appearing in search engine results. In default installations of MediaWiki, all pages are indexed unless they contain the wikicode. When is set to true, PageTriage will take over deciding what pages are indexed.

In regards to the requirement "Page is in  table", there are several ways a for a page to get into this table:
 * If the wikitext has the  magic word, noindex the page if ALL of the following are true:
 * Page age is less than
 * Page is in  table
 * If the wikitext doesn't have the  magic word, noindex the page if ALL of the following are true:
 * is turned on
 * Page age is less than
 * Page is in  table
 * Page is marked as unpatrolled (ptrp_status = 0)
 * Not been deleted by a PageTriage cron job
 * One cron job deletes redirects older than days old (default 180 days as of Sep 2022), regardless of patrol status
 * Another cron job deletes reviewed pages after 30 days of being reviewed
 * In a namespace that PageTriage is configured to patrol
 * Isn't an article that is so old it predates the installation of PageTriage



関連項目

 * commons:Category:PageTriage extension