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
folder to your extensions/
directory.cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamRegex
wfLoadExtension( 'SpamRegex' );
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).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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4