Weight rating by user group Weight rating by user group
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Weight rating by user group

Started by kehbop, November 23, 2005, 05:24:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kehbop

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

Nibbler

Oh yes they are.

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

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

kehbop

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