Limit the number of comments? Limit the number of comments?
 

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]

Main Menu

Limit the number of comments?

Started by Aleister, July 22, 2005, 06:50:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aleister

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!

Joachim Müller

not built in, and afaik no mod existing to accomplish this.

gonzalezea

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

Aleister

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!