Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Steve_S Steve_S is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-10-2002 Last Update: Never Installs: 22
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-12-2002, 05:05 AM
Steve_S's Avatar
Steve_S Steve_S is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. A JavaScript Popup version coming tomorrow which might be a little "cleaner" for some folks and faster for the folks on a dial up.
Reply With Quote
  #13  
Old 01-12-2002, 05:09 AM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great.... after I just installed this one!
Reply With Quote
  #14  
Old 01-12-2002, 06:30 AM
DelusionalMind's Avatar
DelusionalMind DelusionalMind is offline
 
Join Date: Dec 2001
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice

on my que for tomorrow
Reply With Quote
  #15  
Old 01-12-2002, 10:18 AM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack, thanks.
Reply With Quote
  #16  
Old 01-12-2002, 06:27 PM
Steve_S's Avatar
Steve_S Steve_S is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NEW: Tell A Friend + Automatic Referral Code via JavaScript Pop Up Instructions edited on 1-13-02 for new features.

NOTE: if you previously installed the "redirect" version but wan't to use the JS pop up version, please start over and download the zip in this post

Includes welcome and thank you by member name. Requires 4 custom templates.

1. Please download the .zip first which contains all the custom templates.

2. 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_pop,email_referbbtofriend,referbbsentemail_thanks,";
Change this line
<   eval("dooutput(\"".gettemplate("sendtofriend")."\");");
--- To this line
>   eval("dooutput(\"".gettemplate("referbbtofriend_pop")."\");");
Change this line
<     eval("standarderror(\"".gettemplate("error_requiredfields")."\");");
--- To this line
>     eval("standarderror(\"".gettemplate("error_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("dooutput(\"".gettemplate("referbbsentemail_thanks")."\");");
REMOVE these 2 lines in referbbtofriend.php:
Code:
$threadid = verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
2. Create the following 4 custom templates using the files which I have provided in the zip:

referbbtofriend_pop
error_referbbtofriend
email_referbbtofriend
referbbsentemail_thanks

Change my text in these templates to fit your site.

3. Insert the following JavaScript code anywhere on your Board you wish. Try header, footer, top of forums, user cp. Anywhere.

Code:
<!------NEW JS POP BELOW---->
<!-----begin pop up link---->
<script>

function openpopup(){
var popurl="referbbtofriend.php?s=$session[sessionhash]"
winpops=window.open(popurl,"","width=700,height=525,")
}

</script>

<a href="javascript:openpopup()">Tell a friend about your board</a>

<!------end pop up link---><!------END NEW----->
NOTE: In the last line (href) of the JS code above remove the space between java script so it reads javascript

Edited 1-13-02 for new features.


Enjoy
Reply With Quote
  #17  
Old 01-12-2002, 06:33 PM
Steve_S's Avatar
Steve_S Steve_S is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The screen shot:
Reply With Quote
  #18  
Old 01-12-2002, 08:48 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Pop-up works great BUT can you make it where JUST the e-mail box shows up and not the vB header/footer. As it is now, you could have achieved the same affect by just using a TARGET="_BLANK" in the <A HREF> tag. It would load even faster without all that unneeded stuff.
Reply With Quote
  #19  
Old 01-12-2002, 09:04 PM
Steve_S's Avatar
Steve_S Steve_S is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



Thanks.

If you used my template from the last zip I posted today for the form you have NO header or fotter for the form. See the file in the zip named referbbtofriend_pop.txt

You need to download the zip I posted for the JS version.

About the only thing I couldn't get just the way I want it is the error if fields are left blank.

HTH
Reply With Quote
  #20  
Old 01-12-2002, 09:18 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, ok. I didn't see any different instructions for those that already had it installed so I just used the code above. Thanks. I am going to check it out now.
Reply With Quote
  #21  
Old 01-12-2002, 10:15 PM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok better, but once you submit the e-mail, it takes you back to the thread in that same window and that page will not fit in there...
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 04:24 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.04303 seconds
  • Memory Usage 2,317KB
  • Queries Executed 27 (?)
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
  • (5)bbcode_code
  • (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
  • (3)pagenav_pagelink
  • (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_postinfo_query
  • fetch_postinfo
  • 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