Extension:SpamRegex

This page is a translated version of the page Extension:SpamRegex and the translation is 67% complete.
MediaWiki 拡張機能マニュアル
SpamRegex
リリースの状態: 安定
実装 特別ページ
説明 不要な表現をフィルタリングするための特別ページを追加する。
作者
最新バージョン 1.8
MediaWiki 1.39+
データベースの変更 はい
ライセンス GNU 一般公衆利用許諾書 2.0 以降
ダウンロード
  • spamregex
Quarterly downloads 3 (Ranked 141st)
Public wikis using 1,117 (Ranked 252nd)
translatewiki.net で翻訳を利用できる場合は、SpamRegex 拡張機能の翻訳にご協力ください
問題点 未解決のタスク · バグを報告

SpamRegex拡張機能は、不要なリンクやテキストをフィルタリングするために新しいページSpecial:SpamRegexを作成します。 現在ブロックされているリンクやテキストの全リストは、この同じ特設ページで見ることができます。 The spamregexed expressions cannot be used in page content, edit summaries or page move summaries, depending on what was chosen by the user who blocked links or text.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のSpamRegexという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamRegex
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'SpamRegex' );
    
  • 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
  • この拡張機能はGlobal/LocalSettings.php を使用しています - MemcachedがGlobal/LocalSettings.php で適切に設定されているかどうか確認してください。
  • Ensure the spamregex user right is given to a group that exists; by default this user right is given to the staff user group (which does not exist in a default MediaWiki installation).
  •   完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

使用法

  1. Special:SpamRegexに移動する
  2. ブロックするフレーズを"Phrase to block"ボックスに入力します。
  3. フレーズをブロックする理由を入力します。
  1. Select one or both of the available options: block phrase in page text & block phrase in summary (edit summaries, page move summaries)
  1. 「Block this phrase(このフレーズをブロックする)」ボタンを押す

Interoperability

SpamRegex also supports checking content submitted via the following extensions for spam:

Note that none of these extensions use the ContentHandler or Content classes defined in MediaWiki core, for better or for worse.

See the hooked functions in /extensions/SpamRegex/includes/backend/SpamRegexHooks.php for an idea of how to add support for another custom extension. The basic idea is simple: get the desired data from SpamRegex (call SpamRegex::fetchRegexData() with either SpamRegex::TYPE_TEXTBOX or SpamRegex::TYPE_SUMMARY as the parameter), ensure that you got something, iterate over the array and use PHP's preg_match() to detect a match. In case of a match, signal this to the consumer code by e.g. returning a boolean so that the consumer knows that the submission is spam and should not be saved.

関連項目