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)

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 08:16 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.01274 seconds
  • Memory Usage 1,740KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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