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: Limit the number of comments?  (Read 2812 times)

0 Members and 1 Guest are viewing this topic.

Aleister

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Limit the number of comments?
« 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!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Limit the number of comments?
« Reply #1 on: July 22, 2005, 07:39:45 am »

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

gonzalezea

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Limit the number of comments?
« Reply #2 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
Logged

Aleister

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Limit the number of comments?
« Reply #3 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!
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 16 queries.