The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Login outside vB / Protect content
I have been searching at vbulletin.org, vbulletin.nl, vbulletintemplates.com and vulletin.com (which is unfortunately down on both URLs at present). I have seen some posts relating to this issue but none was dealing with exactly what I want to achive. Also I know how to code parts of the solution I am very much interested in your professional opinion as to how to do it best.
I have a website where vB is just a subpart of the overall content. So there are plenty of other non-vB .php pages. Basically what I want to achieve is, that users outside the board can login without having to use the login form provided by vB. If the have logged in successfully they should not be taken to the forum home index. I thought of just copying the login.php form but obviously the POST method takes users to the forum index after logging in. That is not what I want to do. I have written a function which uses global.php and some other includes to get the session ($bbuserinfo) data, so once users have logged in I can user their authentication information to protect content outside vB and do all sorts of things (like personalization, etc.) The only thing missing to have a complete picture is: How could I create a simple .php page which users can use to submit ther vB username / password, log into the board and exit to any other page outside vB? Any idea? Your help, as always, is greatly appreciated. |
#2
|
|||
|
|||
Exactly this is what I'm looking for.
|
#3
|
||||
|
||||
connect to global.php and look at the navbar template for the login code...
|
#4
|
|||
|
|||
@[FG]Omega:
Thanks for supporting this idea. ;-) If I get it done, I'll let you know. @Faranth: What do you mean with "connect to global.php"? Are you saying that the page outside vB which should hold the login box should include global.php and I should just copy some code from the navbar? P.S.: I submitted a feature request to the folks at vb.com to provide an exiturl-feature. |
#5
|
||||
|
||||
first if we are outside of the forums directory we do this
PHP Code:
PHP Code:
|
#6
|
|||
|
|||
Thanks.
I know that and I do it already to check whether users are known or unknown outside the board. But thanks for clarifying anyway. Meanwhile I took a look at the navbar template: PHP Code:
1. Once the user submits this form the form action forces him to go to login.php which leaves him with the forum index page. But I want the user to get transferred to whatever URL I want outside vB after logging in. 2. What do the undocumented hidden input fields do, forceredirect and vb_login_md5password mean? Does this clarify my thoughts a bit? |
#7
|
||||
|
||||
i belive vB needs a redirect ONLY in the login to passon some session data.
there hidden to make sure users dont change them vb_login_md5password is how the users password is stored i belive might wanna check login.php |
#8
|
|||
|
|||
It seems as if nobody has a real solution for it. Maybe I did not explain myself in a good way. I'm not a native English speaker. :-)
I try it again (I also posted this at vb.com as part of another thread in the suggestions forum): Once again I try to explain what I want to achieve. Maybe it's the easiest way if you quickly describe how to do it as opposed to trying to chase my mistakes. :-) I want to create a page one.php (not being a part of the vB structure) which allows a currently logged out user to log in. The form fields for username and password could either be in a form inside one.php itself or one.php could contain a link to another page two.php or it could contain a link to a .php file provided as part of the vB system. If the login is successful I want the user to be forwarded to a page three.php, again, not being part og vB. If the login is not successful, I want the user to end up at four.php. |
#9
|
||||
|
||||
why all the differnt pages?
|
#10
|
||||
|
||||
You'd have to edited the functions to show where the login redirects too, but this would affect all other pages too. The only way I can think of doing it is to create another functions similar to vBs login code.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|