Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Author: Gizmo/Gremelin (James of VNC Web Services)

Requirements:
Valid UBB.Threads 7.5.7 install and license (note, this will run on previous builds, but you'll need to apply the Stop Forum Spam modification beforehand).

About:
It occoured to me one night, while working on a client site, that spammers weren't just the "drive by" variety anymore (whereby they sign up, spam, and go on); in today's world we see an increasing number of "sleeper" spammers (whereby someone registers, they wait a while, and then spam). It hit me that when they register, they're a legit "no spam" user in spam databases, but when they begin their trouble they already have bypassed registration checks through any multitude of software packages.

I then decided to revisit my original Stop Forum Spam modification and look at the template mod for the registration check and apply the settings to the UBB.Threads login screen; as, since they're already registered and seemingly "legit", the login check would validate them every time they attempt to login; thus if they're now listed as a spammer, they can't login and, well, spam.


NOTE: If you're having problems with API timeouts ("Unable to Connect to Stop Forum Spam Database" error) you can adjust the API URL in login.tpl to use:
Code
	$xml_string = @file_get_contents("http://api.stopforumspam.org/api?ip=". $_SERVER["REMOTE_ADDR"]);

Versus the default:
Code
	$xml_string = @file_get_contents("http://www.stopforumspam.com/api?ip=". $_SERVER["REMOTE_ADDR"]);



In languages/english/stop_forum_spam.php:
Find:
Code
$ubbt_lang['SFS_DETECTED_INFO_1'] = "At this time your registration can not be continued.  Your IP address has been flagged as that of a known spammer/spambot via the ";

Add Above::
Code
$ubbt_lang['SFS_DETECTEDLOGIN_INFO_1'] = "At this time your login can not be continued.  Your IP address has been flagged as that of a known spammer/spambot via the ";

In scripts/login.inc.php:
Find:
Code
"wordlets" => array("login"),

Replace With:
Code
"wordlets" => array("login","stop_forum_spam"),

In templates/default/login.tpl:
Find:
Code
{* Script Version 7.5.8 *}

Add Below:
Code
{php}
$xml_string = @file_get_contents("http://www.stopforumspam.com/api?ip=". $_SERVER["REMOTE_ADDR"]);
if($xml_string != false) {
$xml = new SimpleXMLElement($xml_string);

if ($xml->appears == 'yes') {
{/php}
{$tbopen}
<tr>
<td class="tdheader" colspan="2">
{$lang.SFS_DETECTED}
</td>
</tr>
<tr>
<td colspan="2" class="alt-2">
{$lang.SFS_DETECTEDLOGIN_INFO_1}
<a href="http://stopforumspam.com/ipcheck/{$smarty.server.REMOTE_ADDR}" target="_blank">Stop Forum Spam</a>
{$lang.SFS_DETECTED_INFO_2}

<br /><br />
Powered by the <a href="http://www.virtualnightclub.net/" target="_blank">VNC Web Services</a> <a href="http://www.stopforumspam.com/" target="_blank">Stop Forum Spam</a> addon for <a href="http://www.ubbcentral.com/" target="_blank">UBB.threads</a>.
</td>
</tr>
{$tbclose}

{php}
} else {
{/php}

Find:
Code
</form>

Add Below:
Code
{php} } } else { {/php}
{$tbopen}
<tr>
<td class="tdheader" colspan="2">
{$lang.SFS_ERROR_TITLE}
</td>
</tr>
<tr>
<td colspan="2" class="alt-2">
{$lang.SFS_ERROR_CONNECTION}

<br /><br />
Powered by the <a href="http://www.virtualnightclub.net/" target="_blank">VNC Web Services</a> <a href="http://www.stopforumspam.com/" target="_blank">Stop Forum Spam</a> addon for <a href="http://www.ubbcentral.com/" target="_blank">UBB.threads</a>.
</td>
</tr>
{$tbclose}
{php} } {/php}

Please leave your thanks below so we can know that we've helped you!


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links
Entire Thread
Subject Posted By Posted
[7.5.7+] Stop Forum Spam - Login Detection Gizmo 12/02/2013 7:00 AM
Re: [7.5.7+] Stop Forum Spam - Login Detection Bill B 12/02/2013 11:57 AM
Re: [7.5.7+] Stop Forum Spam - Login Detection Gizmo 12/02/2013 12:02 PM
Re: [7.5.7+] Stop Forum Spam - Login Detection Bill B 12/02/2013 12:30 PM
Re: [7.5.7+] Stop Forum Spam - Login Detection GeoffM1968 03/27/2014 9:12 PM
Re: [7.5.7+] Stop Forum Spam - Login Detection Gizmo 03/28/2014 3:51 AM
Re: [7.5.7+] Stop Forum Spam - Login Detection GeoffM1968 03/28/2014 9:34 PM
Re: [7.5.7+] Stop Forum Spam - Login Detection Reboot 05/02/2014 5:26 AM
Re: [7.5.7+] Stop Forum Spam - Login Detection Gizmo 05/02/2014 12:26 PM
Re: [7.5.7+] Stop Forum Spam - Login Detection Stephen G 07/04/2014 6:20 PM
Re: [7.5.7+] Stop Forum Spam - Login Detection Gizmo 07/05/2014 3:23 AM
Re: [7.5.7+] Stop Forum Spam - Login Detection Stephen G 07/06/2014 1:24 AM
Re: [7.5.7+] Stop Forum Spam - Login Detection Ruben Rocha 08/01/2015 10:17 AM
Re: [7.5.7+] Stop Forum Spam - Login Detection Gizmo 08/01/2015 12:01 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)