![]() |
[RESOLVED]Fetch email just like referral id from url in register form??
Hello
Can anyone tell me how can i get email address field on register form, from url? Just like referral link i.e. http://www.myforum.com/register.php?referrerid=10 I will be generating links as http://www.myforum.com/register.php?referrerid=10&email=username@email.com What i wanna do is, just like referralid is taken from url and set in referral field of register form, i wanna take email from url and set it on the filed in register form. Now i have already done customization till register link with referral id and email generation. All i wanna know is, how do i catch email id from url... I mean which files i'm suppose to edit? And yeah there is "Agree to Forum Rules" thing before registration form actually appears (And i know vbulletin uses cookies to get referral id from actual link or something like that). so please tell me how do i add email to this system? Detailed instructions are strongly appreciated and helper will get full credits. :) |
You would have to use a $_GET
Code:
$refferalemail = $vbulletin->input->clean_gpc('g', 'email', TYPE_STR); Make a plugin in the register hooks and put the above code in it. Make sure to modify it to your needs. And in the registration templates (pretty sure its register_rules) find the email input fields and inside the email input fields put value="$refferalemail" If you want the email link to carry over from the Accecpt Forum Rules page to the registration rules page you will have to modify the "Form Action" in the template register. find (<form action=") and at the end of the link put (&email=$refferalemail) |
Thank You Brandon
I will PM you 1ce i'm done with coding... you will get full credits in code. :) |
Nop its not working...
I tried adding above code for following template hooks : register_start register_signup register_form_start register_requestemail Also my register template looks like this now : Code:
$stylevar[htmldoctype] This is the url i tried : Code:
http://www.mywebsite.org/forums/register.php?referrerid=10&email=username@gmail.com |
Maybe the email variable is conflicting with another variable that vBulletin uses. Try adding this plugin in the register_start hook.
Code:
$refferalemail = $vbulletin->input->clean_gpc('g', 'refferalemail', TYPE_STR); HTML Code:
HTML Code:
action="register.php?do=register&refferalemail=$refferalemail" |
Thanks a million brandon!!! that worked!! :)
|
Sorry to dig this again but how it can be done in vb4???
The code provided by Brandon (this one) works perfect on vb 3 please somebody tell me how it can be done in vb4?? |
All times are GMT. The time now is 02:27 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|