Author Topic: Credits Doubling?  (Read 3681 times)

Offline TaintedBlack

Credits Doubling?
« on: November 19, 2006, 02:47:52 am »
I just did a fresh install of SMF shop on my new forums and whenever I make a post my credits double instead of increasing by the 10 I have it set to.

Anyway to fix this?

Offline TaintedBlack

Re: Credits Doubling?
« Reply #1 on: November 20, 2006, 07:53:59 am »
I just had my friend do a test and when he posted it gave him 40 credits.. In the admin settings it is set to give 10 credits per post. Please help..

Just did a test to see what happnens when i set it to give 1 credit per post and its giving 4...
« Last Edit: November 20, 2006, 08:06:01 am by TaintedBlack »

Offline TechnoDragon

Re: Credits Doubling?
« Reply #2 on: November 20, 2006, 10:22:08 am »
check the post file (i can't remember if it is the post.php or post.template.php) it sounds like the code is installed four times for giving credits upon posting...just remove the extra lines and it should be fixed
Don't tell me to get into shape...I have a shape...It is round!


Offline TaintedBlack

Re: Credits Doubling?
« Reply #3 on: November 20, 2006, 01:30:01 pm »
Thank you that was it.  :)

Offline TechnoDragon

Re: Credits Doubling?
« Reply #4 on: November 20, 2006, 09:46:36 pm »
no problem!
Don't tell me to get into shape...I have a shape...It is round!


Offline leo

Re: Credits Doubling?
« Reply #5 on: December 09, 2006, 06:47:24 pm »
TechnoDragon: what are the extra lines.. i don't know what to remove.. could u plz help..

Offline chougard

Re: Credits Doubling?
« Reply #6 on: December 12, 2006, 07:06:53 am »
Go to the sources directory and open post.php.
Then search for
Code: [Select]
// If we do give credits, then how much?Delete the following code until it is there only once.
 
Code: [Select]
              //BEGIN SMFShop Shop MOD 1.3 (Build 6) code
// Get if this board gives credits for posting
                $result_shop = db_query("SELECT countMoney
                                         FROM {$db_prefix}boards
                                         WHERE ID_BOARD = $board
                                         LIMIT 1", __FILE__, __LINE__);
                $row_shop = mysql_fetch_array($result_shop, MYSQL_ASSOC);
               
                // If we do give credits, then how much?
                if (isset($row_shop['countMoney']) && $row_shop['countMoney'] == "1") {
                    //For a new topic, you get...
                    if ($newTopic)
                        $result_shop = db_query("UPDATE {$db_prefix}members
                                                 SET money = money + {$modSettings['shopPointsPerTopic']}
                                                 WHERE ID_MEMBER = {$ID_MEMBER}
                                                 LIMIT 1", __FILE__, __LINE__);
                    else
                        $result_shop = db_query("UPDATE {$db_prefix}members
                                                 SET money = money + {$modSettings['shopPointsPerPost']}
                                                 WHERE ID_MEMBER = {$ID_MEMBER}
                                                 LIMIT 1", __FILE__, __LINE__);
                }
                //End Shop MOD