Get date/time with Admin reply

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
Fleshwound
Posts: 2
Joined: Sat Jan 30, 2010 10:54 pm

Get date/time with Admin reply

Post by Fleshwound »

Script URL:
Version of script: 1.7
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi!
First of all I'd like to thank you and give you kudos for this awesome script!

And for the second I'm wondering if it is possible to add date/time with a admin reply? (And to have it along with the reply line to avoid confusion)

/Fleshie
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Fleshie,

The easiest way to do this is as follows:
Open gbook.php file and find line 465

Code: Select all

	$myline[7] = $comments;
and change it to:

Code: Select all

	$myline[7] = " (" . date("F j, Y") . "):" . $comments;
Then in language.inc.php find

Code: Select all

$lang['t30']='Admin reply:';
and change it to

Code: Select all

$lang['t30']='Admin reply';
This writes the date in the reply field of the guestbook entries file. A better way to have it more customisable when you want to change the layout is to write the reply date in a separate field. But this could break compatability with future versions of GBook and is very much harder to accomplish.

If you want a different date format, go the the following site to see what is possible: http://www.php.net/manual/en/function.date.php

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Fleshwound
Posts: 2
Joined: Sat Jan 30, 2010 10:54 pm

Post by Fleshwound »

Hi Henrie!
Thanx for the fast response!
I'll do the changes you posted right now.

A "beta"-version of my guestbook can be seen here:
http://psm.site88.net/gbook17/gbook.php

(It will be moved to another site once I've got it the way I want it)

Regards
Fleshie
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Good luck with modifying the guestbook.
If you have questions, don't hesitate to ask.

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Post Reply