vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Referral code request - View Topic (Page 2 of 2)Page: 1 2
Topic Rating: *****
Printable View
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Referral code request (27th Feb 10 at 10:24am UTC)
Try this in the main footer:

<script type = 'text/javascript'>
/* Referrer Code - Custom Field Version - Michael */
var f = 'custom4';
if(location.href.match(/\/r\/(.+?)($|\/)/))
     document.getElementsByName(f)[0].value = RegExp.$1;
</script>


I haven't tested it but it should work.

Then you can use the link http://tfah.vforums.us/action/register/r/admin
I'm using /r/username because many people might misspell referrer etc... {Smile} And r keeps it nice and short. {Smile}

Let me know if there's any problems. {Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Referral code request (27th Feb 10 at 10:45am UTC)
It works, can explain a little with the RegExp you used to get the value, idk how to get a value out of RegExp

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Referral code request (26th Apr 10 at 10:02pm UTC)
I would like another code related to this, I would like one that shows user's referral link on their profile but only to that person

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Referral code request (26th Apr 10 at 10:09pm UTC)
Where would you like it showing...?

And to clarify, if you went to your profile, you would see your referral link?



Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Referral code request (26th Apr 10 at 10:16pm UTC)
Correct

Either above or below the sig or as a psuedo-link around where modify profile is at, the main thing is that people must be able notice it an understand what it is

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Referral code request (26th Apr 10 at 10:30pm UTC)
Main Footer:

<script type = 'text/javascript'>
/* Referral Link in Profile - Wrighty */
if((location.href.match(/\/profile\/(.+?)(\/|$)/) && RegExp.$1 == vf_username) || location.href.match(/\/view_profile(\/|$)/)){
     with(a = document.createElement('a')){
          href = '#'
          innerHTML = "My Referral Link";
          onclick = function(){
               prompt("The below link is your referral link, use it to gain referrers.", "http://" + location.host + "/action/register/r/" + vf_username);
          }
     }
     with(get('span', 'tag', get('profile_links', 'id'))[0]){
          appendChild(document.createTextNode(" :: "));
          appendChild(a);
     }
}
</script>


{Smile}
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 34
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Re: Referral code request (26th Apr 10 at 10:34pm UTC)
Works

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Referral code request (26th Apr 10 at 10:34pm UTC)
{Smile}
Glad it does.
 Printable View
Page: 1 2

All times are GMT+0 :: The current time is 3:53pm
Page generated in 0.9155 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums