Back to vBulletin 3.0 Template Modifications

Referral ID in User CP
Mod Version: 1.2, by ResaleBroker

This modification is in the archives.
vB Version: 3.0.7 Rating: (7 votes - 4.71 average) Installs: 173
Released: 23 Jun 2005 Last Update: 02 May 2006 Downloads: 638
Not Supported Template Edits Code Changes  

This simple modification will add a content box in the User CP displaying the user's "Referral Count", "Referral Link" and a "Referral Message" that can can be customized in the Phrase Manager.

For 3.5.x or higher simply install the product.


For 3.0.x follow the instructions below:

1) Modify USERCP template
Admin CP >> Style Manager >> Edit Templates >> User control Panel Templates >> USERCP

Find:
HTML Code:
<!-- ############## SUBSCRIBED THREADS ############## -->
Above that add:
HTML Code:
<!-- ############### REFERRALS ############### -->
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"
style="background-color:white">
<thead>
<tr>
<td class="tcat">
<a style="float:right" href="#top" onclick="return toggle_collapse('referral')"><img id="collapseimg_referral" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_my_table].gif" alt="" border="0" /></a>
$vboptions[bbtitle] $vbphrase[referrals]: <span class="normal">($referrals)</span>
</td>
</tr>
</thead>
<tbody id="collapseobj_referral" style="">
<tr>
<td class="page" align="left" width="100%">
<phrase 1="$vboptions[bbtitle]" 2="member.php?$session[sessionurl]do=getinfo&amp;userid=$bbuserinfo[userid]" 3="$vbphrase[profile]" 4="$bbuserinfo[username]" 5="$vboptions[bburl]/index.php?referrerid=$bbuserinfo[userid]" >$vbphrase[refid_usercp]</phrase>
</td>
</tr>
</tbody>
</table>
<br />
<!-- ############# END REFERRALS ############# -->

2) Add the Required Phrase
Admin CP >> Language & Phrases >> Phrase Manager >> Add New Phrase

Phrase Type:
Global
Varname:
refid_usercp
Text:
<p>Please help us spread the word about "{1}." When referring others to the community you can use the link below which includes your unique referral ID.</p>
<p>Each time someone follows this link to {1} and registers as a new member, your referral count will be incremented by one.</p>
<p>Please be courteous when promoting {1} by not spamming other web sites with your referral link just to gain referrals.</p>
<fieldset id="referrallink"><legend>Referral Link for {4}&nbsp;</legend><a href="{5}">{5}</a></fieldset>

3) Modify usercp.php file [VB versions 3.0.x]

Open usercp.php and Find:
Code:
eval('$HTML = "' . fetch_template('USERCP') . '";');
Above that add:
Code:
// REFERRALS 
$refcount = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE referrerid = '".$bbuserinfo['userid']."'"); 
$referrals = vb_number_format($refcount['count']);

4) That's it! You're Done!




*A special thanks to Noppid for helping out and getting the referral counts to appear in the UserCP for 3.0.x and 3.5.x versions.

*A special thanks to Boofo for packaging this product for 3.5.x

Download

This modification is archived and cannot be downloaded.

Screenshots

 

Similar Mods

Miscellaneous Hacks User CP Referral ID and Referrer in Profile for vB3.7 Modification Graveyard

vblts.ru supports vBulletin®, 2022-2024