In this post i want to write tutorial how to enable custom antispam question. If you have updated new PHPBB version, you can fin in your administration control panel, the Right menu and the item "SPAMBOT Circumvences. From menu, you can select captcha, recaptcha or custom questions (Q&A). If you wish extended protection you can select captcha there and also add manually custom antispam question into Your PHPBB files like this:
PS: I do not guarantee this will work, backup Your original files and try on your own risk.
Edit /templates/yourtemplatename/ucp_register.html
At line around 64 add:
<dl>
<dt><label for="bonusq">Anti-Spam Question:</label><br /><span>What is the founder of Mi**oso*t company? (Full name)</span></dt>
<dd><input type="text" tabindex="1" name="bonusq" id="bonusq" size="25" value="" class="inputbox autowidth" title="Anti-Spam Question" /></dd>
</dl>
Enter your custom question, should not be math, something completelly unique not solvable by bots, yet solvable by your new inteligent members.
Edit file /includes/ucp/ucp_register.php. Find: $error[] = $user->lang['NEW_EMAIL_ERROR']; and after bracket, add following code. It should be before ending bracket like this:
// validate custom profile fields
$cp->submit_cp_field('register', $user->get_iso_lang_id(), $cp_data, $error);
if (!sizeof($error))
{
if ($data['new_password'] != $data['password_confirm'])
{
$error[] = $user->lang['NEW_PASSWORD_ERROR'];
}
if ($data['email'] != $data['email_confirm'])
{
$error[] = $user->lang['NEW_EMAIL_ERROR'];
}
if(trim($_POST['bonusq'])!='Bill Gates')
{
$error[] = "You did not answer the Anti-Spam question correctly. Please try again.";
}
}
Please post how it works for You