Referral Links in User CP and User Profile

benny92000

New Member
Referral links are useful for referral competitions and in general when users want to be credited with referrals they get. When people register through a user's referral link, the user will be credited with the referral automatically.

This modification will add users referral link in their User CP, and/or in user's profiles under statistics. This modification is useful because without it users will not know their referral link, or that they even have one.

To add users referral link to their User CP go to the template "USERCP_SHELL" under User Control Panel Templates.

Find:
Code:
<if condition="$show['profilepiclink']">
    <tr><td class="$navclass[profilepic]" nowrap="nowrap"><a class="smallfont" href="profile.php?$session[sessionurl]do=editprofilepic">$vbphrase[edit_profile_picture]</a></td></tr>
    </if>

Add Below:
Code:
<!-- Referral Link -->
<tr><td class="$navclass[profile]" nowrap="nowrap"><a class="smallfont" href="index.php?referrerid=$bbuserinfo[userid]">Your Referral Link</a></td></tr>
<!-- / Referral Link -->

Screenshot:
http://i200.photobucket.com/albums/aa286/benny92000/screenshot1.jpg
-------------------------------------------------------------------------------------------------------------
To add users referral link to their profile under statistics, right underneath their referral count, go to the template "memberinfo_block_statistics" under Member Info Templates.

Find:
Code:
<if condition="$vboptions['usereferrer']"><li><span class="shade">$vbphrase[referrals]:</span> $prepared[referrals]</li></if>
Add After:
Code:
<li> <span class="shade"$navclass[profile]">Referral Link: <a class="smallfont" href="/index.php?referrerid=$bbuserinfo[userid]">http://yourforum.com/index.php?referrerid=$bbuserinfo[userid]</a></li>

Obviously replace "yourforum.com" with your forum's link.

Screenshot: http://i200.photobucket.com/albums/aa286/benny92000/screenshot2.jpg
 
One thing is when you go try to see others referral link by seeing their statistics it shows your link, but it doesnt matter, because there is no reason to see someone else's referral link. If you do want to see someone else's referral link simply add their user ID to the end of "http://yourforum.com/index.php?referrerid=" :D
 
Back
Top