vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Refer Friend (https://vborg.vbsupport.ru/showthread.php?t=59708)

dsboyce8624 05-08-2005 08:04 PM

I would like to change the email this sends. I changed what was in the template added, but where do I find this text:

This is a message from Dennis ( mailto:xxxxxxx@xxxx.net ) from the Damn That Sucks! ( http://damn.that-sucks.net/forums/ ).

Obviously it's not worded correctly and I am unfortunately fussy about that.

Thanks,

DjTaz 05-10-2005 07:11 PM

Anyone help me with the above problem i have with this ? please ?

T3MEDIA 05-12-2005 12:47 PM

Quote:

Originally Posted by dsboyce8624
Wow, that looks great. Please let us know when it's done.

Im just wating myself to see what Er has to say.

Erwin 05-15-2005 04:02 AM

Quote:

Originally Posted by T3MEDIA
Im just wating myself to see what Er has to say.

What did you want me to say? :)

DDad 05-18-2005 12:33 AM

<font color="Orange">*Installed*</font>
this one is nice

T3MEDIA 05-19-2005 08:10 PM

Quote:

Originally Posted by Erwin
What did you want me to say? :)

#159

sabret00the 05-29-2005 02:21 PM

Quote:

Originally Posted by T3MEDIA
Erwin how can I do this so it sends a template? I am trying to relase a add on to your hack but I need your help. What I want to do is put the email message in a predefined template called invite

they fill out the requested info but once its done it looks like this:
http://www.sprnch.com/forums/view.php?pg=invite

I removed all the "$" from all varables like vboptions[bbtitle] so users who are not logged on can get a idea of what this example is supposed to do.

So the name they enter i placed in the template and the template is sent.
the pics n what not I have done already. There is a new area called "optemailmessage" that I would like to also add.

attached is a fill out form I made please talk a look at the mild ajustments I made...

If you could help that would be really nice of you.

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>Optional<br>
                                                          Message:</b></td>
        <td class="alt1"><textarea name="optemailmessage" rows="5" cols="50"></textarea><br>
                                                          <textarea name="emailmessage" rows="10" cols="50" readonly>Hey!

Your friend $bbuserinfo[username], is in the $vboptions[bbtitle] network and would like you to join them! Join and you will immediately be connected to the people who have invited you, and others in their networks!

$vboptions[bbtitle] is an online service that lets you meet new people, share photos, browse profiles, and chat online!

We'll see you inside,
</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="$vboptions[bburl]/referrals.php" />
        <input type="hidden" name="refer" value="1" />
        <input type="hidden" name="do" value="dosendtofriend" />
        </td>
</tr>
</table>
                        <br>
                        <div align="center">
                                <p>or<br>
                                <a href="mailto:Enter%20Friend%27s%20Email?Subject=$bbuserinfo[username]%20has%20invited%20you%20to%20join%20$vboptions[bbtitle]!&amp;Body=Join%20me%20at%20$vboptions[bbtitle]!%20%0D%0DJust%20click%20here%20to%20join:%20$vboptions[bburl]/forums/register%2Ephp%3Freferrerid%3D$bbuserinfo[userid]">Click here</a> to automatically place this link in your email!
                        </div>
                </form>

$footer

</body>
</html>


quite sexy, the mod isn't a hard oen though, if i recall it's just a matter of changing $message to $template_name (assuming you've assigned the template to the variable properly). in the vbmail() tags :)

RapCapital 05-29-2005 04:10 PM

<font color="Green">* RapCapital installs</font>

I love the hack! Good work Erwin!

oceanart 05-30-2005 05:14 PM

This is exaclty what I was looking for - a big thanks ERWIN!

wolfgrrl 06-03-2005 09:45 PM

WIll referred people have to be approved by moderation if the board is set not to accept new applicants?

T3MEDIA 06-04-2005 12:41 AM

Quote:

Originally Posted by sabret00the
quite sexy, the mod isn't a hard oen though, if i recall it's just a matter of changing $message to $template_name (assuming you've assigned the template to the variable properly). in the vbmail() tags :)

Thank you... but I dont know how to do that. I only know the pritty stuff...

See I want it to work like this. You type... hey jen... come check this out... (you only have x amount of txt you can type)
then hit send.

She get that nice template... with your friends attached.

If you can set that up I know you would love it... I been to your site.

lem 06-16-2005 02:03 AM

I posted a dumb question, then I saw that your hack already covers everything. Thanks a lot!

Thanks,

Lem

mholtum 06-20-2005 08:27 AM

I love the mod and use it on 2 different boards. Any plans to port it over as a plugin for 3.5?

Caveman2k2 07-13-2005 05:37 AM

/me clicks install

Great hack! Installed without a hitch.

bigdog829 07-14-2005 07:31 PM

<font color="green">*bigdog829 installs</font>

Very easy & nice hack thanks

MediaHound 07-15-2005 03:56 AM

I would like to have this on a 3.5 beta 3 board.
Erwin, before I dive into the code, will it work on 3.5, and if not, do you have plans to modify it so that it will?
thank you

csidlernet 07-18-2005 01:47 AM

thanks a lot

o0Hubba0o 07-18-2005 02:10 AM

Quote:

Originally Posted by csidlernet
thanks a lot

I used the auto-installer and it wouldn't work in firefox, so I dl'ed the manual install and put the vbulletin_global.js in manually and works fine now.

Except it only shows up on the portal page, the main forums don't have "contact us" or "refer friends", not sure if it's the template I'm using or what. So if anyone knows where I could look to fix that it would be appreciated. Otherwise I love this one.

brainfreeze 07-25-2005 01:06 PM

**brainfreeze Installed!

Any possibility we could add a standard form field on the bottom of the forum page - similar to http://forums.ikonboard.com (must be logged in to see the "Invite a Friend" feature.

simon. 08-05-2005 05:00 PM

I really dont get this I have recently upgraded to V3.0.8 and I know get this error:-

ewadmin_simon, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

(EVERYONE GETS THIS ERROR!!!) HELP!

*Runs round in circles!

Erwin 08-06-2005 01:47 AM

Is your contact form/ email members permission in vB AdminCP Options enabled?

T3MEDIA 08-06-2005 04:48 AM

Quote:

Originally Posted by T3MEDIA
#159

Erwin maybe you missed my post.
Or saw it and rather not help? Please advise so I know not to bother you or whatever the case.

Thanks.

simon. 08-06-2005 01:10 PM

Quote:

Originally Posted by Erwin
Is your contact form/ email members permission in vB AdminCP Options enabled?

How would I know? Could you tell me how to find out...

o1dirtydog 08-16-2005 10:07 PM

great work... installed

ryuuchida 08-20-2005 08:17 AM

Thanks for the great work Erwin! (And to Safiel on another thread for the 3.5 version.)

Fallback 08-21-2005 01:21 PM

This is a great hack.

A great add-on would be to add 'x' reputation points to the member who successfully refers a friend that registers. This would add motivation for users to refer new members.

therczone 08-22-2005 04:30 AM

I think this is a great hack. I customized it to include an AIM form for users to AIM friends with the referral link AND e-mail them. If anyone is interested in the code, just PM me.

If someone is not logged in, it will show up as "Unregistered" and referrerid=0. And if they do not have to be logged in, any abuse of the system could go untraceable. If the user is forced to login, and then abuses the system by spamming people, it would at least (unless they edit it out, but not everyone is that smart) have the referrerid link so you could know who it was who abused it in the event that someone complained about it and could send you the e-mail they received.

I spent a good amount of time pulling my hair out searching through calendar.php, private.php, etc. and here on vBulletin.org for a solution, and finally found it. Below, in green, is the code needed to be added to require users to login to see the refer page.

I don't take any credit for this, other than finding and informing everyone of the code. Here is the author's thread.

https://vborg.vbsupport.ru/showthread.php?t=59859

In sendmessage.php

// Erwin's Refer Hack
if (!$_REQUEST['refer'])
{
if (!($forumperms & CANVIEW) OR !($forumperms & CANEMAIL) OR (($threadinfo['postuserid'] != $bbuserinfo['userid']) AND !($forumperms & CANVIEWOTHERS)))
{
print_no_permission();
}
}
if ($bbuserinfo['userid'] == 0)
{
print_no_permission();
}

// Erwin's Refer Hack

I know print_no_permission(); is already in there, but I couldn't get it to work by inserting it with OR or AND into:

if (!($forumperms & CANVIEW) OR !($forumperms & CANEMAIL) OR (($threadinfo['postuserid'] != $bbuserinfo['userid']) AND !($forumperms & CANVIEWOTHERS)))

If anyone has a cleaner or better way, I'm all ears.

faast 08-23-2005 02:28 AM

Quote:

Originally Posted by Oblivion Knight
Since you have 2 uncached templates, I'm guessing the code has changed slightly between the version of vB3 you are using and RC3. In RC3 I had 1 uncached template and I did this:

In sendmessage.php
Find:
Code:

$globaltemplates = array(
        'mailform',

Add below:
Code:

        'refertofriend',
Awesome mod Erwin, thanks for sharing.!

great work.

also, for those who are having trouble installing with the permission error: make sure you are REPLACING and not adding in the code!!! thats what happened to me.

subnet_rx 08-25-2005 11:47 PM

Quote:

Originally Posted by faast
great work.

also, for those who are having trouble installing with the permission error: make sure you are REPLACING and not adding in the code!!! thats what happened to me.

I don't see it noted, but if someone does refer a friend, will it send their friend a referral link using the member's referral ID?

faast 09-09-2005 02:42 PM

Quote:

Originally Posted by subnet_rx
I don't see it noted, but if someone does refer a friend, will it send their friend a referral link using the member's referral ID?

Yes. It will send them a referral ID

Inferno Dragon 09-25-2005 10:45 AM

going to install this hack tonight ;)

adill420 09-30-2005 10:50 AM

installed..first the email was going out but nothing in email..then did a fresh start on fresh sendmessage.php now gets a permission problem..

NxTek 10-20-2005 05:59 PM

Will this work for 3.5?

auz1111 10-23-2005 02:33 PM

Quote:

Originally Posted by therczone
I think this is a great hack. I customized it to include an AIM form for users to AIM friends with the referral link AND e-mail them. If anyone is interested in the code, just PM me.

If someone is not logged in, it will show up as "Unregistered" and referrerid=0. And if they do not have to be logged in, any abuse of the system could go untraceable. If the user is forced to login, and then abuses the system by spamming people, it would at least (unless they edit it out, but not everyone is that smart) have the referrerid link so you could know who it was who abused it in the event that someone complained about it and could send you the e-mail they received.

I spent a good amount of time pulling my hair out searching through calendar.php, private.php, etc. and here on vBulletin.org for a solution, and finally found it. Below, in green, is the code needed to be added to require users to login to see the refer page.

I don't take any credit for this, other than finding and informing everyone of the code. Here is the author's thread.

https://vborg.vbsupport.ru/showthread.php?t=59859

In sendmessage.php

// Erwin's Refer Hack
if (!$_REQUEST['refer'])
{
if (!($forumperms & CANVIEW) OR !($forumperms & CANEMAIL) OR (($threadinfo['postuserid'] != $bbuserinfo['userid']) AND !($forumperms & CANVIEWOTHERS)))
{
print_no_permission();
}
}
if ($bbuserinfo['userid'] == 0)
{
print_no_permission();
}

// Erwin's Refer Hack

I know print_no_permission(); is already in there, but I couldn't get it to work by inserting it with OR or AND into:

if (!($forumperms & CANVIEW) OR !($forumperms & CANEMAIL) OR (($threadinfo['postuserid'] != $bbuserinfo['userid']) AND !($forumperms & CANVIEWOTHERS)))

If anyone has a cleaner or better way, I'm all ears.

why not just wrap this around the link:

<if condition="$bbuserinfo['userid']"> Refer Link Here </if>

docvader 11-16-2005 04:35 AM

Quote:

Originally Posted by auz1111
why not just wrap this around the link:

<if condition="$bbuserinfo['userid']"> Refer Link Here </if>

Well, I feel really stupid asking this, but, I'm getting the white screen of "no template" when hitting either "Refer friends" or "Contact us". My templates are in all of my styles, and I've done the php edit without problem. This is a simple hack to install, which is what is making me pull what little hair I have out of my head.

Any suggestions? I know it has to be something simple that I missed.

amcd 11-21-2005 03:03 AM

Thx Erwin, almost something which I'm lookin for. Cant we modify this hack a bit such that this can be used as "invite friends" on forums where registration is closed. I want something like that on my site, where I have closed registrations, and want to give some invites to "certain" users based on "certain" conditions. I'm not into php and html... so can erwin or someone help me on this pls.

Thx
p.s I know of a site which used the same mod and implemented the thing I wanted :)

cbr929rrerion 11-22-2005 03:44 AM

I would be thrilled if some one can show me how to hide everything from subject down to send.. just keep the functionality, just hide it from users, i tried input="hidden" and got a message required info not filled out..

can anyone help?

ThugTheLeet 01-14-2006 11:58 PM

Quickly installed nice works perfect on v3.0.7

:)

murrtex 01-28-2006 11:00 PM

thanks Erwin
how can I block to unregistered users sending refer?

I should block that group because.they are using "refer to friend mail" like their mail account,they can send alots of mail to everywhere..

please inform.
regards.

mountainlife 03-15-2006 03:31 AM

will this work with the latest vb version? if not can someone make it work?


All times are GMT. The time now is 04:24 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.01335 seconds
  • Memory Usage 1,845KB
  • 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
  • (3)bbcode_code_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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