Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: How can I limit number of comments to be displayed with big picture  (Read 3869 times)

0 Members and 1 Guest are viewing this topic.

bimages

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

A number of pictures on my site have a large number of comments. I have noticed that it take toooooooo much time to display a big image if the number of comments is more than say 20. How can I limit the number of comments to be displayed with the big image.

Thanks for your help....
« Last Edit: July 16, 2005, 01:02:58 pm by GauGau »
Logged

Nibbler

  • Guest
Re: How can I limit number of comments to be displayed with big picture
« Reply #1 on: July 15, 2005, 02:54:16 pm »

Find this query in displayimage.php, and add a LIMIT and chnage the ORDER BY too if you like

Code: [Select]
$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");
Code: [Select]
$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 LIMIT 20");
Logged

bimages

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: How can I limit number of comments to be displayed with big picture
« Reply #2 on: July 16, 2005, 07:17:23 am »

Thanks a lot for your help...

Can I also place a link or an option if someone wish to read all the comments.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.