Author |
Message |
09/09/2004 17:44:53
|
Anonymous
|
Could someone help me to retrieve the latest comments in the guestbook for my main page. All I need just to display the latest comments and the date and time and name of the person who write the comment.
I'm new to this guestbook and also newbie to PHP / WEB.
Thank you,
Ken
|
|
11/09/2004 12:09:08
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Ok I hassled Freddy and he threw together the following:
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
19/09/2004 17:31:21
|
Anonymous
|
Hi There,
I use your code to put it in my website, bust somehow it didn't display anything to the page. I want to display the 1 column 5 rows of the latest comments, but somehow display nothing. Please help me out.
THank you,
Nhan
|
|
20/09/2004 09:26:51
|
Anonymous
|
Nice one, but what do you add in this file
guestbook/templates/selective.txt
As I see the script needs it.
$templateFile = 'guestbook/templates/selective.txt';
|
|
20/09/2004 13:29:12
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Yes I'm trying to get hold of Freddy to see what thats all about.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
20/09/2004 16:20:39
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Selective text is a template for how you want it to appear. Do not place it between php tags.
selective.txt would contain $comment[name] and $comment[comment] in it
where they should be displayed.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
20/09/2004 21:07:50
|
Anonymous
|
Carbonize,
some how this script don't get the database comments and store in selective.txt.
thanks
|
|
20/09/2004 21:42:40
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
selective.txt is just a template.
<table>
<tr>
<td>$comment[name]</td>
<td>$comment[comment]</td>
</tr>
</table>
Thats an example of what selective.txt should contain.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
23/09/2004 00:15:32
|
Anonymous
|
Thanks Carbon
Khang
|
|
24/09/2004 01:50:28
|
Anonymous
|
carbonie,
when I get the $comment[date] it gives me 1094754924 this...what is it? How can I get the date of the comment?
THanks
|
|
25/09/2004 10:40:31
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
The date is stored as a unix timestamp. I'll rewrite the script to allow the timestamp to be formatted when I get chance.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
28/09/2004 22:15:29
|
Anonymous
|
THanks in advance Carbonie. I really need to have this done ASAP.
THanks again,
Khang
|
|
29/09/2004 01:29:58
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Try
Then use $posted in the template instead of $comment[date]. You can learn more about the syntax of the date() function as well as what the letters represent at www.php.net/date
It took me a while to reply as I was busy with a paying customer who had messed up his tables.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
|