// for every certain number of posts, gain a point
if ($vboptions['pcpower'])
{
$postfactor = intval($post['posts'] / $vboptions['pcpower']);
}
else
{
$postfactor = 0;
}
// for every certain number of reputation points, gain a point
if ($vboptions['kppower'])
{
$reputationfactor = intval($post['reputation'] / $vboptions['kppower']);
}
else
{
$reputationfactor = 0;
}
// for every certain number of days registered, gain a point
$timepassed = intval((TIMENOW - $repjoindate) / 86400);
if ($vboptions['rdpower'])
{
$timefactor = intval($timepassed / $vboptions['rdpower']);
}
else
{
$timefactor = 0;
}
// compute the user's total reputation power
$score = $score + $postfactor + $timefactor + $reputationfactor;
# the following only matters for admin
$perms = fetch_permissions(0, $post['userid'], $post);
if ($perms['adminpermissions'] & CANCONTROLPANEL AND $vboptions['adminpower'])
{
$score = $vboptions['adminpower'];
}
else if (($post['posts'] < $vboptions['minreputationpost']) OR ($post['reputation'] < $vboptions['minreputationcount']))
{
$score = 0;
}
#####
Gary: Perhaps since only 3 users seem to be affected I should recreate their user accounts? Not sure how to do this without them losing their posts though which is not good. Any advice?
You can for yourself the problem with the 0 Rep Power score with the user account I created for you on my board. I pm'ed you the info so not sure if you saw it or not.
Gary: Perhaps since only 3 users seem to be affected I should recreate their user accounts? Not sure how to do this without them losing their posts though which is not good. Any advice?
You can for yourself the problem with the 0 Rep Power score with the user account I created for you on my board. I pm'ed you the info so not sure if you saw it or not.
Yeah I saw, and it's really strange; unless I receive confirmation from someone else about this problem though I think I'll leave it for now, especially since I've been real busy these days :ermm:
The template edit is on the "vB3 grey style" skin only, so make sure you have that selected.
Make sure that they actually don't have 0 reputation power before jumping to conclusions because I believe that admins are different in that their reputation power stays the same, etc. I'm not too sure on the specifics, but maybe check first to see if the user has 0 reputation power; also please make a screenshot would make life easier for me (in the admin cp when editing the user.)
No mistake. My power is currently 6, it displays as 0. I checked several mods/admins to make sure they had power, they did, it was displaying 0. If you browse the thread linked above, notice the different user groups have their names in different colours.
There is no mistake.
Correction *some* mods show the power rating also some members of other user groups do not. It would appear to be random, although it does not show for any of the 3 admins, and is missing of all but 1 of the moderators.
On an aside, I manually set the power rating in the ACP to 10 for admins - the hack then showed this value (for admins only, the mods still had 0 showing). I then reset it to 0 in the ACP (this should set admins to the same rules as everyone else) and the admins showed as 0 in the postbit - even though the ACP correctly showed my power as 6.
As a side note I have also noticed that none of my users in my created group show having incorrect values. Some as I have mentioned are 0 yet some are showing values slightly off from what is shown in the admincp.
Anyways there is definately something wrong. I think I will have to uninstall this hack until someone comes up with a solution to fix this - I have spent dozens of hours trying to figure out what it could be.
As a side note: I recreated an account for one of the affected users and merged his existing account with the new one. After doing this the rep power didn't display zero but it did display a value that was incorrect from what is shown in the admincp.
has anyone else with a large board tested this code? Can a vb dev member shed some light as to what it could be?
The power=0 issue seems random. I get it accross all user groups, regardless of actual power rating. Some read correctly, some just say 0. So far, I havent found a member with a value other than 0, which is also incorrect.