|
Cookbook /
Blocklist3Summary: Block vandals or spammers by IP, word, phrase, or regular expressions.
Version: 2006-04-28 3.0
Prerequisites: PmWiki 2.0.x or newer
Status: beta
Maintainer: Crisses XES
Categories: Obsolete
This recipe is deprecated, and will no longer be supported. Please see the built-in blocklist features that come pre-packaged in PmWiki. Thank you!! This recipe lets you block wiki vandals and spammers who are spamming every webform they can find. The "blocklist" is like a blacklist for IP numbers or phrases. New additions to the Blocklist include optional advanced features for more complicated situations. Until more people have tested this recipe, consider it to be "beta" status. blocklist3.phpΔ. There is a basic (and real) Attach:sampleblocklist.txt Δ (note that the file contains content for blocking purposes that may be unsuitable for children) that you can open in a text editor and copy to your Site.Blocklist wiki page. The file is rather long, and you may want or need to pare it down. Blocklist3 is based on Blocklist2. While it's a major revision to the code organization and flow, it allows all the functionality of Blocklist2 with the addition of "unblocklisting" (see below). Blocklist3 allows the creation of a list of words, phrases, regular expressions (advanced text pattern matching), and IP addresses to be blocked from posts to the site. See BlocklistHelperScripts for scripts that will help parse emails or blocked content for relevant terminology you may want to block on your site. Installation on an individual wiki
(Note that people using the CommentBox cookbook module should use
if ($action == 'edit' || $action == 'comment') {
include_once("cookbook/blocklist3.php"); }
instead).
Installation on a wiki farm
(Note that people using the CommentBox cookbook module should use
instead).
Spelling countsBe careful when typing the page name "Blocklist". On some OSes (Windows) you can use the wrong case but still get the Blocklist page displayed. However, when you try to save your edits, the script will reject them because the page name has the wrong case. Site.Blocklist versus Main.BlocklistThe original version of the Blocklist script looked up the blocklist terms on a page called Main.Blocklist. If you want to continue using Main.Blocklist or if you want to use custom blocklist pages, set the following variable in either your config.php or farmconfig.php file before you include the blocklist3.php script:
If you do this, Site.Blocklist will be ignored, so you may also want to add:
Use NotesAll of the former Blocklist2 functionality is the same. Additional OptionsFor the many additional options in Blocklist3, see also Blocklist2. UnBlocklistingBlocklist3 allows the admin to explicitly remove entries from the blocklist. In the event that a WikiFarm is sharing blocklists, the admins may choose to have entries in the shared blocklist that need to be removed on individual wikis. The setting
before the include statement allows
Unblock removes items that are "block:"ed. If
unregex removes items that are "regex:"ed -- but you must use the exact same pattern to unblock a regex (it uses a string match, not a regex match, to unblock the regexes). For example, if you have:
in one of your blocklists, you can only unregex it in another blocklist file by entering:
There are currently no provisions for unblocking IP addresses. "unblock:" is not compatible with Blocklist2. Items that are "unblock:"ed will end up blocked. If you need to revert back to Blocklist2 after using the unblock feature, remove all unblocked items from the blocklist. Release Notes
CommentsI am using Commentbox-Styled. It doesn't work with it! Also if I remove the input-box, spammers still spams my site (with edit password and blocklist3 is launched before commentbox-styled). What could e the reason? Thanks flox August 17, 2006, at 04:18 AM I: I noticed a new type of type SPAM (see http://adacl.sourceforge.net/pmwiki.php/Main/CommonGatewayInterface?action=diff(approve links) - History spamming! The spammer just fills the Summary Field. Completely ineffective of course - but SPAMmers never cared about the effectiveness of there dirty deeds. ~~~~~ See AlsoContributors
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |