UBB.Dev
Posted By: Gizmo [7.3+] Admin IP Information - 03/05/2009 1:41 AM
In .T7 we have the option of having it so the admins (or Admin's, Global Mod's, and Mod's) can see the IP address of a user. This quick modification will link the displayed IP Address of the user to the IP Address whois on Domain Tools which will provide the admin (or mod) to view where the IP is located, who the ISP is, if its blacklisted, and show what the reverse address search is...

I wrote this up on 7.5 however it should work fine from 7.2+ (as the post information was moved to post_top and post_side); any previous 7.x releases should use this mod.

There isn't really a demo (as you can't see ip's on my site unless you're an admin/mod), but you can see how the DomainTools.com IP listing looks here.

Posts View:
In scripts/showflat.inc.php:
Find:
Code
$postrow[$i]['IP'] = "({$results[$i]['POST_POSTER_IP']})";

Replace With:
Code
$postrow[$i]['IP'] = "{$results[$i]['POST_POSTER_IP']}";


In templates/default/post_side.tpl:
Find:
Code
<i>{$postrow[post].IP}</i>

Replace With:
Code
<i>(<a href="http://whois.domaintools.com/{$postrow[post].IP}">{$postrow[post].IP}</a>)</i>


In templates/default/post_top.tpl:
Find:
Code
<em>{$postrow[post].IP}</em>

Replace With:
Code
<em>(<a href="http://whois.domaintools.com/{$postrow[post].IP}">{$postrow[post].IP}</a>)</em>


Who's Online:
In templates/default/online.tpl
Find:
Code
{$regrow[user].IP}<br />

Replace With:
Code
<a href="http://whois.domaintools.com/{$regrow[user].IP}">{$regrow[user].IP}</a><br />

Find:
Code
{$anonrow[user].IP}

Replace With:
Code
<a href="http://whois.domaintools.com/{$anonrow[user].IP}">{$anonrow[user].IP}</a>

Find:
Code
{$botrow[user].IP}

Replace With:
Code
<a href="http://whois.domaintools.com/{$botrow[user].IP}">{$botrow[user].IP}</a>


Admin View
In templates/default/admin/showuser.tmpl:
Find:
Code
$regip

Replace With:
Code
<a href="http://whois.domaintools.com/$regip">$regip</a>



Find:
Code
$lastpostip

Replace With:
Code
<a href="http://whois.domaintools.com/$lastpostip">$lastpostip</a>

You can change the search engine you use (should you have one you prefer, such as the one at www.dollardns.net which is the original one I tested this on) you can just edit the domain line in the above replaces.
Posted By: SteveS Re: [7.3+] Admin IP Information - 03/05/2009 2:28 AM
I'm running 7.2.2

I hit a roadblock as soon as I started... I couldn't find this code in the original file.


Originally Posted by Gizmo


Posts View:
In scripts/showflat.inc.php:
Find:
Code
$postrow[$i]['IP'] = "({$results[$i]['POST_POSTER_IP']})";

Replace With:
Code
$postrow[$i]['IP'] = "{$results[$i]['POST_POSTER_IP']}";



I took a look at the "other" mod that you referenced for older versions, and it looks like it matches. So should this one be for 7.3+ ?

Posted By: Gizmo Re: [7.3+] Admin IP Information - 03/05/2009 2:36 AM
Lemme take a look at the older versions i have here for that line; it'll likely be 7.3
Posted By: Gizmo Re: [7.3+] Admin IP Information - 03/05/2009 2:40 AM
Yeh, it's there in that format in 7.3; so updated the topic titles
Posted By: jgeoff Re: [7.3+] Admin IP Information - 03/17/2009 11:10 PM
Originally Posted by Gizmo
Posts View:
In scripts/showflat.inc.php:
Find:
Code
$postrow[$i]['IP'] = "({$results[$i]['POST_POSTER_IP']})";
Replace With:
Code
$postrow[$i]['IP'] = "{$results[$i]['POST_POSTER_IP']}";


I was JUST going to report this. Domaintools, all of a sudden, has a problem with the parentheses so they needed to be taken out. Should've known Giz would be on top of it! laugh

Posted By: Gizmo Re: [7.3+] Admin IP Information - 03/18/2009 12:27 AM
wink always a step ahead
© UBB.Developers