Need help creating comment block
Rob3rt - March 12, 2008 - 08:55
| Project: | Gallerix |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I need a block displying the last comments made for the gcomments module. In other words, the comments made to the pictures.
Silvio gave me this code,
<?php
$output = ''; $comments = db_query("SELECT * FROM {gallerix_comments} ORDER BY timestamp"); while ($comment = db_fetch_object($comments)) { $output .= $comment->comment; } return $output;
?>But, as new as I am to this coding world, I do not know what more to do. I have added this code in a block, but it just shows the last comments in plain text, without any links. So its just messy.
I would like the comment text in the block to be the album title for the image that has been commented. And a link to the image. Perhaps a timestamp to if it is possible. Something like this:
Last Picture Comments
Album title - (1 minute ago)
Album title2 - (2 minutes ago)
Album title3 - (4 minutes ago)
Is this possible to make?

#1
Can no one help me?