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
In .T7 we have the option of having it so the admins (or admins and mods) can see the IP address of a user; through a feature request of Joe Siegler I pieced together a quick modification that will link the displayed IP Address of the user to the 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...

For 7.3+ please see this modification.

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
		if ( ($config['SHOW_POSTER_IP'] == 1) && $IP) {
$postrow[$i]['IP'] = "($IP)";
}

elseif ( ($config['SHOW_POSTER_IP'] == 2) && ( ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") || ($ismod=='yes') ) && ($IP) ) {
$postrow[$i]['IP'] = "($IP)";
}
elseif ( ($config['SHOW_POSTER_IP'] == 3) && ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") && ($IP) ) {
$postrow[$i]['IP'] = "($IP)";
}
else {
$postrow[$i]['IP'] = "";
}

Replace With:
Code
		if ( ($config['SHOW_POSTER_IP'] == 1) && $IP) {
$postrow[$i]['IP'] = "$IP";
}

elseif ( ($config['SHOW_POSTER_IP'] == 2) && ( ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") || ($ismod=='yes') ) && ($IP) ) {
$postrow[$i]['IP'] = "$IP";
}
elseif ( ($config['SHOW_POSTER_IP'] == 3) && ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") && ($IP) ) {
$postrow[$i]['IP'] = "$IP";
}
else {
$postrow[$i]['IP'] = "";
}


In scripts/showthreaded.inc.php:
Find:
Code
	if ( ($config['SHOW_POSTER_IP'] == 1) && $IP) {
$IP = "($IP)";
}
elseif ( ($config['SHOW_POSTER_IP'] == 2) && ( ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") || ($ismod == 'yes') ) && ($IP) ) {
$IP = "($IP)";
}
elseif ( ($config['SHOW_POSTER_IP'] == 3) && ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") && ($IP) ) {
$IP = "($IP)";
}
else {
$IP = "";
}

Replace With:
Code
	if ( ($config['SHOW_POSTER_IP'] == 1) && $IP) {
$IP = "$IP";
}
elseif ( ($config['SHOW_POSTER_IP'] == 2) && ( ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") || ($ismod == 'yes') ) && ($IP) ) {
$IP = "$IP";
}
elseif ( ($config['SHOW_POSTER_IP'] == 3) && ($user['USER_MEMBERSHIP_LEVEL'] == "Administrator") && ($IP) ) {
$IP = "$IP";
}
else {
$IP = "";
}

In templates/showflat.tpl:
Find:
Code
{if $postrow[post].IP}
<br />
<i>{$postrow[post].IP}</i>
{/if}

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

In templates/showthreaded.tpl:
Find:
Code
{if $IP}
<br />
<i>{$IP}</i>
{/if}

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



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

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

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

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

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

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



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

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

Find:
Code
$lastpostip

Replace With:
Code
(<a href="http://whois.domaintools.com/$lastpostip" target="_blank">$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 /templates/showflat.tpl and /templates/showthreaded.tpl

7.2 Notice: If installing in 7.2, apply the showflat/showthreaded steps to post_side.tpl and post_top.tpl


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.0-7.2.x] Admin IP Information Gizmo 11/12/2006 3:13 AM
Re: Admin IP Information AllenAyres 11/12/2006 5:29 AM
Re: Admin IP Information Gizmo 11/12/2006 10:13 AM
Re: Admin IP Information Gizmo 11/12/2006 10:15 AM
Re: Admin IP Information Harold 11/15/2006 3:47 PM
Re: Admin IP Information Gizmo 11/16/2006 12:35 AM
Re: Admin IP Information jgeoff 12/02/2006 11:06 PM
Re: Admin IP Information Ohton 01/25/2007 2:48 PM
Re: Admin IP Information Stephen G 01/25/2007 7:49 PM
Re: Admin IP Information Gizmo 01/25/2007 10:35 PM
Re: Admin IP Information Gizmo 03/08/2007 11:24 PM
Re: Admin IP Information jgeoff 03/18/2007 1:45 AM
Re: Admin IP Information Gizmo 03/18/2007 1:55 AM
Re: Admin IP Information jgeoff 03/18/2007 2:17 AM
Re: Admin IP Information cclapper 05/20/2007 12:33 PM
Re: Admin IP Information Gizmo 05/20/2007 1:15 PM
Re: Admin IP Information Gizmo 07/17/2007 5:06 AM
Re: [7.x] Admin IP Information Mike G 07/22/2007 2:15 AM
Re: [7.x] Admin IP Information Gizmo 07/22/2007 4:02 AM
Re: [7.x] Admin IP Information Mike G 07/22/2007 4:20 AM
Re: [7.x] Admin IP Information Rose 07/23/2007 3:37 AM
Re: [7.x] Admin IP Information Mike G 07/23/2007 7:21 AM
Re: [7.x] Admin IP Information Gizmo 07/23/2007 9:33 AM
Re: [7.x] Admin IP Information Mike G 07/23/2007 5:04 PM
Re: [7.x] Admin IP Information Rose 07/23/2007 6:21 PM
Re: [7.x] Admin IP Information winter 06/24/2008 9:11 PM
Re: [7.x] Admin IP Information Gizmo 06/25/2008 2:18 AM
Re: [7.x] Admin IP Information winter 06/25/2008 4:47 PM
Re: [7.x] Admin IP Information Gizmo 06/26/2008 3:14 AM
Re: [7.x] Admin IP Information jgeoff 03/17/2009 10:53 PM
Re: [7.x] Admin IP Information Gizmo 03/18/2009 12:28 AM

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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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
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)