not showing the IP in the guestbook

Creating and modifying plugins.
Post Reply
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

not showing the IP in the guestbook

Post by Col. Kurtz »

how to disable the feature that shows the IP adress in the guestbook?
Marc
falk
Regular
Posts: 512
Joined: Tue Sep 27, 2005 10:16 am
Location: DD
Contact:

Post 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 ;-)
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Post by Col. Kurtz »

works fine!

THX!!
Marc
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Hi,

is it possible to show the IP for Admins only?

Regards, Harald
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Harald Weingaertner
Regular
Posts: 474
Joined: Mon Mar 27, 2006 12:32 am

Post by Harald Weingaertner »

Thanks, that worked! (of course)
Post Reply