steve71
07-01-2007, 05:29 PM
// 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
This is from the circle rep hack.
https://vborg.vbsupport.ru/showthread.php?t=118770
Anybody able to tweak this so it works with 3.6.7?
Currently it doesn't seem to allow the reverse rep..in other words if I give a member 5 points, I cannot deduct 5 points afterwards and visa versa. The attempt appears to have been successful, but no change to their totals.
// 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
This is from the circle rep hack.
https://vborg.vbsupport.ru/showthread.php?t=118770
Anybody able to tweak this so it works with 3.6.7?
Currently it doesn't seem to allow the reverse rep..in other words if I give a member 5 points, I cannot deduct 5 points afterwards and visa versa. The attempt appears to have been successful, but no change to their totals.