Ok, I was right, it was a different query. Replace the yourpost query with this one and be ready to celebrate!
PHP Code:
$yourpost = $DB_site->query_first("
SELECT forum.title, forum.forumid, COUNT( post.postid ) AS yourposts, SUM( IF( thread.postuserid = $bbuserinfo[userid] AND post.dateline = thread.dateline , 1, 0 ) ) AS yourthreads
FROM " . TABLE_PREFIX . "forum AS forum, " . TABLE_PREFIX . "thread AS thread, " . TABLE_PREFIX . "post AS post
WHERE forum.forumid = thread.forumid
AND thread.threadid = post.threadid
AND post.userid = $bbuserinfo[userid]
AND forum.forumid = $forumid
GROUP BY forum.forumid
ORDER BY yourposts
DESC LIMIT 1
");