PDA

View Full Version : Registration Re-Direct


Brian
07-21-2001, 02:28 AM
In v2 I cant seem to change the url that people are redirected to after registering. Can some one point me to the line(s) that need changed.

To explain further I want to send them to a differnt url then the default one they are sent to after they register.

Thanks :)

-Brian

jvv
07-22-2001, 09:25 AM
I'm looking for the same thing. Also when members login. I want it to redirect them to the page they came from, not just the forum.

Ruth
07-23-2001, 12:47 AM
i'm looking for the same thing when users enter their username/pass they go to another URL not the index.php

thanks

Brian
07-26-2001, 04:00 PM
I am willing to pay some one a token fee via paypal to do this. It is just a matter of editing a few lines in member.php however I dont have the time to do it on v2, but did on v1.

I dont need anything pretty in the cp, just the lines and what to change code wize.

-Brian

BradC
07-26-2001, 04:13 PM
Where are you wanting this page to link to.. where they came from.. the forums index page... ?

Just curious.. cause I will try to see if I can find the code to change for ya... don't need paid or anything.. just curious to see this myself :)

Brian
07-26-2001, 04:33 PM
To an external url.

Here is what I did in v1


if ($coppauser==1) {
$action="coppaform";
} else {
if ($verifyemail==1) {

eval("echo standardredirect(\$bbtitle,\"".gettemplate("error_registeremail")."\",\"http://www.linkhere.com/\");");

} else {
if ($moderatenewmembers==1) {
eval("echo standarderror(\$bbtitle,\"".gettemplate("error_moderateuser")."\");");
} else {
eval("echo standardredirect(\$bbtitle,\"".gettemplate("redirect_registerthanks")."\",\"index.php\");");
}
}
}
}

And just changed the redirect message.

Thanks for looking into this :)!!

BradC
07-26-2001, 05:46 PM
At a quick glance at the register.php file.. here is what I see.. Well without posting the whole user if statement.. I will just add the part around where *I think* it needs changed.


if ($moderatenewmembers) {
eval("standarderror(\"".gettemplate("error_moderateuser")."\");");
} else {
$url = str_replace("\"", "", $url);
if (!$url) {
$url = "index.php?s=$session[sessionhash]";
}
eval("standardredirect(\"".gettemplate("redirect_registerthanks")."\",\"".iif(strpos($url,"register")>0,"index.php?s=$session[sessionhash]",$url)."\");");
}


see where it says : $url = "index.php?s=$session[sessionhash]";

I think in that if statement you can change that $url value to whatever you want.

$url = "http://www.somethingsomewhere.com";

or change the other values that have index.php on that page.

I could be wrong.. I will take a look at this here in a bit. Tell me what you think on this.

Brian
07-27-2001, 02:01 AM
I was just wondering if anyone had a chance to check this out.

-Brian

Brian
07-27-2001, 02:06 AM
By the way for the person whom wanted it to redirect them to the page they came from they can simple use for a link javascript:history.go(-2) (replacing 2 with the number of pages it should take them back.

This is an easy way to do it but not the best way..

-Brian

BradC
07-27-2001, 12:44 PM
I have not had a chance to try this out myself, I might this weekend.. but did you try out what I posted.. changing that part?

Brian
07-27-2001, 01:52 PM
I believe from before you have to modify a few other things although I am not positive. I will have to try it later today.

Brian
07-31-2001, 12:40 AM
Has anyone had a chance to check and or try this out..

-Brian

auto
07-31-2001, 03:26 AM
no offense, but why havent you tried it out yourself?

Brad showed where he *thinks* it is :)

BradC
07-31-2001, 04:25 AM
I work 6am till 8pm tommorow.. but when I get off work I will play with it.. I got caught up tonight in a few things.. way caught up :)