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