Question on Coppermine rating Question on Coppermine rating
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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