Rating 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

Rating

Started by ibanez, December 05, 2006, 12:39:50 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ibanez

Hello,
cpg rating system is insufficient! Please visit www.fotokritik.com
Rating system example:
rating1=-1
rating2= 0
rating3=+1
rating4=+2
rating5=+3
rating6=+4

for example 5 person
2+1+2+(-1)+3=7/5=1.4
can we recreate generate plug-in or code

Best regards

ibanez

we need geometric calculate!

Joachim Müller

OK, you're welcome to modify the code accordingly - go ahead.

ibanez

Quote from: GauGau on January 05, 2007, 09:34:29 AM
OK, you're welcome to modify the code accordingly - go ahead.
Formul is attached
example:
1.user 4 point
2.user 3 point
3.user 4 point

³√4x3x4




ibanez

okey
Formula:

a=user1(rate)*user2(rate)*user3(rate)
a=4*3*4
n=votes
n=3
pow(a,1/n)=3.6 Geometric Average

How is PHP code?


ibanez

open ratepic.php
and find
$new_rating = round(($row['votes'] * $row['pic_rating'] + $rate * 2000) / ($row['votes'] + 1));
and replace
$new_rating = pow( ( pow($row['pic_rating'],$row['votes'])*$rate*2000) , (1/($row['votes']+1)) );
that's all

rating = geometric average