Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jul 2003
Posts: 26
User
User
Joined: Jul 2003
Posts: 26
Mod Name / Version: Lookup IP address of Poster

Description: This mod turns the IP address displayed in a user's post into a hyperlink that queries a Whois Proxy with the IP address. I used www.nic.com but you may substitute with others.

We only disply IP addresses to Admin/Moderators and this makes it easy for them to quickly see where someone really is if they didn't enter their company name in their profile

Working Under: UBB.Threads 6.3

Mod Status: Finished

Any pre-requisites: None

Author(s): PatrickEgan

Date: 10/17/03

Credits:

Files Altered: showflat.php, showthreaded.php and languages/generic.php

New Files: None

Database Altered: None

Info/Instructions: Follow the instructions below

In languages/generic.php

Add the following two lines:

$ubbt_lang['GET_IP_TEXT'] = "Lookup this IP Address";
$ubbt_lang['GET_IP_URL'] = "http://www.nic.com/cgi-bin/wp.cgi?query=";


In showflat.php

Find This:


if ( ($config['showip'] == 1) && $IP) {
$postrow[$i]['IP'] = "($IP)";
}

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

Change to This:

if ( ($config['showip'] == 1) && $IP) {
$postrow[$i]['IP'] = "<a title="{$ubbt_lang['GET_IP_TEXT']}" href="{$ubbt_lang['GET_IP_URL']}$IP">($IP)</a>";
}

elseif ( ($config['showip'] == 2) && ( ($user['U_Status'] == "Administrator") || ($ismod=='yes') ) && ($IP) ) {
$postrow[$i]['IP'] = "<a title="{$ubbt_lang['GET_IP_TEXT']}" href="{$ubbt_lang['GET_IP_URL']}$IP">($IP)</a>";
}
elseif ( ($config['showip'] == 3) && ($user['U_Status'] == "Administrator") && ($IP) ) {
$postrow[$i]['IP'] = "<a title="{$ubbt_lang['GET_IP_TEXT']}" href="{$ubbt_lang['GET_IP_URL']}$IP">($IP)</a>";
}


In showthreaded.php

Find This

if ( ($config['showip'] == 1) && $IP) {
$IP = "($IP)";
}
elseif ( ($config['showip'] == 2) && ( ($user['U_Status'] == "Administrator") || ($ismod == 'yes') ) && ($IP) ) {
$IP = "($IP)";
}
elseif ( ($config['showip'] == 3) && ($user['U_Status'] == "Administrator") && ($IP) ) {
$IP = "($IP)";
}

Change to This:

if ( ($config['showip'] == 1) && $IP) {
$IP = "<a title="{$ubbt_lang['GET_IP_TEXT']}" href="{$ubbt_lang['GET_IP_URL']}$IP">($IP)</a>";
}
elseif ( ($config['showip'] == 2) && ( ($user['U_Status'] == "Administrator") || ($ismod == 'yes') ) && ($IP) ) {
$IP = "<a title="{$ubbt_lang['GET_IP_TEXT']}" href="{$ubbt_lang['GET_IP_URL']}$IP">($IP)</a>";
}
elseif ( ($config['showip'] == 3) && ($user['U_Status'] == "Administrator") && ($IP) ) {
$IP = "<a title="{$ubbt_lang['GET_IP_TEXT']}" href="{$ubbt_lang['GET_IP_URL']}$IP">($IP)</a>";
}

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attachments
97219-Lookup Poster IP Address.txt (0 Bytes, 66 downloads)

Sponsored Links
Entire Thread
Subject Posted By Posted
Finished-[6.3] Lookup IP address of Poster PatrickEgan 10/17/2003 9:19 PM
Re: Finished-[6.3] Lookup IP address of Poster Zackary 10/17/2003 11:22 PM
Re: Finished-[6.3] Lookup IP address of Poster JoshPet 10/18/2003 6:29 AM
Re: Finished-[6.3] Lookup IP address of Poster dman_dup1 10/29/2003 6:35 AM
Re: Finished-[6.3] Lookup IP address of Poster PatrickEgan 10/29/2003 10:31 AM
Re: Finished-[6.3] Lookup IP address of Poster *DELETED* smoknz28 12/16/2003 10:51 AM
Re: Finished-[6.3] Lookup IP address of Poster smoknz28 12/16/2003 11:09 AM
URL Slawek_L 01/19/2004 7:41 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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
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,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)