To REPORT users you will need an API Key from Stop Forum Spam.
About: This modification will allow you to check your users (via the "Edit User" function in the Control Panel) and new signups (via the "Registration Queue") against the Stop Forum Spam databases.
When a spammer is identified a Red/Bold ! will display next to the field, clicking this ! will allow you to view the associated data on Stop Forum Spam.
Demo: See the screen captures attached to this thread for a demo.
The Modification In templates/default/admin/membermanage.tmpl Find:
To detect and deny detected spammers when they register (via IP): In templates/default/newuser_signup.tpl Find:
Code
{* Script Version 7.5.6 *}
Add Under:
Code
{php} $xml_string = file_get_contents("http://www.stopforumspam.com/api?ip=". $_SERVER["REMOTE_ADDR"]); $xml = new SimpleXMLElement($xml_string);
if ($xml->appears == 'yes') { {/php} {$tbopen} <tr> <td class="tdheader" colspan="2"> Spammer Detected </td> </tr> <tr> <td colspan="2" class="alt-2"> At this time your registration can not be continued. Your IP address has been flagged as that of a known spammer/spambot via the <a href="http://stopforumspam.com/ipcheck/{$smarty.server.REMOTE_ADDR}" target="_blank">Stop Forum Spam</a> database. To proceed you'll need to <a href="http://stopforumspam.com/contact" target="_blank">contact them</a> to clear yourself from their database. </td> </tr> {$tbclose}
{php} } else { {/php}
Find:
Code
</form>
Add Under:
Code
{php} } {/php}
NOTE: StopForumSpam.com only allows 5k lookups per day; thus, you should refrain from attempting to implement this code on pages which would quickly hit this limit (such as adding searches for all types of data on the search users page).
Yeah, I grossly over-analyzed how to do it; when I thought outside the box with the demo code I had it just sort of clicked how easy it really was...
The "hard" part was where to put the report link yet have it stand out, so I just kind of suggested its current placement.
I also over-thought what to submit, then I figured that the only thing that really matters was their latest ip, so if a "last post ip" didn't exist then just grab the reg ip so no matter what it'd be their "last logged" ip address.
Have a couple little things I want to work in, but I went and reported this mod to them so that they could (hopefully) add it to their listing.
Let me know if you guys run into any oddities and I'll take a look. I'm thinking about building a separate (non UBB) script to do a one-time scan of user data, meant to be run on different days for large forums (to bypass the 5k limit) but I'll have that separate for those who want it.
Thanks Giz, I would def love to see this become stock in v8!!
Well, my code is pretty basic, Rick is more than welcome to use it for inspiration for v8; it's torn from the demo's at stopforumspam's api documentation.
In its current phase it's perfect for anyone who wants to use it, it likely won't hit their 5k limit; the problem is the api key needed for submission; but it could just not show unless an api key shows in the config.
It'd be great to integrate with the reg process, but the idea of false positives that users need to contact stopforumspam.com to bypass is kind of a setback... If I do add it (and I probably will) I'd advise against its general use, but it'd be there regardless.
If included in stock I think it would need to be an option like twitter where you need to check the box to enable and enter your twitter name or in this case api key.
Added the ability to do an IP check against the Stop Forum Spam database at signup; if their IP is detected then they're not allowed to sign up (see the screen attached for the error message portion).
Fixed a bug reported by Gliderdad with the showuser.tmpl portion for last post ip; when a user doesn't have a last post ip (0 posts) the script will throw an error; the fix is to just not do the check in this case. New code (updated on first post) is:
I've redone this template hack as a full modification available here. I've also added to it by setting it to check emails on registration and report offenders who're signing up with triggered email data to Stop Forum Spam automatically in the v0.3 Modification thread.
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.