Great! Ok, here we go!
Replace these 2 lines in that code:
PHP Code:
$statscache['topposterpercent'] = round(100 * ($topposter[posts] / ($totalthreads + $totalposts)), 2);
$statscache['topthreadspercent'] = round(100 * ($topstarter[count] / $totalthreads), 2);
with this:
PHP Code:
if($statscache['topposterpercent'] > 100)
{
$statscache['topposterpercent'] = vb_number_format(($topposter[posts] / ($totalthreads + $totalposts)) * 100 / 1000, 2 ) . '%';
}
else
{
$statscache['topposterpercent'] = vb_number_format(($topposter[posts] / ($totalthreads + $totalposts)) * 100, 2) . '%';
}
if($statscache['topthreadspercent'] > 100)
{
$statscache['topthreadspercent'] = vb_number_format(($topstarter[count] / $totalthreads) * 100 / 1000, 2 ) . '%';
}
else
{
$statscache['topthreadspercent'] = vb_number_format(($topstarter[count] / $totalthreads) * 100, 2) . '%';
}
and delete these:
PHP Code:
// Ditch the 2 decimal zeros on a whole percent ...
if (($statscache['topposterpercent'] % 10) == 0)
$statscache['topposterpercent'] = vb_number_format($statscache['topposterpercent']) . '%';
else
$statscache['topposterpercent'] = vb_number_format($statscache['topposterpercent'], 2) . '%';
// Ditch the 2 decimal zeros on a whole percent ...
if (($statscache['topthreadspercent'] % 10) == 0)
$statscache['topthreadspercent'] = vb_number_format($statscache['topthreadspercent']) . '%';
else
$statscache['topthreadspercent'] = vb_number_format($statscache['topthreadspercent'], 2) . '%';
and let me know what happens. make sure you set the update time at 0 to test this.