vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Tell A Friend + Automatic Referral Code (https://vborg.vbsupport.ru/showthread.php?t=34031)

Steve_S 01-10-2002 10:00 PM

Tell A Friend + Automatic Referral Code

Edited 1-13-01. JavaScript pop version available at:

https://vborg.vbsupport.ru/showthrea...838#post212838

The JS version permits you to place the link anywhere you want on your board.

This version in this post returns your members to the thread they were reading using the same browser window.



Purpose: Permit members to promote your Board via email using their unique Referral code which is automatically inserted. Reward them for x number of referrals :)

Does not require any modifications to source code but does require hacking.

Requires 3 custom templates and a renamed and hacked version of sendtofriend.php which I have called referbbtofriend.php

1. Create 3 custom templates which are really a save of your current templates with a new name:

sendtofriend saved as referbbtofriend
email_sendtofriend saved as email_referbbtofriend
redirect_sentemail saved as redirect_referbbsentemail

2. Edit your custom templates. See zip for mine

3. Grab your copy of sendtofriend.php and save it as referbbtofriend.php

Edit referbbtofriend.php as follows and place in your forum root:

Code:

Change this line
< $templatesused = "sendtofriend,email_sendtofriend,redirect_sentemail";
--- To this line
> $templatesused = "referbbtofriend,email_referbbtofriend,redirect_referbbsentemail";
Change this line
<  eval("dooutput(\"".gettemplate("sendtofriend")."\");");
--- To This line
>  eval("dooutput(\"".gettemplate("referbbtofriend")."\");");
Change this line
<  eval("\$message = \"".gettemplate("email_sendtofriend",1,0)."\";");
--- To This line
>  eval("\$message = \"".gettemplate("email_referbbtofriend",1,0)."\";");
Change this line
<  eval("standardredirect(\"".gettemplate("redirect_sentemail")."\",\"showthread.php?s=$session[sessionhash]&threadid=".intval($threadid)."\");");
--- To This line
>  eval("standardredirect(\"".gettemplate("redirect_referbbsentemail")."\",\"showthread.php?s=$session[sessionhash]&threadid=".intval($threadid)."\");");

4. Insert this link in your Show Thread Templates >> showthread template

Code:

<a href="referbbtofriend.php?s=$session[sessionhash]&threadid=$threadid">Tell a friend about your Board</a>
Notes: Uses a redirect to return them to the thread they were reading.

Thoughts and comments welcome.

Steve_S 01-11-2002 08:36 PM

The screen capture of the prefilled form:

hypedave 01-11-2002 09:22 PM

Cool, I get to be the first to install this, I am installing it now

hypedave 01-11-2002 09:37 PM

when clicking on the reter to link, I get a blank screen ??

Steve_S 01-11-2002 10:14 PM

Did you create the 3 custom templates and upload the hacked referbbtofriend.php ?

Please remeber that in the template named referbbtofriend (see the zip) you must call referbbtofriend.php

This:

Code:

<!----NOTE NEW NAME BELOW----->
<form action="referbbtofriend.php" method="post">

HTH

Myke O 01-11-2002 10:49 PM

im doing it now ..... i dont have those 2 templates email and the refer one.... i only have sendtoafriend.php.... thats it

Myke O 01-11-2002 11:05 PM

ahh i figured it out now... i love this HACK!!!!! thanks!!!!

Steve_S 01-11-2002 11:17 PM

You welcome :)

Since this is my first effort I could have been just a tad more lucid in my instructions :) Another explanation:

You need to create 3 custom templates as per my instructions :) Here is another way:

1. Download the zip in the first post of this thread and open all 3 files in your editor. I have already edited these templates so if you don't like my stuff just change it.
2. Copy the text to the clipboard
3. Admin >> Templates >> Add
4. Paste the text into the template and name the templates exactly like the file names (no .txt)
5. Click the Save Button

eva2000 01-12-2002 02:31 AM

nice one funkyduck :D

SirSteve 01-12-2002 03:03 AM

Excellent! Thanks!


All times are GMT. The time now is 01:37 AM.

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.01814 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_code_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