![]() |
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 Code:
<a href="referbbtofriend.php?s=$session[sessionhash]&threadid=$threadid">Tell a friend about your Board</a> Thoughts and comments welcome. |
The screen capture of the prefilled form:
|
Cool, I get to be the first to install this, I am installing it now
|
when clicking on the reter to link, I get a blank screen ??
|
Did you create the 3 custom templates and upload the hacked referbbtofriend.php ?
Please remeber that in the template named referbbtofriend (see the zip) you must call referbbtofriend.php This: Code:
<!----NOTE NEW NAME BELOW-----> |
im doing it now ..... i dont have those 2 templates email and the refer one.... i only have sendtoafriend.php.... thats it
|
ahh i figured it out now... i love this HACK!!!!! thanks!!!!
|
You welcome :)
Since this is my first effort I could have been just a tad more lucid in my instructions :) Another explanation: You need to create 3 custom templates as per my instructions :) Here is another way: 1. Download the zip in the first post of this thread and open all 3 files in your editor. I have already edited these templates so if you don't like my stuff just change it. 2. Copy the text to the clipboard 3. Admin >> Templates >> Add 4. Paste the text into the template and name the templates exactly like the file names (no .txt) 5. Click the Save Button |
nice one funkyduck :D
|
Excellent! Thanks!
|
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.
|
great.... after I just installed this one! ;)
|
nice :)
on my que for tomorrow :) |
Nice hack, thanks.
|
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 Code:
$threadid = verifyid("thread",$threadid); 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----> Edited 1-13-02 for new features. Enjoy :) |
The screen shot:
|
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.
|
:)
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 |
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.
|
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...
|
Nope. You need to start over and properly set up ALL the templates and properly edit referbbtofriend.php file.
NOTE: if you previously installed the "redirect" version but wan't to use the JS pop up version, please start over and download the last zip in this thread :) At the conclusion of a submit you see the template named: referbbsentemail_thanks. Check the screen capture I posted today. It works perfectly. |
I feel stupid... I guess I jumped the gun again. :)
Thanks! |
Great idea!
Loving this one. Thanks. |
Hope this isn't a stupid question but is there a way to place this link on the login page, without a user being in a thread? We're going to run a contest but, as a new board, it would be nice to be able to place a referral link there when a user logs in. Thanks :D
|
I like that idea.
|
I like the idea but the .php file would need additional hacking so it does not require "&threadid=$threadid" With additional hacking you could place it anywhere as you suggest.
Anyone? |
That was the problem I ran into. The only way I could think to do it was to make a separate hack, otherwise, modifying the php file would then disable the original hack. Maybe this would be a good suggestion for the next version of VB. Certainly seems like a feature a lot of folks could use.
|
BTW, thank you for this excellent hack. It really is useful. :)
|
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:
Code:
|
Great! Thank you once again! :)
|
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 |
your missing two semicolins in that script code
|
Quote:
|
Ok thanks I got it working! (THX for clarification)
|
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
|
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 :D |
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"
|
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 |
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. |
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. |
All times are GMT. The time now is 02:46 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|