Extension:LinkFilter

From mediawiki.org
This page is a translated version of the page Extension:LinkFilter and the translation is 22% complete.
MediaWiki 拡張機能マニュアル
LinkFilter
リリースの状態: 安定
実装 特別ページ
説明 Adds some new special pages and a parser hook for link submitting/approval/reject
作者
最新バージョン 3.5.0 (2017-07-11)
MediaWiki 1.39+
データベースの変更 はい
テーブル link
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
  • $wgLinkPageDisplay
  • $wgLinkFilterTypes
  • linkadmin
Quarterly downloads 1 (Ranked 144th)
translatewiki.net で翻訳を利用できる場合は、LinkFilter 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

LinkFilter is an extension to allow users to submit news (etc.) links and wiki admins/other privileged users to approve them.

In addition to the new special pages, LinkFilter also provides ‎<linkfilter> parser hook tag.

New special pages

  • Special:LinkSubmit
  • Special:LinkApprove (available to users with linkadmin right)
  • Special:LinkEdit (redirects to LinkSubmit form, allowing to edit the link details, target etc.)
  • Special:LinksHome
  • Special:LinkRedirect

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のLinkFilterという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LinkFilter
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'LinkFilter' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
    • If a pre-r90829 version of SocialProfile extension is installed on the wiki, you'll need to patch the existing user_stats table by running patch-columns_for_user_stats.sql against it (try php maintenance/sql.php extensions/LinkFilter/patch-columns_for_user_stats.sql from command line)
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

設定

  • $wgLinkFilterTypesan array of link types that will be available in the dropdown menu on Special:LinkSubmit. If this is not defined, LinkFilter will use the defaults in Link::$link_types. The defaults are the same as Link::$link_types currently:
$wgLinkFilterTypes = array(
	1 => 'Arrest Report',
	2 => 'Awesome',
	3 => 'Cool',
	4 => 'Funny',
	6 => 'Interesting',
	7 => 'Obvious',
	8 => 'OMG WTF?!?',
	9 => 'Rumor',
	10 => 'Scary',
	11 => 'Stupid',
);
  • $wgLinkPageDisplaynot really a configuration variable per se. Used to display different stuff on LinkFilter pages. For example, setting $wgLinkPageDisplay['in_the_news'] = true; will display "In the News" section on Special:LinksHome.

カスタマイズ

You can edit the general instructions displayed to everyone on Special:LinkSubmit by editing MediaWiki:Linkfilter-instructions.

Admins instructions can be edited through MediaWiki:Linkfilter-admin-instructions.

利用者権限

The extension adds one new user right, linkadmin. Users with this right are able to use LinkFilter's administrative functions, such as approve/reject links. By default, linkadmin, staff and sysop groups have this right.