3 If you are having trouble with blog/comment spam, which originates
4 from hijacked Windows zombie computers this plugin can help. It adds
5 a simple [x] checkbox to the edit screen, which most bots cannot
6 overcome without being specifically retrained to target your Wiki.
7 This is just the simplest form of anti-bot captcha; something more
8 sophisticated is required as soon as the attackers adapt.
12 $ewiki_t["en"]["ANTIBOT_CHECKBOX"] = "allow saving of page, I'm not a spambot";
13 $ewiki_t["en"]["ANTIBOT_FAILED"] = "Rejected. Go back and check the box below the [save] button.";
16 $ewiki_plugins["edit_form_append"][] = "ewiki_aedit_antibot_checkbox";
17 function ewiki_aedit_antibot_checkbox($id, &$data, $action) {
18 if (!isset($GLOBALS["ewiki_no_bot"])) {
19 return(ewiki_t('<input type="checkbox" name="antibot_check" id="antibot_checkbox" value="1" /><label for="antibot_checkbox"> _{ANTIBOT_CHECKBOX}</label><br/>'));
23 #-- reject if not checked
24 $ewiki_plugins["edit_save"][] = "ewiki_edit_save_antibot_checkbox";
25 function ewiki_edit_save_antibot_checkbox(&$save, &$data) {
28 if ((!$_REQUEST["antibot_check"]) && !isset($GLOBALS["ewiki_no_bot"])) {
30 $ewiki_errmsg = ewiki_t("ANTIBOT_FAILED");