PDA

View Full Version : Refer to Friend v1.0


Hasann
12-26-2005, 10:00 PM
This was coded by Erwin for 3.07
https://vborg.vbsupport.ru/showthread.php?t=59708

i have ported for 3.5.x thnkx for Erwin for this g8 hack

Installation is easy
read the readme file

in navbar template put this code somewhere
<a href="sendmessage.php?do=sendtofriend&refer=1
">Refer to Friend</a>

thats it :rolleyes:

BoYagoob
12-27-2005, 04:27 AM
Very nice hack, Hasann ..

but can you rename this file: sendmessage.php to a different name, because there is already a file in our forums like this:
https://vborg.vbsupport.ru/sendmessage.php

Thanks a lot bro.

Hasann
12-27-2005, 04:38 AM
you must new sendmessage.php overwrite with old sendmessage.php

rb290
12-27-2005, 04:44 AM
isnt this like the invites system ?

kadafi_alive
12-27-2005, 07:42 AM
Hi,

For some reason, it doesn't synch with the template.

See this image (http://www.islamdot.com/notsynced.JPG)

Snake
12-27-2005, 11:17 AM
Wow this nice thanks!

nexialys
12-27-2005, 11:36 AM
@Hasann, this is not the proper way to do things...

you have to use the Hooks system when possible, so people don't have to edit their files.

also, you can't ask for users to overwrite their other files, so if there is some file to edit, please provide the instructions for editing, instead of giving a file to overwrite.

ReZ
12-27-2005, 02:54 PM
It is possible to have this shown in the User CP section?

akanevsky
12-27-2005, 03:19 PM
It is not exactly like invites system, because it does not send out invites, but instead only simple referrerid links ;P

Chris M
12-27-2005, 05:19 PM
Hasann - Please write instructions in a .txt file of how to modify the sendmessage.php file

3.1 No "spreading of copyrighted Material": Please do not upload, attach or post anything that is copyright or licensed without prior consent of the owner. For example, you cannot upload or attach full copies of vBulletin program files. Partial code reference is allowed, as long as it is not substantial - this will be decided by the staff.
Thank you :)

Chris

Hasann
12-27-2005, 08:43 PM
Readme file attached ;)

Floris
12-28-2005, 06:08 PM
Cool hack :D

Thank you for sharing.

bashy
01-01-2006, 09:07 AM
Hi

I would like this to actually show in the navbar, instead its just above it, or below it :(

How can i change this

<a href="sendmessage.php?do=sendtofriend&refer=1
">Refer a Friend</a>

To this

<td class="vbmenu_control"><a href="online.php?$session
[sessionurl]">$vbphrase[whos_online]</a></td>

Regards

Bashy

nexus851
01-04-2006, 12:12 AM
how do u add multiple SEND TO email fields so that you can send a batch of emails at once to all your friends, rather than just 1

Necron
01-20-2006, 07:16 AM
.. is edit 1 and 3 the same piece of code, just in 2 different ways?

Detomah
01-20-2006, 02:51 PM
As a lot of other people probably do, I use the sendmessage.php file on my contact page.

Does the fact you have to overwrite that file for this addon effect the normal contact page bits in any way?

I would love to use this addon, but i'm not going to until I am clear about this issue.

Snake
02-01-2006, 02:24 PM
Lovely it's working like a charm except the look of the skin. Take a look...

http://forums.philosopherslegacy.net/sendmessage.php?do=sendtofriend&refer=1

How can I fix it?

Darkfire122333
02-01-2006, 03:58 PM
Here is a simple code to change it to what you wanted bashy, just enter this into the navbar and it will go into the navbar.. Enjoy

<td class="vbmenu_control"><a href="sendmessage.php?do=sendtofriend&refer=1">Refer to Friend</a></td>

swa
02-01-2006, 06:51 PM
Would it be possible to have this come up after someone signs up for your site?

Snake
02-01-2006, 09:46 PM
http://img67.imageshack.us/img67/1696/probfr5qp.jpg

How do I fix that? Please guide me...

Hasann
02-02-2006, 06:25 AM
How do I fix that? Please guide me...

open refertofriend template and change this code

<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]

to
<td class="alt1" valign="top"><b>Message:</b></td>
<td class="alt1"><textarea name="emailmessage" rows="10" cols="30">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]

Snake
02-02-2006, 07:36 PM
I tried that and it still the same.

Darkfire122333
02-05-2006, 04:06 PM
Would it be possible to have this come up after someone signs up for your site?


<if condition="$show['member']">
<td class="vbmenu_control"><a href="sendmessage.php?do=sendtofriend&refer=1">Send to Friend</a></td>
</if>


There you go, Enjoy.

Darkfire122333
02-05-2006, 04:08 PM
I tried that and it still the same.

What do you exactly want changed? If I know the source that you wanted changed, I could modify it for you.

Just quote what you wanted changed, and a little definition of what you wanted it to look like, and I could work from there.

Snake
02-05-2006, 04:33 PM
Look at this image...

http://img67.imageshack.us/img67/1696/probfr5qp.jpg

It's looking kinda messed up because of my skin as it is modified differently. You see, that blank black bg thingy is messing up with the skin...

Darkfire122333
02-05-2006, 05:13 PM
In Template refertofriend

Replace:

<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%">


With:

<table cellpadding="1" cellspacing="1" border="1" class="tborder" width="0" align="center"><tr><td>
<table cellpadding="1" cellspacing="1" border="1" width="100%">


DEMO:
http://fortsask.be/sendmessage.php?do=sendtofriend&refer=1

Hint: To remove the mini borders, just excange the 1's to 0's and they will be gone.

Snake
02-05-2006, 05:19 PM
Nevermind...

Thanks!

Snake
02-05-2006, 05:26 PM
Yeah it's working now. Thank you.

Darkfire122333
02-05-2006, 05:27 PM
No Problem, Just glad to help.

blackpheonix
02-06-2006, 09:35 PM
sorry i didnt like your template very much so i changed it a little hope you dont mind :) in case anyone else wants teh same template as me


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


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


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">

<b>Refer $vboptions[bbtitle] to a Friend</b>
</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">

<fieldset class="fieldset">
<legend>Your Friends Details</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
<b>Send To (Person's Name):</b><br />
<input type="text" class="bginput" name="sendtoname" size="50" maxlength="75" />
</td>
</tr>
<tr>
<td>
<b>Send To (Email Address):</b><br />
<input type="text" class="bginput" name="sendtoemail" size="50" maxlength="100" />
</td>
</tr>
<tr>
<td>
<b>Subject:</b><br />
<input type="text" class="bginput" name="emailsubject" value="Join me at this website!" size="50" maxlength="100" />
</td>
</tr>

</table>
</fieldset>


<div class="fieldset">
$vbphrase[message]:<br />
<textarea name="emailmessage" rows="10" cols="50" wrap="virtual" style="width:$stylevar[messagewidth]">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>
</div>

</div>
</div>

<div style="margin-top:$stylevar[cellpadding]px">
<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" />
</div>
</td>
</tr>
</table>

</form>

$footer

</body>
</html>

clasione
02-11-2006, 03:07 PM
I could not find the last bit of code in my document for this modification...... I'm using 3.5.3

Someone should work out a plug in for this...... I though that was what 3.5.3 was really all about... using plug-ins instead of having to change files....

Snake
02-14-2006, 11:53 AM
Is it possible NOT to include the refer ID while inviting friends? It seems I can't do that because I'm getting a permission error.

cbr929rrerion
02-28-2006, 01:05 AM
I am not sure how to word this but due to this tool not using image verification it opens up your domain for a security risk and spamming.

I found out the hard way after 65 Gig of email traffic thats was traced back.

I have since uninstalled this mod to say the least and if image verification does get added I would consider adding it back. But only if security is addressed.

Burley
03-06-2006, 12:11 PM
I clicked install, but it would be nice if you would update your manual so it also is compatible with 3.5.4

anyway, nice hack

Burley
03-06-2006, 12:12 PM
I am not sure how to word this but due to this tool not using image verification it opens up your domain for a security risk and spamming.

I found out the hard way after 65 Gig of email traffic thats was traced back.

I have since uninstalled this mod to say the least and if image verification does get added I would consider adding it back. But only if security is addressed.


wow, and uninstalled it

ThePimp
03-06-2006, 12:25 PM
Someone should write an add-on for this that collects the email addresses. :)

Burley
03-06-2006, 02:45 PM
good idea, but don't forget the security issue then

grains
03-15-2006, 07:42 PM
Is this just "Upload the product" or do we have to make changes to the file as well?

mountainlife
03-15-2006, 09:00 PM
has security with a verify image been added, if not can anyone do this we REALLY need a refer a freind!

Exitilus
03-27-2006, 08:46 PM
You can always set some if conditions making a person be a member and making them have over a xx amount of posts to get around someone spamming.

Other than that it seems pretty good. going to install and test it here in a bit

Edit: woops didn't notice this required code edit So I won't be installing :) But stil you could add if conditions like i said for security

---MAD---
04-10-2006, 07:22 AM
this doesnt seem to work on 3.5.4

hotwheels
04-11-2006, 11:17 PM
I too can't seem to get this to work...........3.5.4

It has to pieces of .php change's that are the same coding.. This code if (!$_REQUEST['refer'])
{
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();
}
}

and this code are in the same location 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']);

}
}

serhat_kk
04-12-2006, 06:57 PM
Thanks.How do i add verification picture ?

When i click send it says "you dont have permission" etc.... where can i edit this permission ?

serhat_kk
04-14-2006, 08:06 PM
When i click send it says "you dont have permission" etc.... where can i edit this permission ?

lazyseller
04-19-2006, 01:35 PM
any fix for 3.54 yet ?

serhat_kk
04-21-2006, 01:36 PM
When i click send it says "you dont have permission" etc.... where can i edit this permission ?

Help pls...

serhat_kk
04-21-2006, 08:37 PM
can someone help us?

LisaD1
04-28-2006, 04:26 PM
I also have the no permission issue, anyone know how to fix this???
Thanks

redlabour
05-23-2006, 09:08 AM
Still waiting for this Hack fully Hook based without editing the sendmessage.php File .

Any updates soon ?

CP,
06-02-2006, 10:41 AM
Very nice hack for vb 3.5.4! Cheers

kobescoresagain
06-03-2006, 01:44 PM
How can I change the message, I wanted to add a little dscription about hte forum into it. Thanks

kafi
06-05-2006, 07:35 AM
Is this not vulnerable by spammers to use it for sending out spam through our server?

soletrader
08-06-2006, 11:22 AM
update for 3.6 gold?

paul41598
08-08-2006, 07:53 PM
I have this working on 3.5.4 now

rex_b
04-05-2007, 02:33 PM
does this work for 3.6?

leftie
04-05-2007, 06:45 PM
I liked this hack on 3.5.x does it work on 3.6.5

EDIT. Ooops found out hw to do it here. https://vborg.vbsupport.ru/showthread.php?t=125633

Mum
06-30-2007, 06:43 PM
Is it bad to edit that file?

Is there one of these written for 3.6. yet? I can't find it anywhere.