Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Who referred? (Read 6583 times)
westwegoman
New Member
*
Offline


I Love YaBB 2!

Posts: 46
Location: Westwego, La.
Joined: Feb 10th, 2012
Gender: Male
Who referred?
Aug 7th, 2012 at 9:02am
Print Post  
Would it be difficult to add a "who referred you?" section to the registration page of 2.5. Ofcourse, this would not require imput by the registrant upon registration.

In other words,
If referred, friend that referred you (username)
  


If they're big enough to hook, they're big enough to cook!!!!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Who referred?
Reply #1 - Aug 8th, 2012 at 12:04am
Print Post  
Hi Merv,

Y'know, I've had a half finished referrals mod on a test board for a good couple of years now, but got carried away with other mods and never got around to completing it.

Anyhow, where do you want to display the referrers? I won't be working on a complete mod (at least not just yet), but if you're happy with something quite simple, like just adding the referrers name to the newly referred members profile page, then I should be able to whip a bit of code up for you...

  
Back to top
 
IP Logged
 
westwegoman
New Member
*
Offline


I Love YaBB 2!

Posts: 46
Location: Westwego, La.
Joined: Feb 10th, 2012
Gender: Male
Re: Who referred?
Reply #2 - Aug 8th, 2012 at 12:53am
Print Post  
I was actually thnking of just a simple thing where it would add the referrers name to the email that sent to the admin when someone registers.

A simple add to the profile would be good also. Whatever is easy.

Don't worry about rushing out to do it. I'm a patient person. It was something I ran across in another board that gave me the idea. Cheesy
  


If they're big enough to hook, they're big enough to cook!!!!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Who referred?
Reply #3 - Aug 8th, 2012 at 2:09am
Print Post  
Okay, I've added it to the admin notification email too.

It was easier to put it into a mod file rather than post the code up, so it's attached to this post. Note that I'm on my Mac, so I haven't tested it through BoardMod - you might have to install it manually. Also note that it should accept both usernames and displayed names, and I haven't tested it thoroughly.
« Last Edit: Aug 9th, 2012 at 2:32am by Derek Barnstorm »  

merv_referrals_02.zip ( 2 KB | Downloads )
Back to top
 
IP Logged
 
westwegoman
New Member
*
Offline


I Love YaBB 2!

Posts: 46
Location: Westwego, La.
Joined: Feb 10th, 2012
Gender: Male
Re: Who referred?
Reply #4 - Aug 8th, 2012 at 2:23am
Print Post  
Great! Thanks.

I'll test it out tomorrow evening when I'm on my home PC and let you know how it goes.
  


If they're big enough to hook, they're big enough to cook!!!!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Who referred?
Reply #5 - Aug 8th, 2012 at 2:27am
Print Post  
Okey dokey. No problem. Smiley
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Who referred?
Reply #6 - Aug 8th, 2012 at 3:09am
Print Post  
I've attached a few screenshots in case anyone else was interested in what it does...
  

referrer-register.png ( 13 KB | Downloads )
referrer-register.png
referrer-profile.png ( 20 KB | Downloads )
referrer-profile.png
referrer-reg-email.png ( 11 KB | Downloads )
referrer-reg-email.png
Back to top
 
IP Logged
 
Bill Myers
New Member
*
Offline


Thank goodness for BoardMod!

Posts: 44
Location: Los Angeles
Joined: May 6th, 2012
Gender: Male
Re: Who referred?
Reply #7 - Aug 8th, 2012 at 3:57am
Print Post  
Derek Barnstorm wrote on Aug 8th, 2012 at 3:09am:
I've attached a few screenshots in case anyone else was interested in what it does...

I'm still amazed at how you're able to do these things. Unbelievable! Cool

I remember, too, how great you were in walking me through the installation of your Anti-Spam Question mod, which of course stops spam bots cold!

I was so nervous about taking the plunge with BoardMod, and your encouragement helped me get past those 1st-time jitters.

Smiley


  

Morning, noon, or night, have a great one!
Back to top
WWW  
IP Logged
 
depablo
New Member
*
Offline



Posts: 30
Location: Scotland
Joined: May 2nd, 2006
Gender: Male
Re: Who referred?
Reply #8 - Aug 8th, 2012 at 3:57pm
Print Post  
Bill Myers wrote on Aug 8th, 2012 at 3:57am:
I'm still amazed at how you're able to do these things.

Im amazed at the speed this was created, the question was only asked yesterday and now a working version in production  Smiley
  

depablo
Back to top
 
IP Logged
 
Bill Myers
New Member
*
Offline


Thank goodness for BoardMod!

Posts: 44
Location: Los Angeles
Joined: May 6th, 2012
Gender: Male
Re: Who referred?
Reply #9 - Aug 8th, 2012 at 4:16pm
Print Post  
depablo wrote on Aug 8th, 2012 at 3:57pm:
I'm amazed at the speed this was created, the question was only asked yesterday and now a working version in production. Smiley

Very impressive!  Smiley

Derek's work ethic is very inspiring. Now I'm having some guilt about some work that I need to get to; work I've been putting off.

But first I need a cup of coffee!  Smiley

« Last Edit: Aug 8th, 2012 at 7:13pm by Bill Myers »  

Morning, noon, or night, have a great one!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Who referred?
Reply #10 - Aug 8th, 2012 at 5:23pm
Print Post  
It's nice for the compliments, but it really is very simple. Maybe it seemed fast, but I'd actually got it working before I replied, so it did take a few hours (on and off) after testing a little. If I'd have made a full mod with more features, then it would more than likely have taken me over a week.

By the way...

Bill Myers wrote on Aug 8th, 2012 at 4:16pm:
John's work ethic is very inspiring

Who's John? He sounds like a great guy. Smiley
  
Back to top
 
IP Logged
 
Bill Myers
New Member
*
Offline


Thank goodness for BoardMod!

Posts: 44
Location: Los Angeles
Joined: May 6th, 2012
Gender: Male
Re: Who referred?
Reply #11 - Aug 8th, 2012 at 7:25pm
Print Post  
Derek Barnstorm wrote on Aug 8th, 2012 at 5:23pm:
It's nice for the compliments, but it really is very simple.

That's easy for you to say.  Wink

Seriously, regular people like me are always impressed by people like you who have your kind of mad skills. I think it would be pretty cool to be able to do things that the majority of people simply can't do.

*********************************************

Derek Barnstorm wrote on Aug 8th, 2012 at 5:23pm:
By the way...

Bill Myers wrote on Aug 8th, 2012 at 4:16pm:
John's work ethic is very inspiring

Who's John? He sounds like a great guy. Smiley

My mistake has been corrected! Roll Eyes

Oh my gosh! When am I ever going to stop making mistakes?! Sorry about that. I guess the speed at which you came up with that mod blinded me, and I goofed up again 'cause I wasn't being careful with my message.

See what I mean about me needing that cup of coffee?  Smiley

  

Morning, noon, or night, have a great one!
Back to top
WWW  
IP Logged
 
westwegoman
New Member
*
Offline


I Love YaBB 2!

Posts: 46
Location: Westwego, La.
Joined: Feb 10th, 2012
Gender: Male
Re: Who referred?
Reply #12 - Aug 9th, 2012 at 1:53am
Print Post  
Just installed via boardmod with no problems, and tested. As usual, it works.  Smiley

One question.

Can it be made to not be case sensitive? (referrers name)
  


If they're big enough to hook, they're big enough to cook!!!!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Who referred?
Reply #13 - Aug 9th, 2012 at 2:39am
Print Post  
Great!

westwegoman wrote on Aug 9th, 2012 at 1:53am:
One question.

Can it be made to not be case sensitive? (referrers name)

I've attached a new mod file to post #3. If you don't want to install it again, then in Register.pl find:

Code
Select All
    if ($member{'referrer'}) {
        &ManageMemberinfo("load");
        while (($membername, $value) = each(%memberinf)) {
            ($displayed_name, undef, undef, undef, undef) = split(/\|/, $value);
            if ($member{'referrer'} eq $displayed_name) { $member{'referrer'} = $membername; }
            if ($member{'referrer'} eq $membername) { $refname = $membername; }
        }
        undef %memberinf;
        if ($member{'referrer'} ne $refname) { &fatal_error("", "$register_txt{'referrer_not_found'}"); }
    } 


And replace with:

Code
Select All
    if ($member{'referrer'}) {
        &ManageMemberinfo("load");
        while (($membername, $value) = each(%memberinf)) {
            ($displayed_name, undef, undef, undef, undef) = split(/\|/, $value);
            if (lc $member{'referrer'} eq lc $displayed_name) { $member{'referrer'} = $membername; }
            if (lc $member{'referrer'} eq lc $membername) { $refname = $membername; }
        }
        undef %memberinf;
        if (lc $member{'referrer'} ne lc $refname) { &fatal_error("", "$register_txt{'referrer_not_found'}"); }
        else { $member{'referrer'} = $refname; }
    } 


I've only tested quickly...

Bill Myers wrote on Aug 8th, 2012 at 7:25pm:
Oh my gosh! When am I ever going to stop making mistakes?! Sorry about that. I guess the speed at which you came up with that mod blinded me, and I goofed up again 'cause I wasn't being careful with my message.

He he! No worries - I've been called far worse things than that in my time. Smiley
  
Back to top
 
IP Logged
 
Derek Barnstorm
God Member
*****
Offline



Posts: 1146
Location: Warwickshire
Joined: Mar 23rd, 2008
Gender: Male
Re: Who referred?
Reply #14 - Aug 9th, 2012 at 2:45am
Print Post  
westwegoman wrote on Aug 9th, 2012 at 1:53am:
Just installed via boardmod with no problems, and tested.

Ah, just seen this. Thanks for letting me know - years of practice must have paid off. Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint