Question on Coppermine rating Question on Coppermine rating
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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