vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Refer Friend (https://vborg.vbsupport.ru/showthread.php?t=59708)

Erwin 01-04-2004 10:00 PM

Refer Friend
 
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. ;)

deathemperor 01-05-2004 03:43 AM

cool ! Gotta install this hack right after I'm out for 1h :p

Koutaru 01-05-2004 06:36 AM

You're on a roll :) I'll be using this definately.. but what would be better is a screenshot ;)

sabret00the 01-05-2004 07:01 AM

greatness :D i'll have to install this one :)

Erwin 01-05-2004 07:49 AM

Screenshot added to first post as requested.

Koutaru 01-05-2004 07:55 AM

Thanks Erwin :p you could basically tell what it should look like from the html but an image takes about a second to understand ;)

SnowBot 01-05-2004 08:23 AM

will that change the contact us link in your instructions to

Refer a friend?

If so how would one add it as a new link instead? :)

macshrine 01-05-2004 09:19 AM

Parse error: parse error in /home/macshrin/public_html/forums/sendmessage.php on line 245

i get that error message, what do i do?

Erwin 01-05-2004 09:22 AM

Quote:

Originally Posted by SnowBot
will that change the contact us link in your instructions to

Refer a friend?

If so how would one add it as a new link instead? :)

Look at my instructions carefully. :) It adds the link, not replace it.

Erwin 01-05-2004 09:22 AM

Quote:

Originally Posted by macshrine
Parse error: parse error in /home/macshrin/public_html/forums/sendmessage.php on line 245

i get that error message, what do i do?

Chances are you installed in wrongly. There should be no parse errors if you follow my instructions exactly. Make sure you are closing all your open { with }.

Koutaru 01-05-2004 09:25 AM

Quote:

Originally Posted by SnowBot
will that change the contact us link in your instructions to

Refer a friend?

If so how would one add it as a new link instead? :)

No it won't.

You could also add a phrase for Refer a friend and other text as they are hardcoded as of now.

MrNase 01-05-2004 10:21 AM

Erwin, nice and i'll use that but vB3 has a 'select your language' feature... Would be nice if you could update this hack to use the phrasing system.

Erwin 01-05-2004 07:25 PM

Quote:

Originally Posted by MrNase
Erwin, nice and i'll use that but vB3 has a 'select your language' feature... Would be nice if you could update this hack to use the phrasing system.

That's true. :) But that would take an extra 10 steps, to enter in each phrase. Feel free to do it for your own site. Feel free to customize any hacks I have released for your own site.

FleaBag 01-05-2004 07:53 PM

Excellent, thanks for another great hack that's pulling me towards vB3!

paratek 01-05-2004 09:29 PM

Thanks Erwin...another Install!

tomshawk 01-06-2004 02:12 AM

Perfect, Installed flawlessly

Clicks install

carloshax 01-07-2004 08:21 PM

Great addition, had no probs at all.

Thx
Carl

Mike Gaidin 01-11-2004 12:19 AM

Another great feature Erwin. :)

Spencer F. 01-11-2004 04:44 AM

Great hack. Very easy install.

Mr. HillBilly 01-13-2004 10:11 PM

Hey erwin, I was just viewing the Refer page and noticed this:

Page generated in 0.08029 seconds with 7 queries (2 queries for uncached templates)

2 Uncached templates... How would I make them cached?

MindTrix 01-16-2004 05:32 PM

Erwin, is it just me, or would everytime someone use this, it gives referer points to the Admin because you got

sendtofriend&refer=1

or am i mistaken?

Erwin 01-16-2004 06:38 PM

Quote:

Originally Posted by MindTrix
Erwin, is it just me, or would everytime someone use this, it gives referer points to the Admin because you got

sendtofriend&refer=1

or am i mistaken?

You are mistaken.

The referrerid is the userid of the person using the form. :)

Mr. HillBilly 01-20-2004 08:57 PM

Quote:

Originally Posted by Mr. HillBilly
Hey erwin, I was just viewing the Refer page and noticed this:

Page generated in 0.08029 seconds with 7 queries (2 queries for uncached templates)

2 Uncached templates... How would I make them cached?

Erwin?

Oblivion Knight 01-23-2004 12:59 PM

Quote:

Originally Posted by Mr. HillBilly
Erwin?

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.!

Osterling 02-06-2004 08:43 AM

when i install this when click the link i just got an emtpy page.. :confused:

Big Kahuna 02-29-2004 07:01 PM

This is what I'm getting when I click it on my test forum




Quote:

vBulletin Message
BK, you do not have permission to access this page. This could be due to one of several reasons:
  1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.



Any idea what I did wrong?

Big Kahuna 02-29-2004 07:11 PM

Never mind -- I retraced my steps for the third time and it worked. However I screwed up -- I managed to do it twice.

Great Hack

Installed

Thanx

coldpride 03-01-2004 01:59 AM

Nice hack and good instructions.. Very usful for some upcoming contests

Evil Chris 03-04-2004 05:02 PM

Thank you Erwin. Installed. :)

hXc Radio 03-06-2004 10:05 PM

I redid the hack three times but still get Parse error: parse error in /home/******/www/forum/sendmessage.php on line 248

I have

PHP Code:

    //    $foruminfo = fetch_foruminfo($threadinfo['forumid']);

    
$forumperms fetch_permissions($threadinfo['forumid']);

// Erwin's Refer Hack 
if (!$_REQUEST['refer']) 

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

print_no_permission(); 


// Erwin's Refer Hack

    // check if there is a forum password 


OTHERS)))
line 248 ---->>> {
print_n

hXc Radio 03-10-2004 07:10 AM

/me bumps hoping to get help

MindTrix 03-10-2004 03:19 PM

Zip that php file up and upload it on ur server, then send me a PM linking to that zip file and i will take a look for you

Wifey 03-15-2004 08:56 PM

Erwin, I LOVE your hacks! They're so great and really user-friendly to install!

*clicks install*

StarBuG 03-27-2004 10:30 PM

I get a no permission error message when I try to use refer.

I am the admin what is wrong?

Please help

StarBuG

ChrisBaktis 03-29-2004 12:24 AM

This hack was working for just great but for some reason now every that goes to the page gets an error saying they cannot access the page. I have checked and I canot see anything that might have changed - any idea where I should start to look?

chris
www.rustysoaptraders.com

jarekn 03-30-2004 02:57 PM

Are there any changes required to install this under Gold version of vBulletin?

sabret00the 04-03-2004 01:24 PM

works perfectly, installed without a hitch :D

StarBuG 04-03-2004 04:53 PM

Can anyone help me with my problem?

Why do i get a permission denied as administrator?

StarBuG

Oblivion Knight 04-03-2004 06:25 PM

<i>StarBug</i>: If you've recently upgraded you will need to do the file edit again.
If not, make sure you have uploaded the modified file and added the template..

MikeXP 04-03-2004 09:12 PM

Wicked hack! Just installed it at http://globalboards.com :) Thanks!


All times are GMT. The time now is 03:18 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.03598 seconds
  • Memory Usage 1,798KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (8)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
  • (40)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