coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Steve-R on November 30, 2007, 11:53:56 PM

Title: Question on Coppermine rating
Post by: Steve-R on November 30, 2007, 11:53:56 PM
I'm assuming that the following code from ratepic.php is the part that works out the average rating or score when members vote using the star system. And the line in bold is the actual code

// Update picture rating
$new_rating = round(($row['votes'] * $row['pic_rating'] + $rate * 2000) / ($row['votes'] + 1));


If this is correct, how can I change it so that new rating points are just added?

Thanks in advance

Steve...:)
Title: Re: Question on Coppermine rating
Post by: Nibbler on December 01, 2007, 12:00:52 AM
$new_rating = $row['pic_rating'] + $rate;

You'll probably need to change the code where ratings are actually displayed too.
Title: Re: Question on Coppermine rating
Post by: Steve-R on December 01, 2007, 12:02:33 AM
Super fast reply!! Will give it a go.

Many thanks Nibbler, much appreciated!

Steve...:)