Sorting comments Sorting comments
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Sorting comments

Started by jensb, October 19, 2005, 06:32:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jensb

Hi !

Is there a way to display pic comments with in reversed order .. ie newest first ?

thankful for any help I get :)

regards Jens

Abbas Ali

Edit displayimage.php

Replace (in function html_comments)


$result = db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid' ORDER BY msg_id ASC");


with


$result = db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid' ORDER BY msg_id DESC");



Abbas
Chief Geek at Ranium Systems

jensb