The Arcive of vBulletin Modifications Site. |
|
Referral ID in User CP Details »»
|
||||||||||||||||||||||||||||
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: Quote:
Quote:
Quote:
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 ![]() Show Your Support
|
||||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Should really be in a phrase if we want to get technical
|
|
#3
|
|||
|
|||
|
thx
/me clicks install |
|
#4
|
|||
|
|||
|
Thanks for sharing this with us. Could you please also provide the instructions in a (zipped) textfile. This makes it easier for those who installed it to use for future vB upgrades.
|
|
#5
|
|||
|
|||
|
I agree with Zachery regarding the use of phrases. I'm in the midst of adding a second language to one of my sites. Anyone have some pointers on how-to modify this mod to use phrases?
|
|
#6
|
||||
|
||||
|
/me clicks install.
|
|
#7
|
||||
|
||||
|
Quote:
|
|
#8
|
|||
|
|||
|
Thank you for the fast reaction.
|
|
#9
|
||||
|
||||
|
Quote:
|
|
#10
|
||||
|
||||
|
Quote:
|
![]() |
|
|