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: Weight rating by user group  (Read 3303 times)

0 Members and 1 Guest are viewing this topic.

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Weight rating by user group
« on: November 23, 2005, 05:24:54 am »

How and where do I make it so that rating files is weighted depending on user group. In this case, I am using a bridge to phpBB so the user groups are not in the typical table.

thanks
Logged

Nibbler

  • Guest
Re: Weight rating by user group
« Reply #1 on: November 23, 2005, 01:28:04 pm »

Oh yes they are.

Take a look at ratepic.php, and add your weight factor into the formula:

Code: [Select]
$new_rating = round(($row['votes'] * $row['pic_rating'] + $rate * 2000) / ($row['votes'] + 1));
Logged

kehbop

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Weight rating by user group
« Reply #2 on: November 24, 2005, 02:52:20 am »

Yeah I had found that. Just I know very little about writing php code. I can only edit it a little.

I'm assuming that the user group variable are already there. I guess I would just make an if-then statement where if the usergroup is something, then update that vote. Then repeat it for each group I want to change.

Can you explain how the equation works? I need someone to write that little part for me...


Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.