Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Question on Coppermine rating  (Read 2629 times)

0 Members and 1 Guest are viewing this topic.

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Question on Coppermine rating
« 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

Code: [Select]
// 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...:)
« Last Edit: December 02, 2007, 10:08:43 am by GauGau »
Logged

Nibbler

  • Guest
Re: Question on Coppermine rating
« Reply #1 on: December 01, 2007, 12:00:52 am »

Code: [Select]
$new_rating = $row['pic_rating'] + $rate;
You'll probably need to change the code where ratings are actually displayed too.
Logged

Steve-R

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Question on Coppermine rating
« Reply #2 on: December 01, 2007, 12:02:33 am »

Super fast reply!! Will give it a go.

Many thanks Nibbler, much appreciated!

Steve...:)
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.