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
  #32  
Old 01-13-2002, 06:14 PM
Steve_S's Avatar
Steve_S Steve_S is offline
 
Join Date: Oct 2001
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack is really meant for members who must be loged in. I think this is your issue. Log in and test. Set forum permissions appropriately for Guests so they can't use this form.

HTH
Reply With Quote
  #33  
Old 01-13-2002, 08:22 PM
Myke O's Avatar
Myke O Myke O is offline
 
Join Date: Nov 2001
Location: NY/NJ Area
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

your missing two semicolins in that script code
Reply With Quote
  #34  
Old 01-14-2002, 01:36 AM
Lucky Lucky is offline
 
Join Date: Dec 2001
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Steve_S
You welcome. Your idea is implemented

Issue resolved and tested with the JS version. Permits you to place the JS link anywhere you wan't

1. Remove the next 2 lines from referbbtofriend.php

Code:
$threadid = verifyid("thread",$threadid);
$threadinfo=getthreadinfo($threadid);
2. Edit the JS link to read:

Code:
var popurl="referbbtofriend.php?s=$session[sessionhash]"
Place the new JS code anywhere you want and loged in user can use it.
Thanks
Reply With Quote
  #35  
Old 01-15-2002, 04:33 PM
nafae's Avatar
nafae nafae is offline
 
Join Date: Nov 2001
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok thanks I got it working! (THX for clarification)
Reply With Quote
  #36  
Old 01-15-2002, 08:21 PM
Stretchr's Avatar
Stretchr Stretchr is offline
 
Join Date: Dec 2001
Location: Georgia, USA
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to look closely at the instructions again. Those are TEMPLATES, not files and referbbtofriend.php is originally sendtofriend.php which you edit and rename and which comes with vB. It gets confusing sometimes, especially when you run into templates named similarly to files. Once I went through carefully and followed the instructions exactly it works great! HTH
Reply With Quote
  #37  
Old 01-16-2002, 01:44 AM
Stretchr's Avatar
Stretchr Stretchr is offline
 
Join Date: Dec 2001
Location: Georgia, USA
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you retrieve the information on the referrals? Does it use the same table as the original referrals under Users in Admin CP?
Thanks to nafae for reminding me to ask an obvious question
Reply With Quote
  #38  
Old 01-16-2002, 01:57 AM
nafae's Avatar
nafae nafae is offline
 
Join Date: Nov 2001
Posts: 240
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I tried to refer someone, they registered, then when i check that referal thing in the admin cp it hasnt changed.. "no referrals for that time period"
Reply With Quote
  #39  
Old 01-17-2002, 02:02 AM
hondastyle's Avatar
hondastyle hondastyle is offline
 
Join Date: Oct 2001
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this hack on my boards.... verrrrry nice... Now I don't have to keep answering the same question over and over ('how do I get credit for referring somebody... how can I make a direct link to get referral credit..) lol...

Great job - js version is very nice. Thank you for this.

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

The compliment to my "hacklette" is written by a real coder.

His royal hackness FiireFly. See:

https://vborg.vbsupport.ru/showthrea...threadid=25173

Iv'e not installed his hack but it looks like it lets' you put all the referral data on your board which will continue to encourage folks.

The referral code in my hack works perfectly. Log in and try it. Depending on your Forum Permissions for guests. See member hondastyle Board and thats the way it;s supposed to work.

Note: You can also put the referral link in your email templates and user cp if you wan't to remind your members.
Reply With Quote
  #41  
Old 01-30-2002, 08:50 PM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I noticed when I tested this that when the person receiving the email it says something like "blahforum mailer" Is there a way to replace this with the variable that was placed in the "Send To:
(Person's Name)" field? This way they don't think it's a forum mailer and delete it? If this is possible it would be really cool.

Thanks.

BTW if anybody wants to see a demo they can check out my tweaked version of it here:

http://www.theforumz.com/forumz/index.php

You can see it a little lower than the top right. It doesn't work perfectly if you aren't registered, but you still get the idea. Mine is modified a good deal as well.
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 02: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.04743 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (1)bbcode_quote
  • (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_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