coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: Aleister on July 22, 2005, 06:50:05 AM

Title: Limit the number of comments?
Post by: Aleister on July 22, 2005, 06:50:05 AM
I run a Coppermine gallery on one of my sites, and people are very comment-happy on it. Every image has a very large number of comments. I would like to limit this. I did not see anything in the configuration, nor in the forum after a bit of searching.

I would rather not simply erase old comments, but perhaps have a "Pages 1 of 4 - Next / Previous" type thing, or even a simple "view older comments" which then displays the full list.

It does not look like this functionality is built in (unless I missed it), so does anyone know of a good implementation?

Thanks!
Title: Re: Limit the number of comments?
Post by: Joachim Müller on July 22, 2005, 07:39:45 AM
not built in, and afaik no mod existing to accomplish this.
Title: Re: Limit the number of comments?
Post by: gonzalezea on August 26, 2005, 02:05:03 AM
Hi,

same problem occurs to me. I solved it hacking dispalyimage.php from

$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");

to

$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 limit 20");

change 20 to whatever number you want....Hope it helps. ;D

Eduardo

Using CPG 1.3.2 on W2K
Title: Re: Limit the number of comments?
Post by: Aleister on August 26, 2005, 04:34:10 AM
I actually did the same exact thing :) Although I forgot to post about it..

It actually cut the bandwidth usage for that site in half! :) (Told ya there were a lot of comments lol)

Someday I may modify it to all for a "previous comments" etc.. option, but I have too many other things I am working on ;)

Thanks for the reply though!