Top Hosting Forum

WebHosting Reviews Forum

Budget DirectAdmin hosting and domain names

PHPBB Antispam question

PHPBB forum script Discussion. PHPBB Questions, Troubleshooting, Errors, Mods and so on..
Hosting Forum Description
PHPBB forum script Discussion. PHPBB Questions, Troubleshooting, Errors, Mods and so on..

PHPBB Antispam question

Postby hostingforum » Sat Apr 14, 2012 10:40 am

Hi there, if You are an PHPBB admin facing alot of SPAM posts from bots, or you are clever to protect your forum even before this happen, then You add some antispam protection to your PHPBB board.

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:

<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>

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

Ad: There You can have your forum site-wide banner/text ad for $99 yearly. Contact admin

User avatar
Site Admin
Posts: 658
Joined: Fri May 20, 2011 7:58 pm
Location: Czech Republic

Return to PHPBB

Who is online

Users browsing this forum: No registered users and 0 guests