View Full Version : Refer Friend
Erwin
01-04-2004, 10:00 PM
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
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
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
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
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
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
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
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:
$globaltemplates = array(
'mailform',Add below:
'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
vBulletin MessageBK, 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.
Log Out (http://www.moparstyle.net/testforums/login.php?do=logout) Home (http://www.moparstyle.net/testforums/index.php?)
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
// $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!
StarBuG
04-04-2004, 10:31 PM
Wicked hack! Just installed it at http://globalboards.com :) Thanks!
thats so very strange.
I am sure i did everything but no permission.
then i removed it now i tried it again and it worked.
Maybe i realy missed something.
Thx for this nice hack
StarBuG
Loyalty4Life
04-06-2004, 03:28 AM
Erwin - Simply incredible. Well done! Thanks. :)
* Loyalty4Life clicks install and applauses.
zetetic
04-14-2004, 11:18 PM
Great hack and easy to install, but...
I'm brand new with vB, using 3.0 Gold, and should unregistered users be able to send a referral? I'd rather limit it to people who are logged in if possible.
Thanks!
poliveira
04-15-2004, 05:08 PM
Sweeeeeeeeeeeeeeet!!!
Very nice, simple and hopefully effective.
Thanks,
jarekn
04-16-2004, 11:51 AM
This is a great mod!
Any way of allowing CC, or BCC? What if you want to invite 20 people at one time?
I think this would a great addition to this mod.
THANX
poliveira
04-16-2004, 02:34 PM
This is a great mod!
Any way of allowing CC, or BCC? What if you want to invite 20 people at one time?
I think this would a great addition to this mod.
THANX
I second the motion. adding multiple recipients would be a great enhancement.
MaxScript
04-20-2004, 05:02 AM
is there a way where you can add more then one email address ?
something like friendster.com
MaxScript
04-20-2004, 05:03 AM
also would this work on 3.0.1
poliveira
04-20-2004, 12:31 PM
also would this work on 3.0.1
I am using it on 3.01 and it has been working fine.
rave42
04-20-2004, 01:59 PM
With this would it be possible to list my top 10 refers?
Oblivion Knight
04-20-2004, 03:14 PM
With this would it be possible to list my top 10 refers?No, that's a totally different hack.
MaxScript
04-21-2004, 01:15 AM
No, that's a totally different hack.
can you point me that way please ?
Oblivion Knight
04-21-2004, 11:54 AM
can you point me that way please ?Try this:
http://www.everythingvb.com/products/litestats/
ashley53680
04-21-2004, 03:11 PM
Thanks for the nice hack... however I can't get it to work yet! :lol:
I installed everything, put the link in the footer.... although when I click on "refer friends" it just gives me a blank page. What did I do wrong?? lol
Thanks, Ash
ashley53680
04-21-2004, 03:47 PM
n/m gspot helped me!!
(clicks install)
Ah, this is somethin' I need.
You're awesome Erwin, you've made everything I need :D
cooltechie
04-27-2004, 08:35 PM
wow, i was shocked to not see a built-in refer a friend. will have to install this one. thanks!
gspot
04-28-2004, 02:17 AM
rave42 & maxscript - I have just released the hack you are looking for to list your top number of referrers.. It will show any number that you specify.. It's called: referral statistics
JagFan
05-06-2004, 06:26 PM
Great hack!! Installed and working perfectly :)
Oblivion Knight
05-07-2004, 07:53 AM
I updated the refertofriend template somewhat so that it's more vB3ish and based on the "Contact Us" page (see screenshot).
To install simply replace the entire contents of your refertofriend template with the contents of the file in the zip (zipped so that nothing get's parsed).
Lee Wilde
05-08-2004, 07:44 AM
I have installed this hack without any problems. Thank you very much.
icest0rm
05-14-2004, 03:06 AM
Great hack! I've added the referral link to my header, footer, and quick links menu. Referrals to my forum almost doubled. I'm surprised such a feature is not standard in Vbulletin. I give this hack a thumbs up. :up:
I have also installed it, and it worked beautifully! no hassle at all! :) And really easy to understand and customize to own needs!
MaxScript
05-22-2004, 03:52 PM
<a href="https://vborg.vbsupport.ru/showthread.php?p=515018#post515018" target="_blank">https://vborg.vbsupport.ru/showt...018#post515018</a>
i also get that error on line 248. try go to my forum at www.golfrewind.com and in the footer, i have a refer friends link.
here is the exact error message i receive...
Parse error: parse error, unexpected T_STRING in /hsphere/local/home/vrhee/golfrewind.com/sendmessage.php on line 248
Cold Steel
06-25-2004, 03:17 AM
/me installs.
Thanks!
Megareus Rex
07-11-2004, 08:30 AM
I tried installing this hack, and everything SEEMED to go well, but the link never appeared. I used the footer coding he had too...
Marulatree
07-11-2004, 01:58 PM
I keep getting a permission problem as Admin? Please help...
Tried this on my test forum and always get
vBulletin Message
BK, 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.
Ok .. solved the problem .. I always take a backup before I edit a php file.
Edited the sendmessage.php .. made a coffee and uploaded the backup ... duh :nervous:
gwhooooey
07-21-2004, 06:36 PM
So... how can we make it so you can send to more than one person at the same time?... I think this would be very handy
NietzscheKid
07-21-2004, 08:08 PM
Thank you for this hack!
I've installed it and it works like a charme. :D
ashley53680
07-21-2004, 08:44 PM
So... how can we make it so you can send to more than one person at the same time?... I think this would be very handy
I agree, I'd love that!
DB8 MissingLink
07-22-2004, 02:00 PM
Which setting do I need to change so prevent this message from propagating when I click "Send":[Username] 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. I uploaded the new version of sendmessage.php to the root forum directory just fine - and have verified the changes. Can't figure out what's wrong.
I'm using version 3.0.3
soccerclue
08-05-2004, 10:29 AM
Hi, I have installed the hack. It's a great hack and it's displayed fine. But, when I tried to send the referral email to my own email address. The email is sent back to my domain email address saying that the email cannot be sent. Can someone help me why did that happen? I thought there might be an error with my domain email address, but I tried to send email with my email address using webmail and it works. Can someone help me? is it because the form is using vb mail and it does not work with my domain email?
Rambo
08-05-2004, 02:05 PM
*clicks install*
Seems to be working fine ^_^
soccerclue
08-06-2004, 05:44 PM
Can someone help me please? The problem is in my previous post.
Keyser S?ze
08-09-2004, 05:09 PM
wondering if it would be possible to in the profile part could add "who did u refer", like, in ur profile it says Referals: 3
well the 3 be a link to a list of members you referred, would be neat
Installed with out a problem :)
*Clicks install
sully02
08-13-2004, 02:11 PM
Installed with out a problem :)
*Clicks install
Brilliant!
* sully02 installs happily
y2krazy
08-30-2004, 03:10 AM
/me clicks install!
JamesFrost
09-01-2004, 09:06 PM
Erwin,
I've tried modifying the template to add some extra text. All looks OK when the refererrer page comes up, but when I receive the e-mail, lot's of spaces go missing like this :
I thought you might be interested in joining me at Easy-Tek.
Easy-Tek is a new website, designed for beginner and intermediate computer users. Ifyouwouldliketolearnmoreaboutcomputingandtechnolo gyandgetmoreoutofyourequipmentthencomeandjointheco mmunity,andseeifyoulikeithere.
I've tried various combinations - It always seems to happen after the third punctuation mark!
gspot
09-06-2004, 03:12 PM
EVERYONE - might be interested in using this hack with this one.
Referral Statistics Hack vb3.0.3 (https://vborg.vbsupport.ru/showthread.php?t=64469&page=1&pp=15)
- flawless integration in under 3 minutes.
- great referral statistics results
- and more...
CHECK IT OUT..
etaslim
09-06-2004, 03:30 PM
Installed smoothly! Thanks for this awesome hack! Those of you who enjoy this hack should also check out the Referral Statistics hack (https://vborg.vbsupport.ru/showthread.php?t=64469&page=1&pp=15) from gspot (https://vborg.vbsupport.ru/member.php?u=30832). Both hacks compliment each other very well & perfect for running a referrals contest.
AnhTuanCool
09-06-2004, 06:40 PM
Great Erwin ;)
* AnhTuanCOol clicks install right away
goingnova
09-13-2004, 04:09 AM
Ummm, NM.
lanoix
10-05-2004, 02:35 PM
Installed, works perfectly... Thanks!
Mokster
10-08-2004, 04:46 PM
hi, i get a blank page when i click on refer a friend...? where am i suppose to upload the refertofriend.php page?
scriptjunkie
10-11-2004, 12:35 PM
Thanks....It is what I was looking for....clicking!!
Erwin
10-11-2004, 08:39 PM
hi, i get a blank page when i click on refer a friend...? where am i suppose to upload the refertofriend.php page?
There is no refertofriend.php page. This hack uses the existing sendmessage.php.
ashley53680
10-11-2004, 09:31 PM
refertofriend is a template...
frankenberrie
10-23-2004, 02:15 PM
This mod is excellent---- Perfect for every site out there.
I do have a problem - when users are unregistered, they have the ability to type in a name other that (unregistered)
Even if a name is typed in, in the email I still get this
This is a message from Unregistered ( mailto: )
&
From,
Unregistered
any thoughts?
Erwin
10-24-2004, 01:55 AM
This mod is excellent---- Perfect for every site out there.
I do have a problem - when users are unregistered, they have the ability to type in a name other that (unregistered)
Even if a name is typed in, in the email I still get this
This is a message from Unregistered ( mailto: )
&
From,
Unregistered
any thoughts?
I wouldn't recommend this form be open to unregistered users. Not sure why that's case, I thought I made it so taht the name is customized.
Lord Brar
10-27-2004, 02:41 PM
*Installed.
Thanks :)
94DROPTOPZ
10-31-2004, 03:15 AM
I can't seem to figure out what the problem is? I got everything installed and it seems to work perfect but then I never get the e-mail??
I'm not sure what could be wrong?
VERY nice hack BTW very easy instructions
pagekeeper
11-03-2004, 12:27 AM
i tested the script its cool and everything its really appriciated, how do you edit the footer of the email, "forum takes no responsibility for messages sent through its system."
it would be cool to add mulitple refeers on the same page ? would it work if i duplicate the top two columns ? it would be good to limit the amount of characters a user would send, i think 500would be enough plus a count down box its just an idea though i think it could work well, and a log file to keep track of who's using it. I dont really want to get into detail but yeh ... you can easily get people spamming it. i've put it in an if tag so only the members can access it, since it has requirements such as user ID etc.
bendigo-tech
11-03-2004, 02:04 AM
nice mod... thanks alot! :)
*Installed!
Caiman
11-08-2004, 03:39 PM
This is a great hack, was just thinking about something like this the other day and here it is, Thanks!
*installs
BAGHDAD-IRAQ
11-09-2004, 12:53 AM
thx for the great hack... but it is not sending email ...... ?????????????
I updated the refertofriend template somewhat so that it's more vB3ish and based on the "Contact Us" page (see screenshot).
To install simply replace the entire contents of your refertofriend template with the contents of the file in the zip (zipped so that nothing get's parsed).
Yup, it definetly looks more vb3ish lol :) thanks Oblivion and thanks Erwin :) Nice Mod :)
Mokster
11-19-2004, 04:28 AM
so is there anyways to input more than 1 email at a time?
Mokster
11-28-2004, 02:38 PM
so is there anyways to input more than 1 email at a time?
bump :)
T3MEDIA
12-13-2004, 08:53 AM
log in and to to the link that shows this template on your webpage.
ya there? ok now log out.
now click back. change unreg to any email and hit send.
instant spam tool.
cschuck3
12-13-2004, 09:00 AM
This tool is what I was looking for, Would it take much to once the friend was email and he/she click the URL to make sure that the person that send the refer wold get credit so maybe the registeration forum with pull the persons ID from the email sent out so it could make sure they for credit... I am goign to run a content for the most regoister referals so this would help make sure it all on the up and up, abnd maybe the option to even track if the person even click in the link. If these option could be added Please infor me of waht it would take. cschuck3@mnminimoto.com
Sleepyk
12-19-2004, 01:11 AM
Before i go to install, does this work with 3.0.3 aswell?
This tool is what I was looking for, Would it take much to once the friend was email and he/she click the URL to make sure that the person that send the refer wold get credit so maybe the registeration forum with pull the persons ID from the email sent out so it could make sure they for credit... I am goign to run a content for the most regoister referals so this would help make sure it all on the up and up, abnd maybe the option to even track if the person even click in the link. If these option could be added Please infor me of waht it would take. cschuck3@mnminimoto.com
That's already part of the hack. This line covers it
Click here to check it out:
$vboptions[bburl]/index.php?referrerid=$bbuserinfo[userid]
What I'd like to see added to this hack is that you list all your domains and instead of just referring the forum, it detects the referer page, if it is in the domain list, it sends out that page to a friend.
RCSwap
12-21-2004, 07:33 PM
I'm just getting a blank page.... any ideas?
mikehawk
01-01-2005, 06:49 PM
Installed! Awesome. :squareeyed:
T3MEDIA
01-01-2005, 06:52 PM
It isnt really about this hack but is there a refer only way to sign up on vbulletin???
Thanks.
RetroDreams
01-01-2005, 11:20 PM
Some of my users get "fill out all fields completely" even though they do. Any ideas?
PurpleCow
01-02-2005, 07:51 AM
/me Clicks Install !
Hey..how about this Idea.... would eb good for running referrals contest...
Display this link below the Nav bar after the member logs in along with contest info/text. When a member is not logged in, we have the invite to register in teh community...and after logging in..if we have the referral contest..that woudl be great !
Any help here ?!
Thanks
nautiqeman
01-10-2005, 11:52 AM
/me installs!!!
Creative Suite
01-10-2005, 04:14 PM
nice work!
*Installed!
Takamine334
01-12-2005, 04:39 AM
weird....after installing and then following the link, I get this:
Green, 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.
Takamine334
01-12-2005, 04:41 AM
nevermind...I'm a doofus.
gilbert
01-13-2005, 06:03 AM
nevermind...I'm a doofus.
Me too but can someone explain why? I still cannot figure out this permissions thing for VB3.03
Hi Eirwin,
This is a good hack to encourage users to get more members in the forums.
However my issue is as follows:-
my forums are installed in /fourms directory and I am using Portal (CMPS) software.
the link "sendmessage.php?do=sendtofriend&refer=1" does not work for my portal homepage.
What can I do so that the URL "sendmessage.php?do=sendtofriend&refer=1" works from /forums dir. as well as from outside.
PLUS
Is there a way to disable "Refer Friends" for guest users??
thanks for u help in advnace.
Vik
Erwin
01-13-2005, 08:47 PM
Hi Eirwin,
This is a good hack to encourage users to get more members in the forums.
However my issue is as follows:-
my forums are installed in /fourms directory and I am using Portal (CMPS) software.
the link "sendmessage.php?do=sendtofriend&refer=1" does not work for my portal homepage.
What can I do so that the URL "sendmessage.php?do=sendtofriend&refer=1" works from /forums dir. as well as from outside.
PLUS
Is there a way to disable "Refer Friends" for guest users??
thanks for u help in advnace.
Vik
Edit the templates to change the URL.
Don't you want guests to refer their friends? :)
gilbert
01-13-2005, 10:54 PM
Me too but can someone explain why? I still cannot figure out this permissions thing for VB3.03
Yah I have the same question. Hopefully a nice person can help :ninja:
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
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:
// 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:
// 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
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?
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
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
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
<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
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
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/forums/refer_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:
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
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:
$globaltemplates = array(
'mailform',Add below:
'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
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.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
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 (http://www.ravensrealm.net/)
doesnt work here: http://www.theflyfishingforum.com (http://www.theflyfishingforum.com/)
any ideas?
mholtum
03-21-2005, 05:40 AM
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..
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.
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
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
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?
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
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
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.
$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=$bbuseri nfo[username]%20has%20invited%20you%20to%20join%20$vboptions[bbtitle]!&Body=Join%20me%20at%20$vboptions[bbtitle]!%20%0D%0DJust%20click%20here%20to%20join:%20$vbop tions[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.
dsboyce8624
05-08-2005, 08:04 PM
I would like to change the email this sends. I changed what was in the template added, but where do I find this text:
This is a message from Dennis ( mailto:xxxxxxx@xxxx.net ) from the Damn That Sucks! ( http://damn.that-sucks.net/forums/ ).
Obviously it's not worded correctly and I am unfortunately fussy about that.
Thanks,
DjTaz
05-10-2005, 07:11 PM
Anyone help me with the above problem i have with this ? please ?
T3MEDIA
05-12-2005, 12:47 PM
Wow, that looks great. Please let us know when it's done.Im just wating myself to see what Er has to say.
Erwin
05-15-2005, 04:02 AM
Im just wating myself to see what Er has to say.
What did you want me to say? :)
<font color="Orange">*Installed*</font>
this one is nice
T3MEDIA
05-19-2005, 08:10 PM
What did you want me to say? :)#159
sabret00the
05-29-2005, 02:21 PM
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.
$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=$bbuseri nfo[username]%20has%20invited%20you%20to%20join%20$vboptions[bbtitle]!&Body=Join%20me%20at%20$vboptions[bbtitle]!%20%0D%0DJust%20click%20here%20to%20join:%20$vbop tions[bburl]/forums/register%2Ephp%3Freferrerid%3D$bbuserinfo[userid]">Click here</a> to automatically place this link in your email!
</div>
</form>
$footer
</body>
</html>
quite sexy, the mod isn't a hard oen though, if i recall it's just a matter of changing $message to $template_name (assuming you've assigned the template to the variable properly). in the vbmail() tags :)
RapCapital
05-29-2005, 04:10 PM
<font color="Green">* RapCapital installs</font>
I love the hack! Good work Erwin!
oceanart
05-30-2005, 05:14 PM
This is exaclty what I was looking for - a big thanks ERWIN!
wolfgrrl
06-03-2005, 09:45 PM
WIll referred people have to be approved by moderation if the board is set not to accept new applicants?
T3MEDIA
06-04-2005, 12:41 AM
quite sexy, the mod isn't a hard oen though, if i recall it's just a matter of changing $message to $template_name (assuming you've assigned the template to the variable properly). in the vbmail() tags :)Thank you... but I dont know how to do that. I only know the pritty stuff...
See I want it to work like this. You type... hey jen... come check this out... (you only have x amount of txt you can type)
then hit send.
She get that nice template... with your friends attached.
If you can set that up I know you would love it... I been to your site.
I posted a dumb question, then I saw that your hack already covers everything. Thanks a lot!
Thanks,
Lem
mholtum
06-20-2005, 08:27 AM
I love the mod and use it on 2 different boards. Any plans to port it over as a plugin for 3.5?
Caveman2k2
07-13-2005, 05:37 AM
/me clicks install
Great hack! Installed without a hitch.
bigdog829
07-14-2005, 07:31 PM
<font color="green">*bigdog829 installs</font>
Very easy & nice hack thanks
MediaHound
07-15-2005, 03:56 AM
I would like to have this on a 3.5 beta 3 board.
Erwin, before I dive into the code, will it work on 3.5, and if not, do you have plans to modify it so that it will?
thank you
csidlernet
07-18-2005, 01:47 AM
thanks a lot
o0Hubba0o
07-18-2005, 02:10 AM
thanks a lot
I used the auto-installer and it wouldn't work in firefox, so I dl'ed the manual install and put the vbulletin_global.js in manually and works fine now.
Except it only shows up on the portal page, the main forums don't have "contact us" or "refer friends", not sure if it's the template I'm using or what. So if anyone knows where I could look to fix that it would be appreciated. Otherwise I love this one.
brainfreeze
07-25-2005, 01:06 PM
**brainfreeze Installed!
Any possibility we could add a standard form field on the bottom of the forum page - similar to http://forums.ikonboard.com (must be logged in to see the "Invite a Friend" feature.
simon.
08-05-2005, 05:00 PM
I really dont get this I have recently upgraded to V3.0.8 and I know get this error:-
ewadmin_simon, 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.
(EVERYONE GETS THIS ERROR!!!) HELP!
*Runs round in circles!
Erwin
08-06-2005, 01:47 AM
Is your contact form/ email members permission in vB AdminCP Options enabled?
T3MEDIA
08-06-2005, 04:48 AM
#159Erwin 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.
simon.
08-06-2005, 01:10 PM
Is your contact form/ email members permission in vB AdminCP Options enabled?
How would I know? Could you tell me how to find out...
o1dirtydog
08-16-2005, 10:07 PM
great work... installed
ryuuchida
08-20-2005, 08:17 AM
Thanks for the great work Erwin! (And to Safiel on another thread (https://vborg.vbsupport.ru/showthread.php?p=759903) for the 3.5 version.)
Fallback
08-21-2005, 01:21 PM
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.
therczone
08-22-2005, 04:30 AM
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.
faast
08-23-2005, 02:28 AM
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:
$globaltemplates = array(
'mailform',Add below:
'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.
subnet_rx
08-25-2005, 11:47 PM
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?
faast
09-09-2005, 02:42 PM
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
Inferno Dragon
09-25-2005, 10:45 AM
going to install this hack tonight ;)
adill420
09-30-2005, 10:50 AM
installed..first the email was going out but nothing in email..then did a fresh start on fresh sendmessage.php now gets a permission problem..
NxTek
10-20-2005, 05:59 PM
Will this work for 3.5?
auz1111
10-23-2005, 02:33 PM
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.
why not just wrap this around the link:
<if condition="$bbuserinfo['userid']"> Refer Link Here </if>
docvader
11-16-2005, 04:35 AM
why not just wrap this around the link:
<if condition="$bbuserinfo['userid']"> Refer Link Here </if>
Well, I feel really stupid asking this, but, I'm getting the white screen of "no template" when hitting either "Refer friends" or "Contact us". My templates are in all of my styles, and I've done the php edit without problem. This is a simple hack to install, which is what is making me pull what little hair I have out of my head.
Any suggestions? I know it has to be something simple that I missed.
Thx Erwin, almost something which I'm lookin for. Cant we modify this hack a bit such that this can be used as "invite friends" on forums where registration is closed. I want something like that on my site, where I have closed registrations, and want to give some invites to "certain" users based on "certain" conditions. I'm not into php and html... so can erwin or someone help me on this pls.
Thx
p.s I know of a site which used the same mod and implemented the thing I wanted :)
cbr929rrerion
11-22-2005, 03:44 AM
I would be thrilled if some one can show me how to hide everything from subject down to send.. just keep the functionality, just hide it from users, i tried input="hidden" and got a message required info not filled out..
can anyone help?
ThugTheLeet
01-14-2006, 11:58 PM
Quickly installed nice works perfect on v3.0.7
:)
murrtex
01-28-2006, 11:00 PM
thanks Erwin
how can I block to unregistered users sending refer?
I should block that group because.they are using "refer to friend mail" like their mail account,they can send alots of mail to everywhere..
please inform.
regards.
mountainlife
03-15-2006, 03:31 AM
will this work with the latest vb version? if not can someone make it work?
jetjames
05-13-2006, 03:01 AM
Can someone tell me what line the code can be found that needs to be changed?
RS_Jelle
05-13-2006, 11:54 AM
will this work with the latest vb version? if not can someone make it work?
This will work with the latest version of vB 3.0.
If you want to use it on vB 3.5, you need to read this (https://vborg.vbsupport.ru/showpost.php?p=751703&postcount=3) ;)
I am using this with vB 3.5.3 and it works fine except that in the recent past I am getting SPAM through this. I am afraid that SPAMers are using this to resend SPAM throug my email server...
Can I limit number of sent by IP adress or somthing?
Or can you add image verification?
Any other idea?
Sean S
06-23-2006, 06:31 PM
I hope you don't mind this Erwin. Basically what I did to control the spams or unwanted guests to use this feature, I just put a conditional around the template so that only members can use the form,
$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
<if condition="$bbuserinfo[userid] == 0">
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" class="tborder">
<tr>
<td class="thead" colspan="2"><b>Refer $vboptions[bbtitle] to a Friend</b></td>
</tr>
<tr>
<td class="alt2">Sorry, you have to register first to invite your friends.</td>
</tr>
</table>
</td></tr></table>
<else />
<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>Message:</b></td>
<td class="alt1"><textarea name="emailmessage" rows="10" cols="50">I thought you might be interested in joining me at $vboptions[bbtitle]! Click here to check it out:
$vboptions[bburl]/index.php?referrerid=$bbuserinfo[userid]
From,
$bbuserinfo[username]
</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="$url" />
<input type="hidden" name="refer" value="1" />
<input type="hidden" name="do" value="dosendtofriend" />
</td>
</tr>
</table>
</form>
</if>
$footer
</body>
</html>
just replace the "Sorry, you have to register first to invite your friends." with whatever you want. I didn't really see a point for unregistered members to refer other people to the site when their not registered themselves. Again, every site has different needs, hope this will be a solution for some. Thanks for this hack Erwin, it works great :)
friscogal
09-02-2006, 07:52 AM
hi Ewin, i just installed in vb3 3.6 and have the link at the bottom of the page but when i click the link i get a blank page...i see a few others have had the same problem.
what am i doing wrong?
soletrader
09-03-2006, 02:54 PM
Any updates on vb 3.6.0?
sandman1970
09-27-2006, 01:48 PM
hi,
after long time didnt work with vb 353 admin job, i forgot every thing :)
can anyone tell me step by step HOW to
Add new template "refertofriend"
Thank you.
What I did may not be the same as what you did with this hack. If it works great but if it doesn't, sorry.
I?m using 6.2 and cmps 2.2.1
This is for A)
look for
// ############################### start send to friend permissions ###############################
if ($_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend')
replace with
// ############################### start send to friend permissions ###############################
if ($_REQUEST['refer'] == 'sendtofriend' OR $_POST['refer'] == 'dosendtofriend')
all I did was replace do with refer and everything worked for me
B) has not changed
rnmcd
11-10-2006, 02:32 AM
Does this hack create a link for the user to click that pulls up the form?
Regarding preventing this form being used to send spam, could a captcha be used to prevent bots from sending messages? Or don't bots 'use' this type of form?
Thanks.
shallow bay
01-15-2009, 11:01 PM
If anyone is using this mod with 3.7 I have it installed and everythign works correct but when i try and send a message i receive this error:
Your submission could not be processed because a security token was missing.
anyone got any ideas?
cgrafx
01-28-2009, 01:21 AM
I just successfully added this to 3.7.4. I got the same security token error, and when I compared the existing sendtofriend template with the refertofriend posted here I noticed a hidden input variable was missing:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
I added this under line 50 to the refer a friend template.
I also noticed that upon a completed submission the forms returns to the previously viewed page. That's probably fine, has anyone done this with a custom confirmation landing page?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.