hi,
i'm using vbulletin 4.1.2 with vBExperience 4.0.4
i notice that post from deleted topic is calculated.
so for example, user A creates 20 spam topic, he will have 20 posts
even moderator deletes that 20 topics, his 20 posts still calculated toward his point
it is because while a thread deleted, table_post.visible still have value 1, but table_thread.visible have value 2
and vb experience recount calculation algorithm is (at class_xperience.php line 140)
PHP Code:
$posts = $vbulletin->db->query_read("SELECT
COUNT(*) AS count_posts
FROM " . TABLE_PREFIX . "post AS p
INNER JOIN " . TABLE_PREFIX . "thread as t ON p.threadid=t.threadid
WHERE p.visible=1".$IgnoreForum."
AND p.userid=".$user['userid']);
it didn't check whether the post belong to deleted thread or not (didnt check thread.visible); compared to vbulletin post calculation algorithm at misc.php line 268
PHP Code:
$totalposts = $db->query_first("
SELECT COUNT(*) AS posts
FROM " . TABLE_PREFIX . "post AS post
INNER JOIN " . TABLE_PREFIX . "thread AS thread ON (thread.threadid = post.threadid)
WHERE post.userid = $user[userid]
AND thread.forumid IN (0$gotforums)
AND thread.visible = 1
AND post.visible = 1
");
it check thread.visible =1 on where clauses
currently i change
PHP Code:
WHERE p.visible=1".$IgnoreForum."
to
PHP Code:
WHERE p.visible=1".$IgnoreForum." AND t.visible=1
it fixed the problem; hope this bug (if it is really a bug) fixed on next build