If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
How to retrieve latest comments in advacned guestbook 2.3.1  XML
Forum Index » Support Forum
Author Message
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
Carbonize
Master
[Avatar]

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
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
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
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';
Carbonize
Master
[Avatar]

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
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Carbonize
Master
[Avatar]

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
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



Carbonize,

some how this script don't get the database comments and store in selective.txt.

thanks
Carbonize
Master
[Avatar]

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
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



Thanks Carbon

Khang
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
Carbonize
Master
[Avatar]

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
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Anonymous



THanks in advance Carbonie. I really need to have this done ASAP.

THanks again,

Khang
Carbonize
Master
[Avatar]

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
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum