// 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(str_replace($bbuserinfo['lang_thousandsep'], '', $user['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 ((str_replace($bbuserinfo['lang_thousandsep'], '', $user['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;
}
I have combined this with "show numerical reputation points" (the green dots are neat, but my users wanted a numerical value too). Only problem is if my users choose to turn their rep visibility off, the little green dots go to black but the rep power & number still shows up.