PDA

View Full Version : Refer/invite friend (Erwin's version) for 3.6?


friscogal
09-02-2006, 09:49 PM
i haven't been able to find this anywhere? is this version available for 3.6. i installed but get a blank page when clicking the link. i read that others have had this problem as well.

LisaD1
09-19-2006, 04:15 AM
I am looking for this as well! TIA
Lisa

stonner
11-01-2006, 04:16 AM
me too

DDad
11-02-2006, 05:19 PM
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

kafi
02-19-2007, 07:21 AM
Thank you DDad!!!! It works!!!

volarium
03-10-2007, 02:43 PM
I'm wondering if someone would be kind enough to provide full instructions on how to set this up for 3.6? Would I install the Erwin version that was created for 3.0, and then simply apply the hack above? I realize it's not officially supported, but if anyone can provide more detail, many of us would be grateful. :-)

Lars-Christian
03-11-2007, 02:51 PM
Just follow the exact same instructions as in the install file, but exchange step A) with the step DDad provided here :)

Works like a charm for me as well!

RichieBoy67
07-30-2007, 03:59 PM
I do not see a step a in the instruction file? The first step has no letter but it doesn't seem right to be replacing the code above for the first step.... What am I missing???

Has anyone gotten this to work in later versions like 3.6.7???

Thanks

yoyoyoyo
09-17-2007, 01:06 PM
Using 3.6.8, I did the following changes:

1. Open sendmessage.php:

a) Find:
// ############################### 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')b) Find:
eval('print_output("' . fetch_template('sendtofriend') . '");'); Replace with:
if ($_REQUEST['refer'])
{
eval('print_output("' . fetch_template('refertofriend') . '");');
} else {
eval('print_output("' . fetch_template('sendtofriend') . '");');
} Add new template "refertofriend" with the following contents:

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

$footer

</body>
</html>
3. Add this link anywhere in your header, forumhome or footer template.

sendmessage.php?do=sendtofriend&refer=1If you want to add it to your footer you can do this.

Edit the footer template.

Find:

<a href="$vboptions[contactuslink]">$vbphrase[contact_us]</a> -change to:

<a href="$vboptions[contactuslink]">$vbphrase[contact_us]</a> - <a href="sendmessage.php?do=sendtofriend&refer=1
">Refer Friends</a> -

but when I go to access: sendmessage.php?do=sendtofriend&refer=1 I receive an error message saying I do not have permission to view the page.

Ohiosweetheart
09-17-2007, 02:03 PM
There is a good "Tell-a-friend" hack here (http://www.vbulletin-faq.com/forum/showthread.php?t=10353). It works great.

yoyoyoyo
09-17-2007, 08:29 PM
There is a good "Tell-a-friend" hack here (http://www.vbulletin-faq.com/forum/showthread.php?t=10353). It works great.thanks - that one is interesting, but does not use vb code, or the forum style, etc..

kafi
01-06-2008, 04:18 PM
yoyoyoyo thanks for sharing your info :)

Jeordie015
02-21-2008, 11:35 PM
Okay, I got this working on 3.6.4. The only slight problem is that once you send the e-mail, it's taking me to the Contact Us page. Is there a way for it to bring you back to the index page?

Bloom21
02-22-2008, 12:17 PM
thanks yoyoyoyo... works perfectly for 3.6.8 L2