Points System Not Working For My Site

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Points System Not Working For My Site
sfinxs
CZ Super Newbie
sfinxs has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Mar 04, 2005
0.01 posts per day
Posts: 52
Points: 2,553
   
Hi, I set points for certain actions in Users Groups but no one on my site is getting points. Am I suppose to download some type of point system before it works? Thanks



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
No make sure that there is one installed. Open the mainfile.php do you see the function update_points? Try adding your name where it says username then entering some of the modules you have it set to give away points and see if it adds them to your name.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Points System Not Working For My Site
sfinxs
CZ Super Newbie
sfinxs has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Mar 04, 2005
0.01 posts per day
Posts: 52
Points: 2,553
   
Yes I do have the update_points function. It is here

function update_points($id) {
global $user_prefix, $prefix, $db, $user;
if (is_user($user)) {
if(!is_array($user)) {
$user1 = base64_decode($user);
$user1 = addslashes($user1);
$user1 = explode(":", $user1);
$username = "$user1[1]";
} else {
$username = "$user1[1]";
}
if ($db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_groups")) > '0') {
$id = intval($id);
$result = $db->sql_query("SELECT points FROM ".$prefix."_groups_points WHERE id='$id'");
$row = $db->sql_fetchrow($result);
$rpoints = intval($row['points']);
$db->sql_query("UPDATE ".$user_prefix."_users SET points=points+" . $rpoints . " WHERE username='$username'");
}
}
}




there are so many usernames... I don't know which one to add my name to and how. Can you elaborate. Thanks



Back to top Reply with quote
#4   re: Points System Not Working For My Site
sfinxs
CZ Super Newbie
sfinxs has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Mar 04, 2005
0.01 posts per day
Posts: 52
Points: 2,553
   
any help?



Back to top Reply with quote
#5   re: Points System Not Working For My Site
sfinxs
CZ Super Newbie
sfinxs has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Mar 04, 2005
0.01 posts per day
Posts: 52
Points: 2,553
   
?



Back to top Reply with quote
#6   re: Points System Not Working For My Site
sfinxs
CZ Super Newbie
sfinxs has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Mar 04, 2005
0.01 posts per day
Posts: 52
Points: 2,553
   
wow no help at all for like 2 weeks.... what a great place to get help. You guys sure are on top of things. Why mi even typing, not like anyone is reading this post.



Back to top Reply with quote
#7   re: Points System Not Working For My Site
Trubador
CZ Active Member
Trubador has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Aircraft Technician
Age: 52
Gender: Male
Status: Offline
Joined: Nov 16, 2004
0.01 posts per day
Posts: 104
Points: 4,807
   
Points system can ba a pain in the arsh m8. I suggest you probably download Cashmod and then configure everything around that for 'user_points'. Also have a search for 'group' 'user group' 'points' and 'user_points' or a combination of in google.

Trub

P.s. You may need to change the 'points' in mainfile.php to reflect 'user_points'

function update_points($id) {
    global $user_prefix, $prefix, $db, $user;
    if (is_user($user)) {
   if(!is_array($user)) {
       $user1 = base64_decode($user);
       $user1 = addslashes($user1);
       $user1 = explode(":", $user1);
           $username = "$user1[1]";
   } else {
           $username = "$user1[1]";
   }
   if ($db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_groups")) > '0') {
       $id = intval($id);
            $result = $db->sql_query("SELECT points FROM ".$prefix."_groups_points WHERE id='$id'");
       $row = $db->sql_fetchrow($result);
       $rpoints = intval($row['points']);
       $db->sql_query("UPDATE ".$user_prefix."_users SET user_points=user_points+$row[points] WHERE username='$username'");
   }
    }
}




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum