 |
 |
 |
 |
#311949 - 11/11/06 07:13 PM
[7.0-7.2.x] Admin IP Information
|
Wizard
Registered: 01/10/00
Posts: 5354
Loc: Portland, OR, USA
|
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: 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: 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: 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: 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: {if $postrow[post].IP}
<br />
<i>{$postrow[post].IP}</i>
{/if}Replace With: {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: {if $IP}
<br />
<i>{$IP}</i>
{/if}Replace With: {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: Replace With: (<a href="http://whois.domaintools.com/{$regrow[user].IP}" target="_blank">{$regrow[user].IP}</a>)Find: Replace With: (<a href="http://whois.domaintools.com/{$anonrow[user].IP}" target="_blank">{$anonrow[user].IP}</a>)Find: Replace With: (<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: Replace With: (<a href="http://whois.domaintools.com/$regip" target="_blank">$regip</a>) Find: Replace With: (<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
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#312137 - 12/02/06 03:06 PM
Re: Admin IP Information
[Re: Gizmo]
|
Power User
Registered: 04/05/01
Posts: 97
Loc: NJ
|
Here are some additions to Gizzy's mod (you need to implement his first before adding these): TO HYPERLINK IP ADDRESSES IN ADMIN VIEW OF A USER'S PROFILEEDIT: /templates/default/admin/showuser.tmpl On or near Line 88: CHANGE: TO:
$regdate - <a href="http://whois.domaintools.com/$regip" target="_blank">$regip</a>
AND on or near Line 96: CHANGE: TO:
$lastpost - <a href="http://whois.domaintools.com/$lastpostip" target="_blank">$lastpostip</a>
TO HYPERLINK IP ADDRESSES IN WHO'S ONLINEEDIT: /templates/default/online.tpl On or near Line 36: CHANGE:
<span class="small">{$regrow[user].IP}</span>
TO:
<span class="small"><a href="http://whois.domaintools.com/{$regrow[user].IP}" target="_blank">{$regrow[user].IP}</a></span>
AND on or near Line 82: CHANGE:
{$anonrow[user].Username}
TO:
<a href="http://whois.domaintools.com/{$anonrow[user].Username}" target="_blank">{$anonrow[user].Username}</a>
/jg
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|