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
  #152  
Old 04-20-2007, 11:00 AM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mrdby View Post
Is it possible I have the site directed to my PORTAL page instead of the forum?
anybody?????
Reply With Quote
  #153  
Old 04-21-2007, 09:46 PM
Muellmann's Avatar
Muellmann Muellmann is offline
 
Join Date: Jun 2006
Location: near keyboard
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great addon Works fine! Thanks!
Reply With Quote
  #154  
Old 05-21-2007, 02:19 AM
csavern csavern is offline
 
Join Date: Feb 2007
Location: Texas
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked Great on 3.6.7 with no problems
thanks for the mod
will come in very handy
Reply With Quote
  #155  
Old 05-21-2007, 02:39 AM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mrdby View Post
anybody?????
it should be directed to your registration page
Reply With Quote
  #156  
Old 05-21-2007, 01:15 PM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can i have this directed to the portal page instead of the forums?
Reply With Quote
  #157  
Old 05-22-2007, 04:59 AM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope someone can help me. After upgrading to 3.6.7 and upgrading this hack to a new style, its showing up twice in user control panel area, oddly one a different background color w/ errors, a 2nd below it normal w/o errors. I double checked usercp and the coding is right

usercp

Code:
$template_hook[usercp_main_pos1]

<if condition="$show['privatemessages']">
<!-- ############## PRIVATE MESSAGES ##############  -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan="2">
            <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('usercp_pms')"><img id="collapseimg_usercp_pms" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_pms].gif" alt="" border="0" /></a>
            <a href="private.php$session[sessionurl_q]">$vbphrase[new_private_messages]</a><span class="normal">: ($numpms)</span>
        </td>
    </tr>
</thead>
<tbody id="collapseobj_usercp_pms" style="$vbcollapse[collapseobj_usercp_pms]">
    $messagelistbits
</tbody>
</table>
<br />
<!-- ############## END PRIVATE MESSAGES ##############  -->
</if>

$template_hook[usercp_main_pos2]

<!-- ############### 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 ############# -->

<!-- ############## SUBSCRIBED THREADS ##############  -->

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan="7">
            <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('usercp_subthreads')"><img id="collapseimg_usercp_subthreads" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_subthreads].gif" alt="" border="0" /></a>
            <a href="subscription.php?$session[sessionurl]do=viewsubscription">$vbphrase[new_subscribed_threads]</a><span class="normal">: ($numthreads)</span>
        </td>
    </tr>
</thead>
<tbody id="collapseobj_usercp_subthreads" style="$vbcollapse[collapseobj_usercp_subthreads]">
    <if condition="$show['threads']">
        <tr class="thead">
        
            <if condition="$show['threadicons']">
                <td class="thead" colspan="2">&nbsp;</td>
            <else />
                <td class="thead">&nbsp;</td>
            </if>
            
            <td class="thead" width="100%">$vbphrase[thread] / $vbphrase[thread_starter]</td>
            <td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
            <td class="thead" align="center">$vbphrase[replies]</td>
            <td class="thead" align="center">$vbphrase[views]</td>
        </tr>
        $threadbits
    <else />
        <tr>
            <td class="alt1" align="center" colspan="7"><strong>$vbphrase[no_subscribed_threads_to_display]</strong></td>
        </tr>
    </if>
    <tr>
        <td align="$stylevar[right]" colspan="7" class="tfoot">
        <span class="smallfont"><a href="subscription.php?$session[sessionurl]do=viewsubscription&amp;folderid=all">$vbphrase[view_all_subscribed_threads]</a></span>
        </td>
    </tr>
</tbody>
</table>
<br />
<!-- ############## END SUBSCRIBED THREADS ##############  -->

$template_hook[usercp_main_pos3]

<if condition="$show['forums']">
<!-- ############## SUBSCRIBED FORUMS ##############  -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
            <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('usercp_forums')"><img id="collapseimg_usercp_forums" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_forums].gif" alt="" border="0" /></a>
            $vbphrase[subscribed_forums]
        </td>
    </tr>
</thead>
<tbody id="collapseobj_usercp_forums" style="$vbcollapse[collapseobj_usercp_forums]">
    <tr align="center" valign="bottom">
        <td class="thead" width="2%">&nbsp;</td>
        <td class="thead" align="$stylevar[left]" width="80%">$vbphrase[forum]</td>
        <td class="thead">$vbphrase[last_post]</td>
        <td class="thead">$vbphrase[threads]</td>
        <td class="thead">$vbphrase[posts]</td>
        <if condition="$vboptions['showmoderatorcolumn']">
        <td class="thead" width="20%">$vbphrase[moderator]</td>
        </if>
    </tr>
    $forumbits
</tbody>
</table>
<br />
<!-- ############## END SUBSCRIBED FORUMS ##############  -->
</if>

$template_hook[usercp_main_pos4]

<if condition="$show['infractions']">
<!-- ############## NEW INFRACTIONS ##############  -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan="7">
            <span class="smallfont" style="float:$stylevar[right]">
                <phrase 1="$bbuserinfo[ipoints]">$vbphrase[x_points_total]</phrase>
                &nbsp; &nbsp;
                <a href="#top" onclick="return toggle_collapse('usercp_infraction')"><img id="collapseimg_usercp_infraction" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_infraction].gif" alt="" border="0" /></a>
            </span>
            $vbphrase[latest_infractions_received]
        </td>
    </tr>
</thead>
<tbody id="collapseobj_usercp_infraction" style="$vbcollapse[collapseobj_usercp_infraction]">
    <tr>
        <td class="thead">&nbsp;</td>
        <td class="thead">$vbphrase[post]</td>
        <td class="thead">$vbphrase[date]</td>
        <td class="thead">$vbphrase[expires]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[points]</td>
        <td class="thead">$vbphrase[reason]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[posted_by]</td>
    </tr>
    $infractionbits
</tbody>
</table>
<br />
<!-- ############## END NEW INFRACTIONS ##############  -->
</if>

$template_hook[usercp_main_pos5]

<if condition="$show['reputation']">
<!-- ############## NEW REPUTATION ##############  -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr>
        <td class="tcat" colspan="$reputationcolspan">
            <span class="smallfont" style="float:$stylevar[right]">
                <phrase 1="$bbuserinfo[reputation]">$vbphrase[x_points_total]</phrase>
                &nbsp; &nbsp;
                <a href="#top" onclick="return toggle_collapse('usercp_reputation')"><img id="collapseimg_usercp_reputation" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_reputation].gif" alt="" border="0" /></a>
            </span>
            $vbphrase[latest_reputation_received]
        </td>
    </tr>
</thead>
<tbody id="collapseobj_usercp_reputation" style="$vbcollapse[collapseobj_usercp_reputation]">
    <tr>
        <td class="thead">&nbsp;</td>
        <td class="thead">$vbphrase[thread]</td>
        <td class="thead">$vbphrase[date]</td>
        <if condition="$vboptions['showuserraters']">
        <td class="thead" nowrap="nowrap">$vbphrase[posted_by]</td>
        </if>
        <td class="thead">$vbphrase[comment]</td>
    </tr>
    $reputationcommentbits
</tbody>
</table>
<br />
<!-- ############## END NEW REPUTATION ##############  -->
</if>

<form name="personalnotepad" method="post" action="usercp.php$session[sessionurl_q]">
<table class="tborder" width="100%" cellspacing="$stylevar[cellspacing]" cellpadding="$stylevar[cellpadding]" align="center">
<tr>
<td class="tcat" align="center">$vbphrase[personal_notepad]</td>
</tr>
<tr>
<td class="alt1" align="center">
<textarea name="notepad" rows="7" cols="45">{$vbulletin->userinfo['notepad']}</textarea>
<input type="hidden" name="do" value="savenotepad" /></td>
</tr>
<tr>
<td class="alt2" align="center"><input type="submit" value="$vbphrase[save_notepad]" /></td>
</tr>
</table>
</form>

$template_hook[usercp_main_pos6]

<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
    <td width="100%">&nbsp;</td>
    <td align="$stylevar[right]">$forumjump</td>
</tr>
</table>
Reply With Quote
  #158  
Old 05-24-2007, 12:07 PM
newforum newforum is offline
 
Join Date: Jan 2007
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack, installed on 3.6.7 working fine without any problems.
Reply With Quote
  #159  
Old 06-05-2007, 05:04 PM
Mrdby Mrdby is offline
 
Join Date: Mar 2007
Location: Hades
Posts: 1,298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can i edit this to direct to the CMPS instead of forum?
Reply With Quote
  #160  
Old 06-06-2007, 07:31 PM
Kevlar's Avatar
Kevlar Kevlar is offline
 
Join Date: Nov 2001
Location: Ft. Lauderdale, FL.
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyway to make this persistent so if they minimize it, it stays minimized until they maximize it? (for 3.6.7)?
Reply With Quote
  #161  
Old 06-11-2007, 10:11 PM
jahshaka jahshaka is offline
 
Join Date: Jan 2006
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey i installed and dont get the 'email a friend' option - any ideas?
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:09 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.10776 seconds
  • Memory Usage 2,357KB
  • 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
  • (5)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