I think it would be fair to say that this recipe has been superceded by PmWiki.Blocklist Prevent spammers from adding their !@*#% Links on my beautiful wiki.
This is http://www.pmwiki.org/wiki/Cookbook/BlackList with the "post" actions changed to "edit" to make it work for PmWiki 2.0. It works for me.
I am replacing the post-handle that takes care of the postings. I am checking the new entries for blacklistwords and if it is clear, I am calling the previously declared posthandler. If not, I am aborting.
You might want to use Cookbook.Blocklist2 instead
Just include "blacklist.php" in your config.php file or somewhere else where it makes sense. If you call "blackListCheck($text)" it will return the number of banned words.
If you need further blackwords on the list, extend the $BlackList array with further strings. Currently the blacklist contains only links and words from an asian spammer that edited my pages during the last week quite a lot.
Update other functions that enable you to edit pages.
6.9.04: Converted from PmWiki 1.0 version.
6.9.04: Setting up this page
Comments & Bugs
Maybe it could be worthy to ban the IP that tried to add banned words (if a badwordcount is exceeded for example).