1
Coding / Bonus points for Topic Starter
« on: November 01, 2006, 10:13:53 am »
Hey everyone.
Just installed the shop mod, and everything works great, but I have a feature request. I don't believe it would be too difficult, but I know almost nothing about PHP.
I was wondering if there is any way I can have it so a topic starter gets x amounts of points for each reply in his topic. The value can be static, we'll use 3 points for the example.
So, essentially, "Bob" would get 10 points when he post a new topic, and he would also get an extra 3 points every time someone replies to that topic.
Like I said, I don't know anything of PHP, but from my research, it looks like I'd need to change something here:
Maybe something after the else?
Any help would be greatly appreciated
Just installed the shop mod, and everything works great, but I have a feature request. I don't believe it would be too difficult, but I know almost nothing about PHP.
I was wondering if there is any way I can have it so a topic starter gets x amounts of points for each reply in his topic. The value can be static, we'll use 3 points for the example.
So, essentially, "Bob" would get 10 points when he post a new topic, and he would also get an extra 3 points every time someone replies to that topic.
Like I said, I don't know anything of PHP, but from my research, it looks like I'd need to change something here:
Code: [Select]
//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
Maybe something after the else?
Any help would be greatly appreciated