Points not being recorded or updated for anything on 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 not being recorded or updated for anything on site
XERXES
CZ Super Newbie
XERXES has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Age: 54
Gender: Male
Status: Offline
Joined: Aug 04, 2004
0.00 posts per day
Posts: 32
Points: 22,073
   
This being my first post I would like to say that this is my favorite Nuke site of all. I have been able to find answers to most of my problems in the forums here without having to ask the same question over again. However, now I have an issue that I haven't been able to find a resolution to here.

I have PHP-Nuke v7.3 installed. I setup the point values in the User Groups for each action on the site, but did not setup any User Groups. I have the Bank and Bank Summary Mods install also, and they appear to be functioning properly.

My problem is that whenever a user does anything (like answer a survey) on the site that I have assigned a points value for, their points are not being credited to them. The same is in the Forums, when a user posts a new topic or makes a reply to a topic they are not being credited with the points for those actions.

I read in other threads where it was suggested to check their mainfile.php or their includes/functions_post.php files for certain strings (ie. 'function updatepoints' and 'update_points', respectively). I have done this and none of the strings are found in either of my files.

I have attached my mainfile.php and includes/functions_post.php files.

Any and all help is very much appreciated. Thanks.



Attached Files
file_attachment.zip (18.63 KB, Downloaded: 5231 Time(s))


Back to top Reply with quote
#2   re: Points not being recorded or updated for anything on sit
XERXES
CZ Super Newbie
XERXES has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Age: 54
Gender: Male
Status: Offline
Joined: Aug 04, 2004
0.00 posts per day
Posts: 32
Points: 22,073
   
I have found in my mainfile.php file, the following:

[On or around line 266]


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


Inside my includes/functions_post.php file, I have:

[On or around line 302]


if ($mode == 'newtopic')
                {
                        $topic_id = $db->sql_nextid();
                        update_points(10);
                }


and on or around line 633 I have:


if ($mode == 'reply')
                {
                        update_points(11);
                        $sql = "SELECT ban_userid
                                FROM " . BANLIST_TABLE;
                        if (!($result = $db->sql_query($sql)))
                        {
                                message_die(GENERAL_ERROR, 'Could not obtain banlist', '', __LINE__, __FILE__, $sql);
                        }


I apologize for the incorrect post earlier. icon_neutral.gif


Back to top Reply with quote
#3   Cash Mod v2.2.1 Installed
XERXES
CZ Super Newbie
XERXES has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Age: 54
Gender: Male
Status: Offline
Joined: Aug 04, 2004
0.00 posts per day
Posts: 32
Points: 22,073
   
This morning I started a completely new site with a new database and installed Cash Mod v2.2.1. I reinstalled the Bank and Bank Summary Mods, and they appear to be working fine. Points (10 points for registering) are showing in all the areas they should be.

The only thing I am not quite clear on is do I setup the points for each even on the site in the ACP's User Groups? Or do I set them all up in the Cash Admin? At the moment the only points awarded are the 10 points for registering that I setup during the Cash Mod installation.

TIA



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