VirtueTech
07-29-2001, 10:00 PM
Hello everyone,
I noticed that the IP Logged GIF or TEXT was just taking up some valuable icon space in my
posts for my registered members. Also the only people that use the IP icon/text are Admins,
Moderators, or Super Moderators.
So I just made a small hack to showthread.php and thought some of you might find this useful:
Hack Directions (tested on vb2.0.1)
In Showthread.php:
Find the following:
if ($post[ip]!="") {
if ($logip==2) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
}
if ($logip==1) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
}
if ($logip==0) {
$post[iplogged]="";
}
} else {
$post[iplogged]="";
}
And replace it with:
if ($post[ip]!="") {
if ($logip==2) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
}
if ($logip==1 AND ($bbuserinfo['usergroupid']==6 or $bbuserinfo['usergroupid']==5 or $bbuserinfo['usergroupid']==95)) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
} elseif ($logip==1 AND ($bbuserinfo['usergroupid']!=6 or $bbuserinfo['usergroupid']!=5 or $bbuserinfo['usergroupid']!=95)) {
$post[iplogged]="";
}
if ($logip==0) {
$post[iplogged]="";
}
} else {
$post[iplogged]="";
}
Next: Be sure to go through the function above and make sure that the 'usergroupid'
matches that of your Administrators, Moderators, and Super Moderators
for both the 'if' and 'elseif' statments in that script.
For example: my 'usergroupid' (s) looked like this:
$bbuserinfo['usergroupid']==5 (Super Mods)
$bbuserinfo['usergroupid']==6 (Mods)
$bbuserinfo['usergroupid']==95 (Admins)
Just something small to keep the administrative ideas away from the users as
much as possible to limit the users ideas of possible security threats as well as space
saving for the postbit template. :)
With IP Icon - What Admins/Mods/Super Mods See
http://images.paintballcity.com/w_ipicon.gif
Without IP Icon - What Members See
http://images.paintballcity.com/wo_ipicon.gif
I noticed that the IP Logged GIF or TEXT was just taking up some valuable icon space in my
posts for my registered members. Also the only people that use the IP icon/text are Admins,
Moderators, or Super Moderators.
So I just made a small hack to showthread.php and thought some of you might find this useful:
Hack Directions (tested on vb2.0.1)
In Showthread.php:
Find the following:
if ($post[ip]!="") {
if ($logip==2) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
}
if ($logip==1) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
}
if ($logip==0) {
$post[iplogged]="";
}
} else {
$post[iplogged]="";
}
And replace it with:
if ($post[ip]!="") {
if ($logip==2) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
}
if ($logip==1 AND ($bbuserinfo['usergroupid']==6 or $bbuserinfo['usergroupid']==5 or $bbuserinfo['usergroupid']==95)) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
} elseif ($logip==1 AND ($bbuserinfo['usergroupid']!=6 or $bbuserinfo['usergroupid']!=5 or $bbuserinfo['usergroupid']!=95)) {
$post[iplogged]="";
}
if ($logip==0) {
$post[iplogged]="";
}
} else {
$post[iplogged]="";
}
Next: Be sure to go through the function above and make sure that the 'usergroupid'
matches that of your Administrators, Moderators, and Super Moderators
for both the 'if' and 'elseif' statments in that script.
For example: my 'usergroupid' (s) looked like this:
$bbuserinfo['usergroupid']==5 (Super Mods)
$bbuserinfo['usergroupid']==6 (Mods)
$bbuserinfo['usergroupid']==95 (Admins)
Just something small to keep the administrative ideas away from the users as
much as possible to limit the users ideas of possible security threats as well as space
saving for the postbit template. :)
With IP Icon - What Admins/Mods/Super Mods See
http://images.paintballcity.com/w_ipicon.gif
Without IP Icon - What Members See
http://images.paintballcity.com/wo_ipicon.gif