vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Improved registration referral credit (https://vborg.vbsupport.ru/showthread.php?t=122601)

Greg-J 07-30-2006 10:00 PM

Improved registration referral credit
 
This is just an 'improvement' of MacMorag's Bulletproof referral awards at registration. It's a great simple little hack, but I would prefer the user knows who referred them rather than leave them in the dark. This allows your referral to see who referred them, but does not allow them to change who that was.

Open the Registration Templates ? register template and find:

HTML Code:

<if condition="$referrername">
        <fieldset class="fieldset">
                <legend>$vbphrase[referrer]</legend>
                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                <tr>
                        <td><phrase 1="$vboptions[bbtitle]">$vbphrase[if_referred_enter_name]</phrase></td>
                </tr>
                <tr>
                        <td>
                                $vbphrase[referrer]:<br />
                                <input type="text" class="bginput" name="referrername" disabled="disabled" value="$referrername" size="50" maxlength="250" />
                        </td>
                </tr>
                </table>
        </fieldset>
<else />

And _REPLACE_ it with this:
HTML Code:

<if condition="$referrername">
<fieldset class="fieldset">
        <legend>$vbphrase[referrer]</legend>
        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
        <tr>
                <td><phrase 1="$vboptions[bbtitle]">$vbphrase[if_referred_enter_name]</phrase></td>
        </tr>
        <tr>
                <td>
                        $vbphrase[referrer]:<br />
                        <input type="text" class="bginput" name="referrername" disabled="disabled" value="$referrername" size="50" maxlength="250" />
                </td>
        </tr>
        </table>
</fieldset>
<else />
       
<if condition="$show['referrer']">
<fieldset class="fieldset">
        <legend>$vbphrase[referrer]</legend>
        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
        <tr>
                <td><phrase 1="$vboptions[bbtitle]">$vbphrase[if_referred_enter_name]</phrase></td>
        </tr>
        <tr>
                <td>
                        $vbphrase[referrer]:<br />
                        <input type="text" class="bginput" name="referrername" value="$referrername" size="50" maxlength="250" />
                </td>
        </tr>
        </table>
</fieldset>
</if>
</if>




You're all set.


Credit to MacMorag for inspiration.


P.S. Used in conjunction with https://vborg.vbsupport.ru/showthread.php?p=1021459 it can really make a difference.

Oblivion Knight 07-31-2006 05:13 AM

You should use readonly="readonly"..

Disabling the field doesn't increase the user's referral count. ;)


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02019 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete