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)
-   -   Bulletproof referral awards at registration (https://vborg.vbsupport.ru/showthread.php?t=98592)

MacMorag 10-16-2005 10:00 PM

Bulletproof referral awards at registration
 
The way vb is set up, means that it is possible for a registering user to clear the "referred by" field when they are completing the registration form - thus robbing the referring member of a referral point.

The following mod is to the "register" template, and tests whether the registering member has followed a referral link, and if they have, it doesn't show the "referred by" field at all, but hides it, so that the referring member definitely gets the referral award.

In register template, look for:

<if condition="$show['referrer']">

before this add:

<if condition="$referrername">
<input type="hidden" name="referrername" value="$referrername" />
<else />


Now look for:

<tr>
<td>
$vbphrase[referrer]:<br />
<input type="text" class="bginput" name="referrername" value="$referrername" size="50" maxlength="250" />
</td>
</tr>
</table>
</fieldset>
</if>


After this, add:

</if>

And that's it. All very simple.

Boofo 10-17-2005 10:05 AM

Interesting. I like this. ;)

Oblivion Knight 10-17-2005 10:21 AM

What a good idea.! :)

The Realist 10-17-2005 11:50 AM

Nice idea M8, well done.

007 10-17-2005 04:51 PM

Great idea! Installed!

nexialys 10-17-2005 06:08 PM

good... never thought of this detail... even if i browsed most of the templates.. lol

hotrod1 10-17-2005 08:07 PM

Cool mod, thanks!

o1dirtydog 11-05-2005 10:25 AM

im gettnig the following error with the first edit

In register template, look for:

<if condition="$show['referrer']">

before this add:

<if condition="$referrername">
<input type="hidden" name="referrername" value="$referrername" />
<else />


Quote:

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/emceepla/public_html/forum/includes/adminfunctions_template.php(3532) : eval()'d code on line 233

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

o1dirtydog 11-05-2005 10:27 AM

actually never mind, you have to do both edits before u save.

i was in the habit of saving after each edit.

thanks for this mod, it's great.

Boofo 11-05-2005 11:09 AM

Please post this in a text file for those who want to re-add it after an upgrade. ;)


All times are GMT. The time now is 01:23 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.01079 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete