forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: alig8r on January 23, 2011, 04:58:34 am

Title: Need to alter rating system
Post by: alig8r on January 23, 2011, 04:58:34 am
Hi there. Recently installed CPG 1.5 (brilliant) for a new photo contest we're running.  What I need to accomplish is this:

One vote per IP per day.

I understand about changing the stars to '1' but not sure about the 1 vote per IP per day.

I was able to accomplish this last year in CPG 1.4. as I modified the code according to a thread in your forum (cannot seem to locate this thread now)

Would you tell me the best way to go about this.  Thank you for your time.
Title: Re: Need to alter rating system
Post by: Αndré on January 24, 2011, 11:25:01 am
It would be great if you could search and find that thread for us, so we don't have to invent the wheel twice. We don't delete threads, so it have to be somewhere.
Title: Re: Need to alter rating system
Post by: alig8r on January 24, 2011, 08:40:55 pm
Right you are...  found them

http://forum.coppermine-gallery.net/index.php/topic,50650.0.html
 (http://forum.coppermine-gallery.net/index.php/topic,50650.0.html)


http://forum.coppermine-gallery.net/index.php/topic,54319.0.html (http://forum.coppermine-gallery.net/index.php/topic,54319.0.html)
Title: Re: Need to alter rating system
Post by: Αndré on January 25, 2011, 04:39:05 pm
Please try the following. Open ratepic.php, find
Code: [Select]
$clean_before = time() - $CONFIG['keep_votes_time'] * 86400;and replace with
Code: [Select]
$clean_before = time() - 86400;
Title: Re: Need to alter rating system
Post by: alig8r on March 01, 2011, 01:53:53 am
This did not work.
Title: Re: Need to alter rating system
Post by: Αndré on March 01, 2011, 08:40:32 am
Please give some more information if you need a solution. What exactly happens? With the modification you should be able to vote every 24 hours. Do you have 'Keep detailed vote statistics' enabled?