View Single Post
  #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
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03129 seconds
  • Memory Usage 1,775KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete