Using 3.6.8, I did the following changes:
1. Open sendmessage.php:
a) Find:
PHP Code:
// ############################### start send to friend permissions ###############################
if ($_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend')
replace with:
PHP Code:
// ############################### start send to friend permissions ###############################
if ($_REQUEST['refer'] == 'sendtofriend' OR $_POST['refer'] == 'dosendtofriend')
b) Find:
PHP Code:
eval('print_output("' . fetch_template('sendtofriend') . '");');
Replace with:
PHP Code:
if ($_REQUEST['refer'])
{
eval('print_output("' . fetch_template('refertofriend') . '");');
} else {
eval('print_output("' . fetch_template('sendtofriend') . '");');
}
Add new template "refertofriend" with the following contents:
PHP 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>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.
PHP Code:
sendmessage.php?do=sendtofriend&refer=1
If you want to add it to your footer you can do this.
Edit the footer template.
Find:
PHP Code:
<a href="$vboptions[contactuslink]">$vbphrase[contact_us]</a> -
change to:
PHP Code:
<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.