Referral System

Started by SMFHacks.com Team, March 03, 2008, 01:02:01 PM

Previous topic - Next topic

JBlaze

@Eclipse16v, I will fix that in the next update. It is a problem with the AJAX stats part.

@smp420, I'll be fixing that in the next update as well

@Amendoim, I have shown you how to fix it. All that is needed is for people to visit http://www.example.com/forum/index.php?action=register;referredby=id and it will work.
Jason Clemons
Former Team Member 2009 - 2012

Eclipse16V

I worked with:
SMF 2 in German

Shop:
SID Giessen

smp420

Quote from: JBlaze on January 01, 2010, 02:13:46 PM
@Eclipse16v, I will fix that in the next update. It is a problem with the AJAX stats part.

@smp420, I'll be fixing that in the next update as well

@Amendoim, I have shown you how to fix it. All that is needed is for people to visit http://www.example.com/forum/index.php?action=register;referredby=id and it will work.
Thanks. Any idea on how long it will be for the update. I dont know if I should use it as is for now or just wait.
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

JBlaze

Shouldn't be long for the update. I am fairly busy so it won't be immediate.
Jason Clemons
Former Team Member 2009 - 2012

smp420

Ok its not a big problem so I will just use it for now until the update is out.
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

ŦώεαЖзяŁ

How to add action=register to the referral link:

open your profile template (Profile.template.php for default profiles or UltimateProfile.template.php for ultimate profile)

Search for referredby=

You'll find something like this:

Quote, $scripturl, '?referredby='

Change it to
Quote, $scripturl, '?action=register;referredby='

You're done, although personally I think that referring people to the front page rather than the register page is much better as often the person will not know what the forum is about and the front page will give them a better idea than sending them straight to the register page. Besides, it saves a cookie so should the person decide to register, the referral will still be there.

Fixing the select button:

The select button is actually unnecessary, by adding

Quoteonfocus="this.select()"

to the referral id input so that it looks like something like this:

Quote<input onfocus="this.select()" type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

whenever the person clicks on the link, it will automatically select it for them. I'm sure it's even possible for it to automatically copy it to the clipboard too, just google somthing like javascript copy to clipboard and you'll find a way.

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

ŦώεαЖзяŁ

Lol, I saw people's questions and started answering them and forgot to ask the question I came to ask...

So, i got a portal system for my site, (portamx) and I would like to show only the referral link for the person in php block... Any chance you can help me figure how to do it? I tried copying just the section from the profile template that shows it to the block, but it comes out blank... I'm relatively noob in php so i dunno what else to do XD. Help would be awesomely appreciated as I intend to use the same code to add the person's referral link to by website's browser toolbar :)

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

Amendoim

Quote from: JBlaze on January 01, 2010, 02:13:46 PM
@Amendoim, I have shown you how to fix it. All that is needed is for people to visit http://www.example.com/forum/index.php?action=register;referredby=id and it will work.

Worked the same friend: D
Now, if own admistrador logged in as admin, select the link and try to enter the area will stop the records from the admin panel..  :P

Cumps

Quote from: ŦώεαЖзяŁ on January 07, 2010, 04:07:41 PM

Fixing the select button:

The select button is actually unnecessary, by adding

Quoteonfocus="this.select()"

to the referral id input so that it looks like something like this:

Quote<input onfocus="this.select()" type="text" id="referral_link" value="', $scripturl, '?referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />

whenever the person clicks on the link, it will automatically select it for them. I'm sure it's even possible for it to automatically copy it to the clipboard too, just google somthing like javascript copy to clipboard and you'll find a way.

It did not work friend, continues to select the area below "language" .. not even being added selects the link, something in the code this bad.  ???
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

ŦώεαЖзяŁ

Quote from: Amendoim on January 07, 2010, 05:03:44 PM
It did not work friend, continues to select the area below "language" .. not even being added selects the link, something in the code this bad.  ???

If it's not working you're doing something wrong, or you have a stone age browser, or javascript is disabled >.>

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

Amendoim

No, I'm using IE8, and I have the code like this:

<input onfocus = "this.select ()" type = "text" id = "referral_link" value = " ', $ scripturl,'? action = register; referredby = ', $ context [' member '] [ 'id'], ' "readonly =" true "style =" width: 250px; "/> [/ code]

It seems that everything is in order, now the Javascript as an asset in a forum? (computer installed recent version)

Thanks
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

smp420

The code works great and looks better than having a button, Amendoim you are clearly doing something wrong here is what I am using // Remove the # on the next line to make the link appear for the profile's owner ONLY!
# if ($context['user']['id'] == $context['member']['id'])
echo '
<dt>', $txt['referrals_link'], '</dt>
<dd>

<input onfocus="this.select()" type="text" id="referral_link" value="', $scripturl, '?action=register;referredby=', $context['member']['id'], '" readonly="true" style="width:250px;" />
</dd>';
"Things turn out best for those who make the best of the way things turn out." -Jack Buck

Amendoim

already noticed in your code .. he ate this well built, but will take the check mark from the link .. doing so not having problems with it :P
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

JBlaze

Updated v2.2.7.2

2.2.7.2 - 7th January 2010
! Fixed select box
! Fixed referral link to point to register page
Jason Clemons
Former Team Member 2009 - 2012

ŦώεαЖзяŁ

@Amendoim, if you're still having trouble send me a PM, I speak Portuguese too :), might be easier for you to understand that way :)

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

Spoogs

thanks for the updates

Not so sure about linking to the registration page tho, maybe this could be optional. I prefer linking to the home page.

Karlsm

Hi all, I really like to install this mod but i get

./Themes/default/Register.template.php Test failed

upon installing.

Any ideas?

JBlaze

@ Karlsm, most likely a conflict with another mod prevents the installer from finding the proper lines of code.

See: Manual Installation of Mods
Jason Clemons
Former Team Member 2009 - 2012

Karlsm

Cheers

These are the installed mods i have on my forum. Without uninstalling the lot and trying your mod, do you think any of these off the top of your head could be conflicting with yours.  Did any of your users of this mod have a conflict with any of the below?

If not I will look at doing a manual edit.

I'm using 1.1.11 btw.

Mod Name Version 
1. SMF 1.0.15 / 1.1.7 Update 1.0 [ Uninstall ]
2. Signature Dropdown Choices 1.0 [ Uninstall ]
3. BK-SMF Sub-Board 1.5 [ Uninstall ]
4. Thank-O-Matic 1.2.5 [ Uninstall ]
5. Enhanced PM Warning Message 1.0 [ Uninstall ]
6. Prettier_Quotes 1.12 [ Uninstall ]
7. Quote Clear Line 1.0 [ Uninstall ]
8. BK-SMF News Box Mod 1.5 [ Uninstall ]
9. Date_Registerd on post 1.0 [ Uninstall ]
10. Reason For Editing Mod 1.14 [ Uninstall ]
11. Enhanced Profile Header 1.0 [ Uninstall ]
12. SMF 1.0.16 / 1.1.8 Update 1.0 [ Uninstall ]
13. Message for your guests 0.1 [ Uninstall ]
14. Auto Email Inactive Users 1.7 [ Uninstall ]
15. LocationOnReg 1.0 [ Uninstall ]
16. EmailValidator 1.0 [ Uninstall ]
17. Posters In Recent Posts 1.1 [ Uninstall ]
18. LocationOnPost 1.0 [ Uninstall ]
19. Go Up & Go Down 1.1 [ Uninstall ]
20. BK-SMF News Stay Mod 1.5 [ Uninstall ]
21. MemberNumber 1.1 [ Uninstall ]
22. Hack's Park Shoutbox 2.0.1 [ Uninstall ]
23. Advanced image uploader 1.0.9 [ Uninstall ]
24. SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update 1.0 [ Uninstall ]
25. Limit A Guests Daily PageViews Mod 2.0 [ Uninstall ]
26. Twitter Profile Field 2.2 [ Uninstall ]
27. InfoBox 0.1 [ Uninstall ]
28. AllCaps Notifier 1.0 [ Uninstall ]
29. SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update 1.1 [ Uninstall ]
30. Twitter mod 1.5 [ Uninstall ]
31. Aeva ~ Auto-Embed Video & Audio 7.0 [ Uninstall ]
32. Bakers Dozen Pages 1.1 [ Uninstall ]
33. SMF 1.0.19 / 1.1.11 Update 1.0 [ Uninstall ]

Thanks,
Karl.


Amendoim

Quote from: Karlsm on January 16, 2010, 03:45:03 PM
Cheers

These are the installed mods i have on my forum. Without uninstalling the lot and trying your mod, do you think any of these off the top of your head could be conflicting with yours.  Did any of your users of this mod have a conflict with any of the below?

If not I will look at doing a manual edit.

I'm using 1.1.11 btw.

Mod Name Version 
1. SMF 1.0.15 / 1.1.7 Update 1.0 [ Uninstall ]
2. Signature Dropdown Choices 1.0 [ Uninstall ]
3. BK-SMF Sub-Board 1.5 [ Uninstall ]
4. Thank-O-Matic 1.2.5 [ Uninstall ]
5. Enhanced PM Warning Message 1.0 [ Uninstall ]
6. Prettier_Quotes 1.12 [ Uninstall ]
7. Quote Clear Line 1.0 [ Uninstall ]
8. BK-SMF News Box Mod 1.5 [ Uninstall ]
9. Date_Registerd on post 1.0 [ Uninstall ]
10. Reason For Editing Mod 1.14 [ Uninstall ]
11. Enhanced Profile Header 1.0 [ Uninstall ]
12. SMF 1.0.16 / 1.1.8 Update 1.0 [ Uninstall ]
13. Message for your guests 0.1 [ Uninstall ]
14. Auto Email Inactive Users 1.7 [ Uninstall ]
15. LocationOnReg 1.0 [ Uninstall ]
16. EmailValidator 1.0 [ Uninstall ]
17. Posters In Recent Posts 1.1 [ Uninstall ]
18. LocationOnPost 1.0 [ Uninstall ]
19. Go Up & Go Down 1.1 [ Uninstall ]
20. BK-SMF News Stay Mod 1.5 [ Uninstall ]
21. MemberNumber 1.1 [ Uninstall ]
22. Hack's Park Shoutbox 2.0.1 [ Uninstall ]
23. Advanced image uploader 1.0.9 [ Uninstall ]
24. SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update 1.0 [ Uninstall ]
25. Limit A Guests Daily PageViews Mod 2.0 [ Uninstall ]
26. Twitter Profile Field 2.2 [ Uninstall ]
27. InfoBox 0.1 [ Uninstall ]
28. AllCaps Notifier 1.0 [ Uninstall ]
29. SMF 1.0.18 / 1.1.10 / 2.0 RC1-2 Update 1.1 [ Uninstall ]
30. Twitter mod 1.5 [ Uninstall ]
31. Aeva ~ Auto-Embed Video & Audio 7.0 [ Uninstall ]
32. Bakers Dozen Pages 1.1 [ Uninstall ]
33. SMF 1.0.19 / 1.1.11 Update 1.0 [ Uninstall ]

Thanks,
Karl.

:o :o
What? Full MODS :P
Versão 2.0 RC2 Portuguese_Pt

Simple Portal 2.3 Portuguese_Pt

Em crescimento na programação :)

http://www.gamextuga.com

JBlaze

It would be easier to just do the manual edit rather than going through each mod to see which would effect the register template.
Jason Clemons
Former Team Member 2009 - 2012

Advertisement: