// 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;
}
#####
// for every certain number of posts, gain a point
if ($vboptions['pcpower'])
{
$postfactor = intval($rawposts / $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 (($rawposts < $vboptions['minreputationpost']) OR ($post['reputation'] < $vboptions['minreputationcount']))
{
$score = 0;
}
That works for me. Good luck.
It actually work well now. Actually it works extremely well. Thanks for fixing it hambil!
Guys, I think I found a MUCH simpler way to do this. I assumed there was a function in vB to compute the reputation power, and there is. Why not use this function?
if I've installed the way the first post says to, am I supposed to update anything. I've read the thread and several people say to change several things.
if I've installed the way the first post says to, am I supposed to update anything. I've read the thread and several people say to change several things.
My change is a complete replacement of the first post. I was hoping somone could validate it, so I knew I wasn't just being crazy...then I'd post it as a completely different mod.
Little problem (I installed the way it is in the first post of the thread)
I have some (small percentage that I can tell) members that display zero -- but when I go in and look at their profile in Admincp -- they'll have a power of say 6. One member PM'd me screaming his power was zero and what had he done -- then pm'd be that it now shows 6. I look at his post and it shows zero -- but when I look at his profile in admncp -- it is 6.
Obviously -- those are the ones screaming conspiracy. How can I fix this?
So sorry but i use Use Legacy (Vertical) Postbit Template and in my template when i use Use Legacy (Vertical) Postbit Template dot show this
what can i do to fix this problem
thanks
hi
using the edit that Dune gave but there is a slight problem
Anytime someone reps someone the rep points/power display dissapears until the page reloads
I added it like this
Rep Power:
Rep:
so the template edits were in post bit legacy near where the rep is displayed