PDA

View Full Version : 'IP Logged' link visible only to Mods/Admins?


MarkB
09-07-2001, 04:01 AM
Hi

Is it possible to log people's IPs, but have the 'IP Logged' link only visible to moderators and admins?

We like to log IPs for security's sake (and making sure nobody is posing as someone else for those forums that we make open to guests for posting), but we don't want people to freak out as they have been on one of our new hosted forums.

Any help is appreciated :)

Mark

Scott MacVicar
09-07-2001, 08:49 AM
// do ip addresses
if ($post[ip]!="") {
if ($logip==2 && ($bbuserinfo[usergroupid]==6 || ismoderator($forum[forumid]))) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
}
if ($logip==1 && ($bbuserinfo[usergroupid]==6 || ismoderator($forum[forumid]))) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
}
if ($logip==0) {
$post[iplogged]="";
}
} else {
$post[iplogged]="";
}

replace that entire bit in functions.php

roughly line 240 to 253

you will also need to edit the following templates
postbit_ip_show
and
postbit_ip_hidden
add a | and a space at the start of both templates

then open the postbit template
<p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></p>

look for the above code and remove the | before the $post[iplogged]

hacker
10-01-2001, 10:17 PM
Replace the bits with what? :confused: