The simpler media website CMS
Forum search only. You might also want to search on the main site's user guide.
Forum RSS
Visit the troubleshooting guide.
Visit the paid support page.
Your support helps pay for this server, and helps development of zenphoto. Thank you!
Visit the donations page
Comments
You could hack this function to show everything I would imagine:
`function show_latest_comments($number) {
echo '
echo '
';$author commented on
$comment ";
';$comments = query_full_array("SELECT c.id, i.title, i.filename, a.folder, a.title AS albumtitle, c.name, c.website,"
. " c.date, c.comment FROM ".prefix('comments')." AS c, ".prefix('images')." AS i, ".prefix('albums')." AS a "
. " WHERE c.imageid = i.id AND i.albumid = a.id ORDER BY c.id DESC LIMIT $number");
$thiscomment = 'odd';
foreach ($comments as $comment) {
$author = $comment['name'];
$album = $comment['folder'];
$image = $comment['filename'];
$albumtitle = $comment['albumtitle'];
if ($comment['title'] == "") {
$title = $image;
} else {
$title = $comment['title'];
}
$website = $comment['website'];
$comment = truncate_string($comment['comment'], 123);
$link = $albumtitle.' / '.$title ;
$short_link = my_truncate_string($link, 20);
echo "
. (zp_conf("mod_rewrite") ? WEBPATH."/$album/$image" : WEBPATH."/index.php?album=".urlencode($album)."&image=".urlencode($image))
. "\" title=".$link.">$short_link:
if('odd'==$thiscomment) { $thiscomment = 'even'; } else { $thiscomment = 'odd'; }
}
echo '
echo '
}`
because i have a comments link on my page yet you can only view it if you log in as an admin.
All you have to do is place the code above in your custom functions file, and then call it wherever you want to display all your comments.
thus, <?php show_latest_comments() ?> would display the latest comments anywhere on your page you want.