MPDev
06-15-2006, 10:00 PM
On our site we have had alot of problem with small groups of people circle-repping each other to boost their rep power. I came up with a simple code modification (no plugin space for this) that resets all previous rep scores a user has given the user they are repping and then applies the new rep score to their reputation.
Esentially this removes the incentive for circle-repping and only those who get repped positively the most end up with the highest rep score.
In reputation.php, at line 160is find:
// Determine this user's reputationlevelid.
and above it add:
// MDP
// Reset older rep to 0 and then get new count
$db->query_write("
UPDATE " . TABLE_PREFIX . "reputation SET reputation=0 WHERE userid=$userid AND whoadded=" . $vbulletin->userinfo['userid']
);
// Now get current reputation level
$newrep = $db->query_first("
SELECT sum(reputation) AS newtotal
FROM " . TABLE_PREFIX . "reputation
WHERE userid=$userid
");
$userinfo['reputation'] = $newrep['newtotal'];
// End
Now when someone reps another member, their old reps are set to 0 (leaving the comments) and their reputation score is reset and then the new power is added.
No more circle-repping.
Esentially this removes the incentive for circle-repping and only those who get repped positively the most end up with the highest rep score.
In reputation.php, at line 160is find:
// Determine this user's reputationlevelid.
and above it add:
// MDP
// Reset older rep to 0 and then get new count
$db->query_write("
UPDATE " . TABLE_PREFIX . "reputation SET reputation=0 WHERE userid=$userid AND whoadded=" . $vbulletin->userinfo['userid']
);
// Now get current reputation level
$newrep = $db->query_first("
SELECT sum(reputation) AS newtotal
FROM " . TABLE_PREFIX . "reputation
WHERE userid=$userid
");
$userinfo['reputation'] = $newrep['newtotal'];
// End
Now when someone reps another member, their old reps are set to 0 (leaving the comments) and their reputation score is reset and then the new power is added.
No more circle-repping.