how to add :date + time !

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
Martien
Posts: 6
Joined: Tue Oct 19, 2010 7:41 pm

how to add :date + time !

Post by Martien »

Script URL:
Version of script: 1.7
Hosting company: Hosting2go.nl
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: This forum ,google

Write your message below:

Hi , is it possible to show the date +time when a message has been posted ?

Kind regards Martien
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: how to add :date + time !

Post by Henrie »

Hello Martien,

In the following post, you can find instructions on how to add additional date and time functions.
viewtopic.php?p=12709#p12709

But because maybe it is to much for what you want to do, here in short to only add time:

In the file gbook.php find lines 878-882 (in version 1.7):

Code: Select all

        $added = $lang['m'.$m] . date(" j, Y") . " at " . date("G:i");
    }
    else
    {
        $added = date("F j, Y");
and change it something like:

Code: Select all

		$added = $lang['m'.$m] . date(" j, Y") . " at " . date("G:i");
    }
    else
    {
        $added = date("F j, Y"). " at " . date("G:i");
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.
Martien
Posts: 6
Joined: Tue Oct 19, 2010 7:41 pm

Re: how to add :date + time !

Post by Martien »

Henry youre the best jihaAAAAAA thanks i did it ! :mrgreen:

Now the date and time is shown ! many many thanks

Cheers mate ( ik drink een biertje op jou :lol: )
cAdams
Posts: 40
Joined: Thu Sep 15, 2011 10:52 pm

Re: how to add :date + time !

Post by cAdams »

what code determines if the submitted post was am or pm?
To All UALs (Unreliable Arrogant Liars), Go Play On The Motorway
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: how to add :date + time !

Post by Henrie »

cAdams wrote:what code determines if the submitted post was am or pm?
look here for info about date function: http://www.php.net/manual/en/function.date.php

Greetings,
Henrie

_________________________________________________________________________________________
.
If you would like to thank me for my help, stop asking questions ;-).

To thank Klemen (PHPJunkyard author), buy Klemen a beer!
cAdams
Posts: 40
Joined: Thu Sep 15, 2011 10:52 pm

Re: how to add :date + time !

Post by cAdams »

EXACTLY what i need thanx Henrie :wink:
To All UALs (Unreliable Arrogant Liars), Go Play On The Motorway
Post Reply