(Translated by https://www.hiragana.jp/)
Extension:SpamRegex/zh - MediaWiki

Extension:SpamRegex/zh

This page is a translated version of the page Extension:SpamRegex and the translation is 0% complete.
MediaWiki扩展しゅさつ
SpamRegex
发行じょう态: 稳定ばん
实现 特殊とくしゅ页面
描述 Adds a special page to filter out unwanted expressions.
作者さくしゃ
最新さいしん版本はんぽん 1.8
MediaWiki 1.39+
かずすえ更改こうかい これ
许可协议 GNU通用つうようこう眾授けんじょう款2.0ある更新こうしん版本はんぽん
した
  • spamregex
りょう 6 (Ranked 127th)
せいざい使用しようてきおおやけ开wikiすう 1,117 (Ranked 252nd)
ぜん往translatewiki.net翻譯ほんやくSpamRegex扩展
問題もんだい 开启てきにん · 报告错误

The SpamRegex extension creates a new page, "Special:SpamRegex", to filter out unwanted links or text. A full list of currently blocked links or text can be viewed on this same special page. 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.


  • しもぶんけん,并将かい压后てきSpamRegexぶんけん夹移动到extensions/录中。
    开发しゃ和代かずよ码贡けんじじん员应从Gitあんそう扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamRegex
  • はたしも列代れつだい放置ほうちざい您的LocalSettings.php てき底部ていぶ
    wfLoadExtension( 'SpamRegex' );
    
  • 运行更新こうしん脚本きゃくほん,它将动创けん此扩てん必须依赖的すうすえ库表。
  • This extension uses Memcached - please check if Memcached is configured properly in 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).
  • Yes 完成かんせいざい您的wikiじょう导航いたりSpecial:Version,以验证已成功せいこうやすそう扩展。

Usage

  1. Go to "Special:SpamRegex"
  1. Enter the phrase to be blocked into the "Phrase to block" box
  1. Supply a reason for blocking the phrase
  1. Select one or both of the available options: block phrase in page text & block phrase in summary (edit summaries, page move summaries)
  1. Press the "Block this phrase" button

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.

See also