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-12-2002 05:05 AM

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.

SirSteve 01-12-2002 05:09 AM

great.... after I just installed this one! ;)

DelusionalMind 01-12-2002 06:30 AM

nice :)

on my que for tomorrow :)

Lesane 01-12-2002 10:18 AM

Nice hack, thanks.

Steve_S 01-12-2002 06:27 PM

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 :)

Steve_S 01-12-2002 06:33 PM

The screen shot:

SirSteve 01-12-2002 08:48 PM

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.

Steve_S 01-12-2002 09:04 PM

:)

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

SirSteve 01-12-2002 09:18 PM

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.

SirSteve 01-12-2002 10:15 PM

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...


All times are GMT. The time now is 01:45 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.01025 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
  • (3)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