Author Topic: [SOLVED] Recieving points when Replyin to your Post?  (Read 2026 times)

Pratt

  • Guest
[SOLVED] Recieving points when Replyin to your Post?
« on: June 22, 2007, 04:49:04 am »
Hi there!
First of all i gotta say, this is one great mod! Its great to spice things up on my board!
I have one Question though. Is it possible to set a Credit amount that you recive when someone replies to your Topic?

The idea behind this, is that a user gets credits, when they create topics, and on top of that he should recieve credits (a very little amount) when a user replies to his Topic! That would be great!

Ive been searching around, but i havent found any usefull information on this matter... Can you guys give me a hand here?

Offline Daniel15

Re: Recieving points when Replyin to your Post?
« Reply #1 on: June 23, 2007, 11:11:22 am »
In Sources/Post.php, find:
Code: [Select]
// Give the user their points
$result_shop = db_query("
UPDATE {$db_prefix}members
SET money = money + {$points}
WHERE ID_MEMBER = {$ID_MEMBER}
LIMIT 1", __FILE__, __LINE__);
}
// END SMFShop
Add after:
Code: [Select]
// Modified as per http://www.daniel15.com/forum/index.php/topic,981.html
// Is this a reply?
if (!$newTopic)
{
// Give credits to the topic starter
updateMemberData($ID_MEMBER_POSTER, array('money' => 'money + 10'));
}
Change the "10" to the amount of credits you'd like to give the topic starter :)

Pratt

  • Guest
Re: Recieving points when Replyin to your Post?
« Reply #2 on: June 26, 2007, 05:17:04 am »
Thaaaanks! It worked!  ;) im loving you right now!  O0 :smitten:

Offline CuTe_MaN

Re: [SOLVED] Recieving points when Replyin to your Post?
« Reply #3 on: July 26, 2007, 06:44:47 pm »
thank you for this mod but I have a problem now

if a topic was ceated in a board that doesnt count credits it still give the topic starter points


edit: another problem: when I delete a reply the points that where sent to the topic starter remain and dont delete


CuTe_MaN
« Last Edit: July 26, 2007, 06:48:57 pm by CuTe_MaN »