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
  #32  
Old 08-11-2005, 12:57 AM
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
 
Join Date: Aug 2004
Location: Arizona, USA
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the positive feedback.
Reply With Quote
  #33  
Old 08-11-2005, 01:15 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great on 3.5 RC 2, also. Good job!
Reply With Quote
  #34  
Old 08-12-2005, 11:42 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm waiting for a 3.5 version of this great hack.
Reply With Quote
  #35  
Old 08-12-2005, 11:48 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Snake
I'm waiting for a 3.5 version of this great hack.
Read the post above.

Works as is.
Reply With Quote
  #36  
Old 08-12-2005, 12:20 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh my bad. I'm kinda sleepy here.
Reply With Quote
  #37  
Old 08-12-2005, 02:37 PM
Hoojie Hoojie is offline
 
Join Date: Jun 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Jeff. Nice one & the very first thing anybody who asks "How can I promote my forum" should do.

* Hoojie installed
Reply With Quote
  #38  
Old 08-12-2005, 11:15 PM
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
 
Join Date: Aug 2004
Location: Arizona, USA
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Works great on 3.5 RC 2, also. Good job!
Thanks for the kind words.
Reply With Quote
  #39  
Old 08-22-2005, 09:50 PM
GT2.0's Avatar
GT2.0 GT2.0 is offline
 
Join Date: Dec 2004
Location: Here
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks so much for this!! Good work indeed!
Reply With Quote
  #40  
Old 08-28-2005, 05:48 PM
MillerLight MillerLight is offline
 
Join Date: Jul 2005
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works Great on VB Ver 3.0.8.

How would I go about changing the displayed text to, "White"?

Great Work!
Reply With Quote
  #41  
Old 08-30-2005, 10:36 PM
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
 
Join Date: Aug 2004
Location: Arizona, USA
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MillerLight
How would I go about changing the displayed text to, "White"?
Admin Control Panel >> Style Manager >> All Style Options

<td>, <th>, <p>, <li> (Customized in this Style)

Font Color #FFFFFF

...and if you want to change the color of "Referral Link for (User X)"

<legend> (Customized in this Style)
Font Color #FFFFFF
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:27 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.05409 seconds
  • Memory Usage 2,314KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_html
  • (6)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
  • (4)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