Is it normal that after a post (that was given reputation) or a thread (that contains post that were given reputation) are deleted that the reputation count isnt automaticaly adjusted? Is the only way for the rep to be accurate to rebuild the reputation counter?
Reputation - Deleted Post/Thread
Collapse
X
-
In my testing, rep clicks for a post are only deducted from a user's total when the post is physically deleted and the admin rebuilds the rep counters. -
This is what i did in order to at least have the reputation counter rebuild be accurate. (So that it doesnt count reputations tied to soft deleted threads/posts)
!!!I am not an expert!!! Query probably not optimal...
!!!USE AT YOUR OWN RISK!!!
Open admincp/misc.php
Find this code (line 526)
Code:// ################## Start rebuilding user reputation ###################### if ($_POST['do'] == 'rebuildreputation') { $vbulletin->input->clean_array_gpc('p', array( 'reputation_base' => TYPE_INT, )); $users = $db->query_read(" SELECT reputation.userid, SUM(reputation.reputation) AS totalrep FROM " . TABLE_PREFIX . "reputation AS reputation GROUP BY reputation.userid ");
Code:$users = $db->query_read(" SELECT post.userid, SUM(reputation.reputation) AS totalrep FROM " . TABLE_PREFIX . "post AS post LEFT JOIN ". TABLE_PREFIX . "reputation AS reputation ON(post.postid = reputation.postid) LEFT JOIN ". TABLE_PREFIX . "deletionlog AS deletionlog1 ON(post.threadid = deletionlog1.primaryid AND deletionlog1.type = 'thread') LEFT JOIN ". TABLE_PREFIX . "deletionlog AS deletionlog2 ON(post.postid = deletionlog2.primaryid AND deletionlog2.type = 'post') WHERE deletionlog1.primaryid IS NULL AND deletionlog2.primaryid IS NULL GROUP BY reputation.userid ");
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment