Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Referral ID in User CP Details »»
Referral ID in User CP
Version: 1.2, by ResaleBroker ResaleBroker is offline
Developer Last Online: Feb 2014 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 06-22-2005 Last Update: 05-01-2006 Installs: 173
Template Edits
Code Changes  
No support by the author.

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:
Quote:
Global
Varname:
Quote:
refid_usercp
Text:
Quote:
<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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #162  
Old 06-11-2007, 10:28 PM
jahshaka jahshaka is offline
 
Join Date: Jan 2006
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok figured that out - its a different mod - but i have a bigger problem now... following the link just takes you to my home page, not to the registration page? i am running vbSEO with modrewrite...

heres the link fro mmy cp you will see what i mean

http://www.bigmusicboard.com/index.php?referrerid=8799

any ideas?
Reply With Quote
  #163  
Old 06-14-2007, 11:58 AM
txsbmw txsbmw is offline
 
Join Date: May 2006
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kevlar View Post
Anyway to make this persistent so if they minimize it, it stays minimized until they maximize it? (for 3.6.7)?
I would like to know this as well. It does not stay collapsed and my members have brought it up wishing it would.
Reply With Quote
  #164  
Old 06-21-2007, 08:06 AM
chatzworld chatzworld is offline
 
Join Date: Apr 2007
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jahshaka View Post
ok figured that out - its a different mod - but i have a bigger problem now... following the link just takes you to my home page, not to the registration page? i am running vbSEO with modrewrite...

heres the link fro mmy cp you will see what i mean

http://www.bigmusicboard.com/index.php?referrerid=8799

any ideas?
I seen this but if you click on Register it will auto-place the username of the referer int he referal box
Reply With Quote
  #165  
Old 06-23-2007, 09:51 PM
txsbmw txsbmw is offline
 
Join Date: May 2006
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by txsbmw View Post
I would like to know this as well. It does not stay collapsed and my members have brought it up wishing it would.
Ok set out to read some articles and have fixed it:

Replace your usercp_referrals template with this (it was missing some code to get it to work:

Code:
<!-- ########## REFERRALS IN USER CP ########## -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('referral')"><img id="collapseimg_referral" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_referral].gif" alt="" border="0" /></a>
$vboptions[bbtitle] $vbphrase[referrals]<span class="normal">: ($referrals)</span>
</td>
</tr>
</thead>
<tbody id="collapseobj_referral" style="$vbcollapse[collapseobj_referral]">
<tr>
<td class="alt1" title="$bbuserinfo[username]'s $vbphrase[referrals]" width="100%" align="left">
<phrase 1="$vboptions[bbtitle]" 2="$vbphrase[referrals]" 3="member.php?$session[sessionurl]u=$bbuserinfo[userid]" 4="$vbphrase[profile]" 5="$bbuserinfo[username]" 6="$vboptions[bburl]/index.php?referrerid=$bbuserinfo[userid]" >$vbphrase[refid_usercp]</phrase>
</td>
</tr>
</tbody>
</table>
<br />
<!-- ######## END REFERRALS IN USER CP ######## -->
Reply With Quote
  #166  
Old 07-03-2007, 02:57 PM
doopz doopz is offline
 
Join Date: Feb 2003
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,
Is it possible to show the referred users-list?
Also, that only "activated" members are being displayed?
Reply With Quote
  #167  
Old 07-13-2007, 01:07 PM
julia44's Avatar
julia44 julia44 is offline
 
Join Date: Feb 2007
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NM
helps if you read everything
Reply With Quote
  #168  
Old 08-12-2007, 08:07 AM
kyokushin4life kyokushin4life is offline
 
Join Date: Jul 2006
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by whitetigergrowl View Post
DO NOT do any template edits or php file edits. Install ONLY the xml file. I am using 3.6.2 and by using only the product xml file it works like a charm.
Thanks! lol i read this after i did all the changes and got errors. Could an author please update the thread for new vb3.6+ users? Say no template or php files need changes. Users just need to import the xml file. very handy. thanks.
Reply With Quote
  #169  
Old 09-23-2007, 02:20 AM
kylek kylek is offline
 
Join Date: Oct 2003
Location: British Columbia, Canada
Posts: 798
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine on 3.6.8.
Reply With Quote
  #170  
Old 10-01-2007, 08:58 PM
The Fat Boy The Fat Boy is offline
 
Join Date: Sep 2006
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have a member with 26 referrals.... only shows 8 on the mod... strange?!
Reply With Quote
  #171  
Old 10-13-2007, 04:24 AM
JadedSouls's Avatar
JadedSouls JadedSouls is offline
 
Join Date: May 2007
Location: Canada, eh?
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by o0Hubba0o View Post
Using 3.6.4 and the link it gives to use is: http://www.graphicsanonymous.net/forums/~Hubba~

~Hubba~ being my username of course, but that's not a referral link, how would I fix this?
That's the same thing that happened on mine! I don't know why it's doing that either..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05011 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_html
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete