UBB.Dev
Having trouble getting Stop Forum Spam mod to work.

This step:
Code

In templates/default/admin/membermanage.tmpl
Find:
for($i=0;$i<sizeof($que);$i++) { //UBBTREMARK

Add Below:
$xml_string = file_get_contents("http://www.stopforumspam.com/api?email=". $que[$i]['email']);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spammer_real_email = " <a href=\"http://stopforumspam.com/search/?q=". $que[$i]['email'] ."\" target=\"_blank\" style=\"color: #FF0000; font-weight: bold;\">{$ubbt_lang["SFS_ALERT"]}</a>";
} else {
$spammer_real_email = "";
}

$xml_string = file_get_contents("http://www.stopforumspam.com/api?ip=". $que[$i]['ip']);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spammer_reg_ip = " <a href=\"http://stopforumspam.com/ipcheck/". $que[$i]['ip'] ."\" target=\"_blank\" style=\"color: #FF0000; font-weight: bold;\">{$ubbt_lang["SFS_ALERT"]}</a>";
} else {
$spammer_reg_ip = "";
}

Before:
Code

for($i=0;$i<sizeof($que);$i++) { //UBBTREMARK
echo <<<UBBTPRINT
<tr><td class="stdautorow autobottom colored-row" valign="top">
<small>
...

After:
Code

for($i=0;$i<sizeof($que);$i++) { //UBBTREMARK
$xml_string = file_get_contents("http://www.stopforumspam.com/api?email=". $que[$i]['email']);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spammer_real_email = " <a href=\"http://stopforumspam.com/search/?q=". $que[$i]['email'] ."\" target=\"_blank\" style=\"color: #FF0000; font-weight: bold;\">{$ubbt_lang["SFS_ALERT"]}</a>";
} else {
$spammer_real_email = "";
}

$xml_string = file_get_contents("http://www.stopforumspam.com/api?ip=". $que[$i]['ip']);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes'){
$spammer_reg_ip = " <a href=\"http://stopforumspam.com/ipcheck/". $que[$i]['ip'] ."\" target=\"_blank\" style=\"color: #FF0000; font-weight: bold;\">{$ubbt_lang["SFS_ALERT"]}</a>";
} else {
$spammer_reg_ip = "";
}
echo <<<UBBTPRINT
<tr><td class="stdautorow autobottom colored-row" valign="top">
<small>
...

And all I get is a blank member management page.
I see the four tabs across the top, but I cannot click on them.
Also the display pane is empty. Any ideas?
Okay ,Not sure if this is the issue but did you add your applied for API key to the language file.
not if it wasn't in those directions.

What is that and how do I do it?
read the post for the mod again.
Mod

goto the api part.
Maybe that is what the issue is.
It's on the posting where you downloaded the script... It says an API key is required, and it says how to sign up for one just above the download link...

In any case, the API key shouldn't "kill" any file, it simply wouldn't allow you to submit... So it's my guess that something, somewhere, has been modified incorrectly. That file's mod looks correct though.

The membermanage step is just for the registration queue, if you don't use the reg queue you can safely skip the member manage steps.
Okay, I got my API key and added it to both language files.

The I refresh the Member Management page, the 4 tabs appear, but the data area is empty. I also can't click the tabs.

I went through your steps one at a time and they all look perfect. I even restarted my IIS hoping that maybe something wasn't getting loaded. If I revert the AFTER step above to BEFORE , I get my member management page back. *sigh*
Okay, I tried a total hack to see what would happen....

If I delete all the lines in that section but leave the first one, i.e.,
Code

for($i=0;$i<sizeof($que);$i++) { //UBBTREMARK

$xml_string = file_get_contents("http://www.stopforumspam.com/api?email=". $que[$i]['email']);

member management works as per normal. But if I add the next line member management fails as explained.

Code

for($i=0;$i<sizeof($que);$i++) { //UBBTREMARK

$xml_string = file_get_contents("http://www.stopforumspam.com/api?email=". $que[$i]['email']);
$xml = new SimpleXMLElement($xml_string);

So...

The line$ xml = new SimpleXMLElement($xml_string); seems to kill member management. Is it possible my board doesn't know what SimpleXMLElement() is and if barfing there?
What version of PHP are you running? I coded this on PHP5 using the SimpleXMLElement

Does the mod fail on say editing a member in the CP?
I'm running PHP Version 4.4.7

yep it fails with the following message while trying to "edit user"

Fatal error: Cannot instantiate non-existent class: simplexmlelement in C:\Inetpub\vhosts\game-master.net\httpdocs\pit\templates\default\admin\showuser.tmpl on line 6
You are aware that PHP4 is a shelved product and they're not even releasing security patches since 2008 right?...

SimpleXMLElement was added in PHP5 (to which PHP6 will start phasing it out soon), there isn't really a simple way to get this to work in PHP4...
Okie dokie, I'll look at upgrading.

PS. I see the tweet and facebook like .. is that a mod or just some sort of HTML insert. I'd like that on my forums as well.
The facebook/tweet buttons where added in 7.5.6 (I believe one version newer than what you're running).
Okay, I have the Stop Forum Spam working .. thanks Gizmo!
I'm now playing with it to figure out all the features.
(I had to upgrade to PHP5 as per your suggestion)

Question: I have a spammer which existe in the SFS database currently in the registration queue. When I go to the Registration queue, there is no indication he is a spammer. If I click on his name I'm taken to the Edit Profile page where I see the red '!' and the Report Spammer option.
Is this correct? Shouldn't I see an indication in the Registration Queue that this is a known spam account?
Different checks for different areas...

-The edit profile checks their Registration IP, Last Post IP (if it exists), and EMail.
-Reg Queue only checks the EMail address (false positives and all with the IP)
-The Registration Check checks the IP Address when accessed and the EMail when submitted.
Right.

My question is: Why on the Reg Que is there no indication that someone is a spammer.. you already have the email and ip address.

If I click on the username (in the Reg Que) I will see the Red '!' indicating he is a spammer.

I'm really only saying it's an unneeded step. If I could see the Red '!' in the reg que, I could simply Disallow the registration then and there.

Know what I mean?
Well, the reason there aren't more checks is because every lookup counts towards your lookups on their site; you only get so many per day... And for larger forums that have more activity per day will have more lookups...

Basically, same reason we don't do lookups on every member as they're loaded via the member management screen, you'll hit a limit and you won't be able to preform any lookups after you hit the limit.
Well I understand the limits, but they are what 20,000?
I'm only talking about new registrations sitting in the registration queue.

For me that seems like a natural. *shrugs*

In any case, thanks it's a nice mod!
© UBB.Developers