could kinda be bad, if a user has made 300 posts in the forums then thats 300 extra queries per post, you should cache it.
PHP Code:
if (!isset($posttotal[$post[userid]])) {
$grabthreadids=$DB_site->query("SELECT threadid FROM post WHERE post.userid='$post[userid]' AND post.visible=1");
$post[thisforumonly] = "0";
while ($getcount=$DB_site->fetch_array($grabthreadids)) {
$checkforumid=$DB_site->query_first("SELECT forumid FROM thread WHERE threadid=$getcount[threadid] AND thread.visible=1");
if ($checkforumid[forumid] == $forum[0]) {
$post[thisforumonly]++;
}
}
$posttotal[$post[userid]] = $post[thisforumonly];
}
else {
$post[thisforumonly] = $posttotal[$post[userid]];
}