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: Rating  (Read 3800 times)

0 Members and 1 Guest are viewing this topic.

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Rating
« on: December 05, 2006, 12:39:50 pm »

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
« Last Edit: January 19, 2007, 07:52:02 am by GauGau »
Logged

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Rating
« Reply #1 on: January 04, 2007, 04:57:03 pm »

we need geometric calculate!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Rating
« Reply #2 on: January 05, 2007, 09:34:29 am »

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

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Rating
« Reply #3 on: January 09, 2007, 10:21:16 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



Logged

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Rating
« Reply #4 on: January 12, 2007, 10:46:04 am »

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?

Logged

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Rating
« Reply #5 on: January 18, 2007, 11:30:45 am »

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

Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.