Extension:SpamRegex
リリースの状態: 安定 |
|
|---|---|
| 実装 | 特別ページ |
| 説明 | 不要な表現をフィルタリングするための特別ページを追加する。 |
| 作者 | |
| 最新バージョン | 1.9 |
| MediaWiki | 1.43+ |
| データベースの変更 | はい |
| ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
| ダウンロード | |
|
|
| 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
spamregexuser right is given to a group that exists; by default this user right is given to thestaffuser group (which does not exist in a default MediaWiki installation).
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
使用法
- Special:SpamRegexに移動する
- ブロックするフレーズを"Phrase to block"ボックスに入力します。
- フレーズをブロックする理由を入力します。
- Select one or both of the available options: block phrase in page text & block phrase in summary (edit summaries, page move summaries)
- 「Block this phrase(このフレーズをブロックする)」ボタンを押す
Interoperability
SpamRegex also supports checking content submitted via the following extensions for spam:
- ArticleFeedbackv5 (AFTv5)
- Comments
- ProblemReports (ShoutWiki)
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.
関連項目
- Stable extensions/ja
- Special page extensions/ja
- GPL licensed extensions/ja
- Extensions in Wikimedia version control/ja
- Comments::isSpam extensions/ja
- EditFilter extensions/ja
- LoadExtensionSchemaUpdates extensions/ja
- MovePageCheckPermissions extensions/ja
- ProblemReportsContentCheck extensions/ja
- RenameUserComplete extensions/ja
- All extensions/ja
- Extensions by Fandom/ja
- Extensions by ShoutWiki/ja
- Spam management extensions/ja
