Question on Coppermine rating Question on Coppermine rating
 

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

Question on Coppermine rating

Started by Steve-R, November 30, 2007, 11:53:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Steve-R

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...:)

Nibbler

$new_rating = $row['pic_rating'] + $rate;

You'll probably need to change the code where ratings are actually displayed too.

Steve-R

Super fast reply!! Will give it a go.

Many thanks Nibbler, much appreciated!

Steve...:)