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)

Viks 01-14-2005 12:14 AM

Hi Erwin, thanks buddy for the response... i should have been able to figure that one out... DUH!

Well, the reason I wanna block guests from refferring wud be cause the sendmail may used a nuisance by some pranksters!

Erwin 01-14-2005 01:22 AM

Quote:

Originally Posted by Viks
Hi Erwin, thanks buddy for the response... i should have been able to figure that one out... DUH!

Well, the reason I wanna block guests from refferring wud be cause the sendmail may used a nuisance by some pranksters!

Find this:

PHP Code:

// Erwin's Refer Hack 
if ($_REQUEST['refer']) 
    { 
    eval(
'print_output("' fetch_template('refertofriend') . '");'); 
    } else { 
    eval(
'print_output("' fetch_template('sendtofriend') . '");'); 
    } 
// Erwin's Refer Hack 

Replace with:

PHP Code:

// Erwin's Refer Hack 
if ($_REQUEST['refer']) 
    { 
     if (
$bbuserinfo[userid]) 
    { 
    eval(
'print_output("' fetch_template('refertofriend') . '");'); 
    }  else {
    
print_no_permission(); 
    }
    } else { 
    eval(
'print_output("' fetch_template('sendtofriend') . '");'); 
    } 
// Erwin's Refer Hack 


Viks 01-14-2005 03:32 AM

Thx Erwin.
//btw i checked "vB Color Scheme Machine"....it v.cool.

Oblivion Knight 01-14-2005 03:02 PM

Any news on being able to refer multiple friends? :)

It should be easy enough to allow e-mail addresses to be separated by a commar..

gilbert 01-16-2005 07:30 PM

Can someone please answer my question about the permissions?

Viks 01-16-2005 08:16 PM

Quote:

Originally Posted by gilbert
Can someone please answer my question about the permissions?

If I am not wrong then u need to goto Admin CP -> Usergroup Manager -> Edit permissions -> AND ENABLE "Can Use Email to Friend".

TonTon 01-22-2005 03:46 PM

good stuff, installed.

syjech 01-25-2005 03:31 AM

ugh...where'd I go wrong?

Parse error: parse error, unexpected '}' in /home/paretnet/public_html/forums/sendmessage.php on line 259

ryancooper 01-25-2005 11:42 AM

AWESOME hack Thanks Man1!!!

icest0rm 01-27-2005 04:04 PM

Quote:

Originally Posted by gilbert
Can someone please answer my question about the permissions?

I get a permissions problem as well after I upgraded to 3.0.6 and re-implemented the hack. Here's the error:

"you do not have permission to access this page. This could be due to one of several reasons:

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?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation."

Any ideas on what could be wrong?

icest0rm 01-27-2005 04:42 PM

Quote:

Originally Posted by icest0rm
I get a permissions problem as well after I upgraded to 3.0.6 and re-implemented the hack. Here's the error:

"you do not have permission to access this page. This could be due to one of several reasons:

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?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation."

Any ideas on what could be wrong?

Never mind. I assumed that I didn't have to re-add the template. I went and re-added the template and it's now working. :)

Crank 02-02-2005 07:01 PM

i installed this hack like a champ.
thanks for the work
also i added the link in the navbar of the site for easy refference

here is the code i used
Code:

<td class="vbmenu_control"><a href="sendmessage.php?do=sendtofriend&refer=1[sessionurl]">Refer Friend</a></td>
tnx again

Damian 02-03-2005 04:46 AM

/me installs

Thanks for the great hack.

jfreels 02-06-2005 03:02 AM

very nice, thanks!

The Coldwood 02-19-2005 01:53 PM

Quote:

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

Reinstalled for vB 3.0.6

LiewCF 03-07-2005 05:34 AM

Thank you very much! :)

OrangeFlea 03-14-2005 03:11 AM

Quote:

Originally Posted by Oblivion Knight
Any news on being able to refer multiple friends? :)

It should be easy enough to allow e-mail addresses to be separated by a commar..

Yeah, what he said. Check this out:

http://www.business-students.com/for...er_friend.html

Can we get something like that in the next version? Should be a hit.

zachlee 03-15-2005 12:20 PM

here is a stupid question (prepares to be stoned)

when someone uses the refer friend page, the recipient recieves a email:
Code:

From: Football-Forums Forums
Subject: Join me at Football-Forums.com

How, or where can I change the From field.

zachlee 03-15-2005 02:21 PM

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

worked like a charm, thanks

mholtum 03-21-2005 05:13 AM

Odd. I installed this on 3.0.5 and it works great. Installed it on a fresh install of 3.0.7 and get this error

Code:

fshfanatic, 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.

works here: http://www.ravensrealm.net

doesnt work here: http://www.theflyfishingforum.com

any ideas?

Marco van Herwaarden 03-21-2005 05:31 AM

Double check the first edit.
Quote:

Originally Posted by mholtum
Odd. I installed this on 3.0.5 and it works great. Installed it on a fresh install of 3.0.7 and get this error

Code:

fshfanatic, 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.

works here: http://www.ravensrealm.net

doesnt work here: http://www.theflyfishingforum.com

any ideas?


mholtum 03-21-2005 05:40 AM

Quote:

Originally Posted by MarcoH64
Double check the first edit.

Double Checked and got this:
Parse error: parse error, unexpected $ in /home/theflyfi/public_html/forums/sendmessage.php on line 423

this is line 223

?>

If I use the php file from an earlier version of vb it works fine... :ermm:

mholtum 03-21-2005 05:49 AM

ok downloaded a fresh copy of the file from VB and re-edited the file. Worked... odd..

rrr 03-25-2005 01:08 AM

Installed on vB 3.0.7 and working great.

This should definitely be included in the next version of vB

thesatman 03-27-2005 09:25 AM

Great hack thanks.

1 small question After the refer a friend message is sent it just returns to the forum home page, Anyway to show "Message Sent" screen before going to the forum home page.

Benj 04-13-2005 12:18 PM

My Question !

can you send a refer email to more than one email at a time ?? maybe using

"email1@w00t.com,email2@w00t1.com"

???

If so

how hard would it be to have an addon that maybe opens up in a new window sayin import contact from hotmail (or yahoo) which looks at all the ticked email addresses (user imput)that are pulled from the loged in users hotmail / yahoo contact list and says invite these users. The addon would then look at the email address and thouse that are not all ready members ( the emails that are not in the users table of the datbase) and would add the email address to the email field of this form :D


Good idea i recon just a case of how hard it would be to make:D

Erwin 04-13-2005 10:08 PM

Quote:

Originally Posted by thesatman
Great hack thanks.

1 small question After the refer a friend message is sent it just returns to the forum home page, Anyway to show "Message Sent" screen before going to the forum home page.

Sure, don't disable redirect pages in your Admin CP.

Brandon Sheley 04-16-2005 03:22 AM

the download link doesn't work for me :| so i can't install yet

Marco van Herwaarden 04-16-2005 06:39 AM

You mean you can not download the hack? Please try again, because it is working fine for me.

kobescoresagain 04-16-2005 05:52 PM

can you change it so that it doesn't make a delay? I have people wanting to use it but it delays a little to long. I would like to know the variable where I could adjust this. Thanks

Erwin 04-19-2005 11:17 AM

Quote:

Originally Posted by kobescoresagain
can you change it so that it doesn't make a delay? I have people wanting to use it but it delays a little to long. I would like to know the variable where I could adjust this. Thanks

It's the same timeout as the contact us flood timeout - adjust it in your Admin CP. (I think).

yinyang 04-21-2005 06:38 AM

thanks for this awesome hack erwin!! *install*

kobescoresagain 04-27-2005 03:28 AM

Thanks alot, I wouldn't have thought that they would use that. I changed it. Now you don't have to wait as long. What could make it even better is where they could send out up to a certain amount. This is the reason why I lowered the amount of time. Like 5 to 10 refer a friend emails at a time. Would that be easy to do?

Benj 04-27-2005 06:18 AM

Quote:

Originally Posted by kobescoresagain
What could make it even better is where they could send out up to a certain amount. This is the reason why I lowered the amount of time. Like 5 to 10 refer a friend emails at a time. Would that be easy to do?


im interested in this !

HostLogik 04-28-2005 09:20 AM

Thanks..great hack

simple_john 05-02-2005 10:00 AM

i added this hack too.. simple even for me.. who knows nothing about coding... LOL

angelicGrace 05-04-2005 02:37 PM

Cool hack. thanks Erwin

DjTaz 05-07-2005 02:30 PM

I installed this , and every time i try to send i get

Quote:

That username is already in use. If you are Taz and you have forgotten your password, click here.
can anyone help me with this ?

T3MEDIA 05-08-2005 01:24 PM

Quote:

Originally Posted by Erwin
It's the same timeout as the contact us flood timeout - adjust it in your Admin CP. (I think).

Erwin how can I do this so it sends a template? I am trying to relase a add on to your hack but I need your help. What I want to do is put the email message in a predefined template called invite

they fill out the requested info but once its done it looks like this:
http://www.sprnch.com/forums/view.php?pg=invite

I removed all the "$" from all varables like vboptions[bbtitle] so users who are not logged on can get a idea of what this example is supposed to do.

So the name they enter i placed in the template and the template is sent.
the pics n what not I have done already. There is a new area called "optemailmessage" that I would like to also add.

attached is a fill out form I made please talk a look at the mild ajustments I made...

If you could help that would be really nice of you.

Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head><title>$vboptions[bbtitle] - Refer $vboptions[bbtitle] to a Friend</title>
$headinclude
</head>
<body>
$header
$navbar

<form action="sendmessage.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />

<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%">
<tr>
        <td class="thead" colspan="2"><b>Refer $vboptions[bbtitle] to a Friend</b></td>
</tr>
<!---$logincode--->
<tr>
        <td class="alt2"><b>Send To (Person's Name):</b></td>
        <td class="alt2"><input type="text" class="bginput" name="sendtoname" size="25" maxlength="75" /></td>
</tr>
<tr>
        <td class="alt1"><b>Send To (Email Address):</b></td>
        <td class="alt1"><input type="text" class="bginput" name="sendtoemail" size="25" maxlength="100" /></td>
</tr>
<tr>
        <td class="alt2"><b>Subject:</b></td>
        <td class="alt2"><input type="text" class="bginput" name="emailsubject" value="Join me at this website!" size="25" maxlength="100" /></td>
</tr>
<tr>
        <td class="alt1" valign="top"><b>Optional<br>
                                                          Message:</b></td>
        <td class="alt1"><textarea name="optemailmessage" rows="5" cols="50"></textarea><br>
                                                          <textarea name="emailmessage" rows="10" cols="50" readonly>Hey!

Your friend $bbuserinfo[username], is in the $vboptions[bbtitle] network and would like you to join them! Join and you will immediately be connected to the people who have invited you, and others in their networks!

$vboptions[bbtitle] is an online service that lets you meet new people, share photos, browse profiles, and chat online!

We'll see you inside,
</textarea></td>
</tr>
</table>
</td></tr></table>

<br />

<table cellpadding="2" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<tr>
        <td align="center">
        <input type="submit" class="button" value="Send Email Now!" accesskey="s" />
        <input type="hidden" name="t" value="$threadid" />
        <input type="hidden" name="url" value="$vboptions[bburl]/referrals.php" />
        <input type="hidden" name="refer" value="1" />
        <input type="hidden" name="do" value="dosendtofriend" />
        </td>
</tr>
</table>
                        <br>
                        <div align="center">
                                <p>or<br>
                                <a href="mailto:Enter%20Friend%27s%20Email?Subject=$bbuserinfo[username]%20has%20invited%20you%20to%20join%20$vboptions[bbtitle]!&amp;Body=Join%20me%20at%20$vboptions[bbtitle]!%20%0D%0DJust%20click%20here%20to%20join:%20$vboptions[bburl]/forums/register%2Ephp%3Freferrerid%3D$bbuserinfo[userid]">Click here</a> to automatically place this link in your email!
                        </div>
                </form>

$footer

</body>
</html>


dsboyce8624 05-08-2005 02:49 PM

Wow, that looks great. Please let us know when it's done.


All times are GMT. The time now is 04:24 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.01640 seconds
  • Memory Usage 1,856KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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