Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Refer Friend Details »»
Refer Friend
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 01-04-2004 Last Update: 01-07-2004 Installs: 293
 
No support by the author.

Refer Friend

For some reason, there is no "Refer a Friend" form standard in vB3.

This is a simple "Refer a Friend" form based on sendmessage.php.

All you need is to edit 1 PHP file - sendmessage.php, and add 1 template.

Instructions are in the HTML zipped below.

Below is a screenshot, as requested.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #182  
Old 08-06-2005, 01:47 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is your contact form/ email members permission in vB AdminCP Options enabled?
Reply With Quote
  #183  
Old 08-06-2005, 04:48 AM
T3MEDIA T3MEDIA is offline
 
Join Date: Dec 2004
Posts: 944
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T3MEDIA
#159
Erwin maybe you missed my post.
Or saw it and rather not help? Please advise so I know not to bother you or whatever the case.

Thanks.
Reply With Quote
  #184  
Old 08-06-2005, 01:10 PM
simon. simon. is offline
 
Join Date: Apr 2005
Location: UK
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Erwin
Is your contact form/ email members permission in vB AdminCP Options enabled?
How would I know? Could you tell me how to find out...
Reply With Quote
  #185  
Old 08-16-2005, 10:07 PM
o1dirtydog o1dirtydog is offline
 
Join Date: Aug 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great work... installed
Reply With Quote
  #186  
Old 08-20-2005, 08:17 AM
ryuuchida ryuuchida is offline
 
Join Date: Sep 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the great work Erwin! (And to Safiel on another thread for the 3.5 version.)
Reply With Quote
  #187  
Old 08-21-2005, 01:21 PM
Fallback Fallback is offline
 
Join Date: May 2005
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great hack.

A great add-on would be to add 'x' reputation points to the member who successfully refers a friend that registers. This would add motivation for users to refer new members.
Reply With Quote
  #188  
Old 08-22-2005, 04:30 AM
therczone therczone is offline
 
Join Date: Sep 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this is a great hack. I customized it to include an AIM form for users to AIM friends with the referral link AND e-mail them. If anyone is interested in the code, just PM me.

If someone is not logged in, it will show up as "Unregistered" and referrerid=0. And if they do not have to be logged in, any abuse of the system could go untraceable. If the user is forced to login, and then abuses the system by spamming people, it would at least (unless they edit it out, but not everyone is that smart) have the referrerid link so you could know who it was who abused it in the event that someone complained about it and could send you the e-mail they received.

I spent a good amount of time pulling my hair out searching through calendar.php, private.php, etc. and here on vBulletin.org for a solution, and finally found it. Below, in green, is the code needed to be added to require users to login to see the refer page.

I don't take any credit for this, other than finding and informing everyone of the code. Here is the author's thread.

https://vborg.vbsupport.ru/showthread.php?t=59859

In sendmessage.php

// Erwin's Refer Hack
if (!$_REQUEST['refer'])
{
if (!($forumperms & CANVIEW) OR !($forumperms & CANEMAIL) OR (($threadinfo['postuserid'] != $bbuserinfo['userid']) AND !($forumperms & CANVIEWOTHERS)))
{
print_no_permission();
}
}
if ($bbuserinfo['userid'] == 0)
{
print_no_permission();
}

// Erwin's Refer Hack

I know print_no_permission(); is already in there, but I couldn't get it to work by inserting it with OR or AND into:

if (!($forumperms & CANVIEW) OR !($forumperms & CANEMAIL) OR (($threadinfo['postuserid'] != $bbuserinfo['userid']) AND !($forumperms & CANVIEWOTHERS)))

If anyone has a cleaner or better way, I'm all ears.
Reply With Quote
  #189  
Old 08-23-2005, 02:28 AM
faast faast is offline
 
Join Date: Jul 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oblivion Knight
Since you have 2 uncached templates, I'm guessing the code has changed slightly between the version of vB3 you are using and RC3. In RC3 I had 1 uncached template and I did this:

In sendmessage.php
Find:
Code:
$globaltemplates = array(
	'mailform',
Add below:
Code:
	'refertofriend',
Awesome mod Erwin, thanks for sharing.!
great work.

also, for those who are having trouble installing with the permission error: make sure you are REPLACING and not adding in the code!!! thats what happened to me.
Reply With Quote
  #190  
Old 08-25-2005, 11:47 PM
subnet_rx subnet_rx is offline
 
Join Date: Mar 2005
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by faast
great work.

also, for those who are having trouble installing with the permission error: make sure you are REPLACING and not adding in the code!!! thats what happened to me.
I don't see it noted, but if someone does refer a friend, will it send their friend a referral link using the member's referral ID?
Reply With Quote
  #191  
Old 09-09-2005, 02:42 PM
faast faast is offline
 
Join Date: Jul 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by subnet_rx
I don't see it noted, but if someone does refer a friend, will it send their friend a referral link using the member's referral ID?
Yes. It will send them a referral ID
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 04:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04662 seconds
  • Memory Usage 2,308KB
  • 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
  • (2)bbcode_code
  • (5)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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