Page 1 of 1

not showing the IP in the guestbook

Posted: Tue Mar 28, 2006 6:13 pm
by Col. Kurtz
how to disable the feature that shows the IP adress in the guestbook?

Posted: Wed Mar 29, 2006 8:24 am
by falk
I hope:

open serendipity_event_guestbook.php

look for
----------------
echo "<small class='commentmetadata'>";
echo htmlspecialchars(serendipity_strftime($this->get_config('dateformat'), $row['stamp']));
echo ', IP: '.htmlspecialchars($row['ip']);
echo "</small>\n <p>";
----------------
change to
----------------
echo "<small class='commentmetadata'>";
echo htmlspecialchars(serendipity_strftime($this->get_config('dateformat'), $row['stamp']));
//echo ', IP: '.htmlspecialchars($row['ip']);
echo "</small>\n <p>";
----------------

good luck ;-)

Posted: Wed Mar 29, 2006 10:15 am
by Col. Kurtz
works fine!

THX!!

Posted: Wed Jun 28, 2006 3:03 pm
by Harald Weingaertner
Hi,

is it possible to show the IP for Admins only?

Regards, Harald

Posted: Wed Jun 28, 2006 3:50 pm
by garvinhicking
Hi!

Yes, if you change that code to

Code: Select all

echo "<small class='commentmetadata'>";
echo htmlspecialchars(serendipity_strftime($this->get_config('dateformat'), $row['stamp']));
if (serendipity_userLoggedIn()) {
echo ', IP: '.htmlspecialchars($row['ip']);
}
echo "</small>\n <p>"; 
HTH,
Garvin

Posted: Fri Jun 30, 2006 1:16 am
by Harald Weingaertner
Thanks, that worked! (of course)