2015-08-27, 08:53 PM
Tested with 1.6 but should be the same for 1.8
This will pretty much stop all Spam Registrations.
I got the idea from this post: http://www.returnondigital.com/blog/how-...ng-captcha
What this does is add an invisible field. If anything gets entered into that filed, Registration is declined.
At the moment Spambots struggle with recognizing required fields and reading CSS. So they tend to fill in all empty fields. Doesn't matter if the field is hidden or required.
Because of this, this technique is extremely effective at preventing spam registrations.
To start go to:
Admin CP, Template & Styles > Templates > (your template) > member_register
And find:
Above this enter:
You should end up with something that looks like this:
Save the changes then go to:
Admin CP, Template & Styles > Themes > (your template) > global.css > Edit Stylesheet: Advanced Mode
Then add:
To the very top (this will hide the field from normal users).
Then save the changes.
Next download global.php from the root of your MyBB install.
Open global.php with a text editor and find:
Now add this directly under it:
So what you end up with is something like this:
Once edited upload global.php to the root of your MyBB install.
Now if any spam bots enter anything into the invisible field the Registration will be declined.
I have also added:
To my Contact Us and Donate templates.
This will pretty much stop all Spam Registrations.
I got the idea from this post: http://www.returnondigital.com/blog/how-...ng-captcha
What this does is add an invisible field. If anything gets entered into that filed, Registration is declined.
At the moment Spambots struggle with recognizing required fields and reading CSS. So they tend to fill in all empty fields. Doesn't matter if the field is hidden or required.
Because of this, this technique is extremely effective at preventing spam registrations.
To start go to:
Admin CP, Template & Styles > Templates > (your template) > member_register
And find:
{$requiredfields}
Above this enter:
<input id="this_title" type="text" name="this_title" value="" />
You should end up with something that looks like this:
</fieldset>
<input id="this_title" type="text" name="this_title" value="" />
{$requiredfields}
{$referrer}
Save the changes then go to:
Admin CP, Template & Styles > Themes > (your template) > global.css > Edit Stylesheet: Advanced Mode
Then add:
#this_title{display:none;}
To the very top (this will hide the field from normal users).
Then save the changes.
Next download global.php from the root of your MyBB install.
Open global.php with a text editor and find:
<?php
Now add this directly under it:
$this_form_spam = $_POST['this_title'];
if ($this_form_spam == "")
{
// process the form and send email
}
else
{
die();
}
So what you end up with is something like this:
<?php
$this_form_spam = $_POST['this_title'];
if ($this_form_spam == "")
{
// process the form and send email
}
else
{
die();
}
/**
* MyBB 1.6
* Copyright 2010 MyBB Group, All Rights Reserved
*
* Website: http://mybb.com
* License: http://mybb.com/about/license
*
* $Id$
*/
$working_dir = dirname(__FILE__);
Once edited upload global.php to the root of your MyBB install.
Now if any spam bots enter anything into the invisible field the Registration will be declined.
I have also added:
<input id="this_title" type="text" name="this_title" value="" />
To my Contact Us and Donate templates.