Topic: Simple Antispambot-code Mod v0.8
This should work - let us know if it does or not, or if I have missed something important.
It is based on the timezone anti-spam mod of Iota, only slightly tweaked, and the 'VIP code' idea used in some mods for other forum packages.
It is very simple mainly because I don't know enough about PHP or punBB to make it complex
##
##
## Mod title: Simple Antispambot-code Mod
##
## Mod version: 0.8
## Works on PunBB: 1.2.15
## Release date: 28 May 2007
## Author: sirena (on http://punbb.org/forums)
##
## Description: This is a *very* simple mod to help prevent forum
## spambots from registering on a punBB forum.
##
## Affects DB: No
##
## Affected files: register.php
##
## Notes: This mod simply adds an extra free-text form field into
## the registration page for punBB (register.php) that
## prospective users need to complete, and which the forum
## administrator can easily customize.
##
## Forum administrators can specify any sort of question
## and the required (numeric or text) response.
##
## Administrators are encouraged to:
## (a) customize the question posed by this mod to suit their needs, and
## (b) change their question periodically.
##
## The more variation there is in the deployment of this mod, the more
## effective it will be, particularly against automated spambots.
##
## Questions can be simple - like "What year did Columbus discover America?"
## - or perhaps more complicated - like "What is the sum of 1000+100".
##
## Questions may even be very specific if you are confident that the
## people who you want to join your forum should know the answer.
##
## For example if you have a forum about the Beatles the question may be
## "What year did the Beatles break up?"
##
## Or if you have a forum about Beverly Hills Calif., a good question may be
## "What is the postcode of Beverly Hills?" Etc.
##
## Specific questions such as these will help prevent automated registrations
## and may even cause difficulties for some human spammers too,
## if local or esoteric knowledge is required.
##
## Questions may also be framed to require some exploration of the site.
## Eg "Please enter the 4 digit VIP code visible at the top of the Support page".
##
## This sort of question will block automated bots and slow down
## and perhaps even deter human spammers too.
##
##
## Generated By: Auto Read-Me(by Caleb Champlin) - http://www.rscheatnet.com/Auto_Readme.zip
##
## DISCLAIMER: Please note that 'mods' are not officially supported by
## PunBB. Installation of this modification is done at your
## own risk. Backup your forum database and any and all
## applicable files before proceeding.
##
#
#---------[ 1. OPEN ]---------------------------------------------------
#
/YOURPUNBBFORUM/register.php
#
#---------[ 2. FIND (line:186) ]---------------------------------------------------
#
$timezone = round($_POST['timezone'], 1);
#
#---------[ 3. BEFORE, ADD ]---------------------------------------------------
#
// anti-spam code variable checked here. Customize to suit your needs.
if ($_POST['spamcode'] <> "1492")
message('Please enter the correct 4 digit code for the year Columbus discovered America.');
#
#---------[ 4. FIND (lines: 305-309) ]---------------------------------------------------
#
<div class="inform">
<fieldset>
<legend><?php echo $lang_prof_reg['Localisation legend'] ?></legend>
#
#---------[ 5. BEFORE, ADD ]---------------------------------------------------
#
<div class="inform">
<fieldset>
<legend>Spambot prevention</legend>
<div class="infldset">
<p>Please enter the year in which Columbus discovered America in the box below.</p>
<p><b>Hint:</b> <i>In XXXX, Columbus sailed the ocean blue...</i></p>
<div class="rbox">
<input type="text" name="spamcode" size="4" maxlength="4" /><br />
</div>
</div>
</fieldset>
</div>
#
#---------[ 6. SAVE/UPLOAD ]---------------------------------------------------
#
/YOURPUNBBFORUM/register.php
On punres at:
http://www.punres.org/viewtopic.php?id=3439