bira
Tue 20th Feb '01, 8:13pm
Hi,
1) I use the vB user db for login on another section of the website (same username/passwords).
In vB 1.1.x, I could use the login form bit anywhere else on the site, and upon clicking "submit" the user (if his details are correct) was redirected back to the page where he logged it.
In vB2, however, the user is redirected back to the BB's front page.
Looking at the code and playing around with it, I managed to fix this (bring it back to how it was in 1.1.x) by changing line 57 of member.php from:
if ($url!="" and $url!="index.php" and $url!=$HTTP_REFERER)
to:
if ($url!="" and $url!="index.php")
I am not sure why removing the part of "and $url!=$HTTP_REFERER" did the trick, but I thought maybe you should know about it.
2) In the process, I discovered that when logging in, it says "Thank you for logging in, Unregistered". A look at the template "redirect_login" discovered what I think is a mistake on your part: the default template has:
Thank you for logging in, $bbuserinfo[username].
The fix is changing it to:
Thank you for logging in, $username.
3. And, lastly, there is no redirection for logging out. Meaning, you are not returned to the page where you were but instead taken to a vBulletin Message page telling you that your cookies have been cleared, click here to go back to the BB front page.
That is wrong, in my opinion. The log out, just like the log in, should return you to where you were when you logged out. (there are log out links all over the place. You may be in the process of replying to a thread when you discover your husband is logged in, for example).
So, I replaced line 25 on member.php - which is originally: eval("standarderror(\"".gettemplate("error_cookieclear")."\");"); - with:
if ($url!="" and $url!="index.php") {
eval("standardredirect(\"".gettemplate("error_cookieclear")."\",\"$url\");");
} else {
eval("standardredirect(\"".gettemplate("error_cookieclear")."\",\"index.php?s=\");");
}
and I edited template "error_cookieclear" to only say "you are now logged out".
Anyways, I am telling you all that because I think this should be part of the official vB2.
Just my 0.02
Thanks,
Bira
1) I use the vB user db for login on another section of the website (same username/passwords).
In vB 1.1.x, I could use the login form bit anywhere else on the site, and upon clicking "submit" the user (if his details are correct) was redirected back to the page where he logged it.
In vB2, however, the user is redirected back to the BB's front page.
Looking at the code and playing around with it, I managed to fix this (bring it back to how it was in 1.1.x) by changing line 57 of member.php from:
if ($url!="" and $url!="index.php" and $url!=$HTTP_REFERER)
to:
if ($url!="" and $url!="index.php")
I am not sure why removing the part of "and $url!=$HTTP_REFERER" did the trick, but I thought maybe you should know about it.
2) In the process, I discovered that when logging in, it says "Thank you for logging in, Unregistered". A look at the template "redirect_login" discovered what I think is a mistake on your part: the default template has:
Thank you for logging in, $bbuserinfo[username].
The fix is changing it to:
Thank you for logging in, $username.
3. And, lastly, there is no redirection for logging out. Meaning, you are not returned to the page where you were but instead taken to a vBulletin Message page telling you that your cookies have been cleared, click here to go back to the BB front page.
That is wrong, in my opinion. The log out, just like the log in, should return you to where you were when you logged out. (there are log out links all over the place. You may be in the process of replying to a thread when you discover your husband is logged in, for example).
So, I replaced line 25 on member.php - which is originally: eval("standarderror(\"".gettemplate("error_cookieclear")."\");"); - with:
if ($url!="" and $url!="index.php") {
eval("standardredirect(\"".gettemplate("error_cookieclear")."\",\"$url\");");
} else {
eval("standardredirect(\"".gettemplate("error_cookieclear")."\",\"index.php?s=\");");
}
and I edited template "error_cookieclear" to only say "you are now logged out".
Anyways, I am telling you all that because I think this should be part of the official vB2.
Just my 0.02
Thanks,
Bira