I also had the % problem. It seems that this happens always if your board uses . instead of , (e.g. 1.500 posts instead of 1,500 posts).
To fix this problem do the following:
Replace the original code with this modified version of
buro9's Code:
Code:
// HACK : START : USER ACTIVENESS
$show[useractiveness] = 0 ;
if ($userinfo[posts]) {
$forumids = implode("', '", get_noaccess_forumids());
$tfarray = $DB_site->query_first(
"SELECT COUNT(*) AS aposts," . TABLE_PREFIX . "forum.title AS aftitle, " . TABLE_PREFIX . "thread.forumid AS aforumid
FROM " . TABLE_PREFIX . "thread
LEFT JOIN " . TABLE_PREFIX . "post ON " . TABLE_PREFIX . "post.threadid = " . TABLE_PREFIX . "thread.threadid
LEFT JOIN " . TABLE_PREFIX . "forum ON " . TABLE_PREFIX . "forum.forumid = " . TABLE_PREFIX . "thread.forumid
LEFT JOIN " . TABLE_PREFIX . "deletionlog ON ( " . TABLE_PREFIX . "deletionlog.primaryid = " . TABLE_PREFIX . "thread.threadid AND type = 'thread' )
WHERE " . TABLE_PREFIX . "forum.forumid NOT IN ( '$forumids' )
AND " . TABLE_PREFIX . "thread.visible=1
AND " . TABLE_PREFIX . "deletionlog.primaryid IS NULL
AND " . TABLE_PREFIX . "post.userid = $userinfo[userid]
GROUP BY " . TABLE_PREFIX . "forum.forumid ORDER BY 1 DESC LIMIT 1");
$_activeposts = $tfarray['aposts'];
$_activeurl = "<a href=\"forumdisplay.php?$session[sessionurl]f=".$tfarray['aforumid']."\">".$tfarray['aftitle']."</a>";
$_activeperc = round(((implode('',explode('.',$_activeposts)) / implode('',explode('.',$userinfo['posts'])) ) * 100), 2)."%" ;
$show[useractiveness] = 1 ;
}
// HACK : END : USER ACTIVENESS
The only thing replaced in this modified version are 2 . instead of , in the $_activeperc line.
As this isn't my code, credits belong to buro9 for his work.
@buro9
I hope you don't mind me modifying your code.