View Single Post
  #9  
Old 09-17-2007, 01:06 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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[bbtitleto 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[bbtitleto 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=
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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01166 seconds
  • Memory Usage 1,821KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete