vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Refer/invite friend (Erwin's version) for 3.6? (https://vborg.vbsupport.ru/showthread.php?t=125633)

friscogal 09-02-2006 09:49 PM

Refer/invite friend (Erwin's version) for 3.6?
 
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

Code:

// ############################### start send to friend permissions ###############################
 if ($_REQUEST['do'] == 'sendtofriend' OR $_POST['do'] == 'dosendtofriend')

replace with

Code:

// ############################### 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:
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.

Ohiosweetheart 09-17-2007 02:03 PM

There is a good "Tell-a-friend" hack here. It works great.


All times are GMT. The time now is 02:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01284 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (8)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete