Referral ID in User CP
This modification is in the archives.
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 ############## -->
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&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:
3) Modify usercp.php file [VB versions 3.0.x] Open usercp.php and Find: Code:
eval('$HTML = "' . fetch_template('USERCP') . '";'); 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 |