ok i think i have fixed this
the code was
Code:
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "reputation (postid, reputation, userid, whoadded, reason, dateline)
VALUES ($postid, $score, $userid, $bbuserinfo[userid], '" . addslashes(fetch_censored_text($reason)) . "','" . TIMENOW . "')
// ## <ucs>
if ($vboptions['uttpoints_enablesystem'] == '1')
{ // It's enabled! Yay!
if ($score > '0')
{ // If the amount of reputation is positive...
if ($vboptions['uttpoints_pointsforgreputation'] != '0')
{ // Needed value is not 0... good.
$givethempoints = ($vboptions['uttpoints_pointsforgreputation'] * $score);
}
}
else
{ // If the amount of reputation is negative...
if ($vboptions['uttpoints_pointsforbreputation'] != '0')
{ // Needed value is not 0... good.
$givethempoints = ($vboptions['uttpoints_pointsforbreputation'] * $score);
}
}
if (isset($givethempoints))
{ // If they get money....
// Send the query and we're done.
$DB_site->query("UPDATE ".TABLE_PREFIX . $vboptions[uttpoints_pointtable]." SET ".$vboptions[uttpoints_pointsfield]."=".$vboptions[uttpoints_pointsfield]."+".$givethempoints." WHERE userid='$userinfo[userid]'");
}
}
// ## </ucs>");
but i moved the ucs code after the ");
Code:
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "reputation (postid, reputation, userid, whoadded, reason, dateline)
VALUES ($postid, $score, $userid, $bbuserinfo[userid], '" . addslashes(fetch_censored_text($reason)) . "','" . TIMENOW . "')
");
// ## <ucs>
if ($vboptions['uttpoints_enablesystem'] == '1')
{ // It's enabled! Yay!
if ($score > '0')
{ // If the amount of reputation is positive...
if ($vboptions['uttpoints_pointsforgreputation'] != '0')
{ // Needed value is not 0... good.
$givethempoints = ($vboptions['uttpoints_pointsforgreputation'] * $score);
}
}
else
{ // If the amount of reputation is negative...
if ($vboptions['uttpoints_pointsforbreputation'] != '0')
{ // Needed value is not 0... good.
$givethempoints = ($vboptions['uttpoints_pointsforbreputation'] * $score);
}
}
if (isset($givethempoints))
{ // If they get money....
// Send the query and we're done.
$DB_site->query("UPDATE ".TABLE_PREFIX . $vboptions[uttpoints_pointtable]." SET ".$vboptions[uttpoints_pointsfield]."=".$vboptions[uttpoints_pointsfield]."+".$givethempoints." WHERE userid='$userinfo[userid]'");
}
}
// ## </ucs>
I think thats a small error in the installation guide as im pretty sure it said add that code in after
Code:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user
SET reputation = $userinfo[reputation],
reputationlevelid = $reputationlevelid
WHERE userid = $userinfo[userid]
and not after
Code:
$DB_site->query("
UPDATE " . TABLE_PREFIX . "user
SET reputation = $userinfo[reputation],
reputationlevelid = $reputationlevelid
WHERE userid = $userinfo[userid]
");