MyBB-Plugins Forums

Full Version: Referral System...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to make it so the user referring someone gets the points, not the user being referred getting points. How can I make this happen?
You'll need to edit the code yourself. Search for the line where the referral points are given and change the uid in the function.
(02-26-2012, 04:36 AM)Pirata Nervo Wrote: [ -> ]You'll need to edit the code yourself. Search for the line where the referral points are given and change the uid in the function.

I couldn't find it, I don't even know which file it would be..
Find:
PHP Code:
newpoints_addpoints(trim($mybb->input['referrername']), $mybb->settings['newpoints_income_referral'], 11true); 

Replace that with:
PHP Code:
newpoints_addpoints($mybb->user['uid'], $mybb->settings['newpoints_income_referral']); 

That, in file hooks.php
Thanks so much Smile
It didn't work - now no one received points for being referred
Anyone else have an idea?
Make sure the referral points are not 0.
It is actually setup so that the user who's name is entered in the "referred by" box gets the points, which is how it should be.
(02-26-2012, 04:51 AM)Pirata Nervo Wrote: [ -> ]Find:
PHP Code:
newpoints_addpoints(trim($mybb->input['referrername']), $mybb->settings['newpoints_income_referral'], 11true); 

Replace that with:
PHP Code:
newpoints_addpoints($mybb->user['uid'], $mybb->settings['newpoints_income_referral']); 

That, in file hooks.php

I want to make it so the both user referring someone and the user being referred gets the same amount of points. How can I make this happen?
Instead of replacing the line, simply add the latter.
Pages: 1 2