Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2000
Posts: 5,834
Likes: 20
UBBDev Owner
Time Lord
UBBDev Owner
Time Lord
Joined: Jan 2000
Posts: 5,834
Likes: 20
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:

Take this:
Code

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

Change To:
Code

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


UBBDev - 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.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 02/17/2011 5:42 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) SteveS 02/17/2011 7:06 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) gliderdad 02/17/2011 7:14 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 02/19/2011 3:53 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Larry920 02/19/2011 5:30 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) gliderdad 02/19/2011 6:24 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 02/19/2011 7:11 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) gliderdad 02/19/2011 7:34 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 02/19/2011 8:01 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) gliderdad 02/19/2011 8:05 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 02/19/2011 10:39 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) gliderdad 02/19/2011 10:54 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 02/20/2011 9:07 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) gliderdad 02/22/2011 4:35 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Anonymous 03/07/2011 2:16 PM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 03/26/2011 3:14 AM
Re: [7.x] Stop Forum Spam Integration v0.2 (Template) Gizmo 04/09/2011 11:37 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:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 12856
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 1
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
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-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)