You have to change two files, templates/(your template)/profile_add_body.tpl and includes/usercp_register.php.
In templates/(your template)/profile_add_body.tpl, add this after the <!-- END switch_confirm --> line (
about line number 68):
<!-- BEGIN switch_add_profile -->
<tr>
<td class="row1"><span class="gen">Anti-Spam Question:</span></td>
<td class="row2">
<span style="font-size: small;">Enter the name Luke Skywalker's
father. Check your spelling!
Requiring this question to be answered will hopefully limit
spammers who try to sign up.</span><br />
<input type="text" class="post" style="width: 200px"
name="bonusq" size="25" maxlength="255" value="" />
</td>
</tr>
<!-- END switch_add_profile -->
In includes/usercp_register.php, add this after else if ( $mode == 'register' ) { (
about line number 275):
// mod by MB to require human data to prevent spam bots
if(trim(strtolower($_POST['bonusq']))!='darth vader') {
$error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) .
'You did not answer the Anti-Spam question correctly...' .
'please try again.';
}
// end mod
So there you have it. I'm sure there are some sophisticated PHPBB mods out there that will do the same and more for you, but this simple change has saved me a lot of trouble. I'm keeping my fingers crossed that it will last.
Update 2007-05-23: I omitted one other mod to make this work. You also need to edit your includes/usercp_register.php file. Find the line if ( $mode == 'editprofile' ) (
about line number 941) and modify that block to look like this:
if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
} else {
// Else block is Mod by MB 2006-08-11
$template->assign_block_vars('switch_add_profile', array());
}