Manual:$wgFilterCallback

From MediaWiki.org

Jump to: navigation, search
Access: $wgFilterCallback
Similarly (to $wgSpamRegex) if this function returns true
Introduced in version: 1.3.0
Removed in version: still in use
Allowed Values:
Default Value: false

Other settings: Alphabetical | By Function


[edit] Details

Similarly to $wgSpamRegex, you can get a function to do the job. The function will be given the following args:

  1. a Title object for the article the edit is made on
  2. the text submitted in the textarea (wpTextbox1)
  3. the section number.

The return should be boolean indicating whether the edit matched some evilness:

  • true : block it
  • false : let it through

For a complete example, have a look at the SpamBlacklist extension source code.

Personal tools