vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Refer A Friend. (https://vborg.vbsupport.ru/showthread.php?t=83524)

Base400 06-22-2005 04:27 AM

Refer A Friend.
 
If I wanted to put a link somewhere on the site that said "Refer A Friend" and have them go to a page where they can input. Friend's , Name , Email, and text about the site. inside the text box is a referral link.. I havent seen this around the boards for the 3.5 Beta.

thanks

yellowchaser 08-03-2005 04:18 PM

Yes I would love to see this myself.

safiel 08-08-2005 02:07 AM

This was coded by Erwin for 3.07

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

All the steps will work fine for 3.5rc2 with the exception of step 1a, because the code has changed. Instead, find:

PHP Code:

if ($_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend')
{
    
$forumperms fetch_permissions($threadinfo['forumid']);

    if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms $vbulletin->bf_ugp_forumpermissions['canemail']) OR (($threadinfo['postuserid'] != $vbulletin->userinfo['userid']) AND !($forumperms $vbulletin->bf_ugp_forumpermissions['canviewothers'])))
    {
        
print_no_permission();
    }

    
// check if there is a forum password and if so, ensure the user has it set
    
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);



and replace with:

PHP Code:

if (!$_REQUEST['refer'])
{
if (
$_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend')
{
    
$forumperms fetch_permissions($threadinfo['forumid']);

    if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR !($forumperms $vbulletin->bf_ugp_forumpermissions['canemail']) OR (($threadinfo['postuserid'] != $vbulletin->userinfo['userid']) AND !($forumperms $vbulletin->bf_ugp_forumpermissions['canviewothers'])))
    {
        
print_no_permission();
    }

    
// check if there is a forum password and if so, ensure the user has it set
    
verify_forum_password($foruminfo['forumid'], $foruminfo['password']);

}


Note, I don't want credit for this hack not working or working. I didn't write it - but I did verify it works :)

ryuuchida 08-20-2005 08:12 AM

Coolness! Thanks Safiel!

johnbruce71 08-24-2005 10:54 PM

Cheers for the update (well kinda lol) works a treat

Mr Chad 08-25-2005 08:52 PM

What about in the user CP, it shows a Referal link you can give to your friends and when they click it your account name is prefilled in the referal box?

or is this aready around.

like sumthin like

register.php?do=referrerid=1

Rukas 09-30-2005 05:17 AM

^^ That would be cool, and also some way to reward users.

Say if they refer 20 people WHO SIGN UP AND POST AT LEAST X AMOUNT OF TIMES they are automatically moved to a VIP user group.

john_robot 09-30-2005 05:25 AM

good one

Doc Great 10-02-2005 09:00 PM

Thans, but maybe you (everyone who takes over this hack) should edit the sendmessage.php so that the new template gets cached ;)

Code:

// pre-cache templates used by all actions
$globaltemplates = array(
        'mailform',
        'sendtofriend',
        'contactus',
        'contactus_option',
        'refertofriend',
        'newpost_errormessage',
);


Mr Chad 10-02-2005 09:03 PM

Quote:

Originally Posted by Rukas
^^ That would be cool, and also some way to reward users.

Say if they refer 20 people WHO SIGN UP AND POST AT LEAST X AMOUNT OF TIMES they are automatically moved to a VIP user group.

This is a very good idea!

I would love to have something like this.


All times are GMT. The time now is 09:54 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
  • Page Generation 0.01908 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete