
01-02-2005, 03:34 PM
|
 |
|
|
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by MajorFm.com
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]
");
|
There are no errors inside of the guide that we are aware of, most of the time when there is an error it is on the end user
and yes there is a paypal action that is avaible at Geeky Designs forums.
|