The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I've spent hours sorting through all the (old & new) forum posts both on here and vbulletin.org looking for documentation on how to send a username and password from outside my forums root, and have it log them in. It looks like there are only two options available to vBulletin v4.2 and even v5--make a cURL call using the Mobile API, or use a login "bridge". Let me specify that I am NOT looking for have tables replicating users, or have my own userlist; I simply want to allow users to login into vBulletin from outside my forum root, and be able to check if they are logged in (and their user ID) from outside the forum root.
The login "bridge" requires changing the current working directory: PHP Code:
HTML Code:
<form action=\"" . $forumpath . "login.php\" method=\"post\" onsubmit=\"md5hash(vb_login_password,vb_login_md5password,vb_login_md5password_utf)\"> <input type=\"hidden\" name=\"redirect_url\" value=\"" . $RedirectURL . "\" /> <script type=\"text/javascript\" src=\"" . $forumpath . "clientscript/vbulletin_md5.js\"></script> <input type=\"hidden\" name=\"s\" value=\"" . $session['sessionhash'] . "\" /> <input type=\"hidden\" name=\"do\" value=\"login\" /> <input type=\"hidden\" name=\"vb_login_md5password\" /> <input type=\"hidden\" name=\"vb_login_md5password_utf\" /> <input name=\"vb_login_username\" type=\"text\" id=\"navbar_username\" onfocus=\"if (this.value == '" . $vbphrase["username"] . ">') this.value = '';\" size=\"15\" /> <label for=cb_cookieuser_navbar><input name=\"cookieuser\" type=\"checkbox\" id=\"cb_cookieuser_navbar\" value=\"1\" checked=\"checked\" />Remember Me?</label> <input name=\"vb_login_password\" type=\"password\" size=\"15\" /> </form> So what's the alternative? Use the cURL Mobile API, which USED to have documentation; but all the links to the API documentation all go to removed forum posts. If I were to go this route, I'd have to figure it out from the following three links, two of which contain un-official and "old" code:My question: what is the recommended solution? The problem with the Mobile API is why am I doing a cURL call when the code exists on my server? It's not what the API was designed for, but is there a better solution that does NOT require me to include global.php? |
#2
|
||||
|
||||
![]()
/bump - no responses on a recommended solution for allowing users to login to vBulletin outside the forum root using my own form?
|
#3
|
|||
|
|||
![]()
I don't know what the recommended solution is (or if there is a recommended solution). All I know is a little bit about the problem. To get someone logged in to vbulletin, you need to get it to create a session and save some cookies (you *can* log in without cookies enabled, but "remember me" won't work, and if someone does have cookies enabled then I'm not sure you could also log in without cookies). And part of the cookie problem is that the user's browser has to save it and send it back when requesting a forum page. Also, a session has to have a constant ip and user agent. So I don't know that there's any way to fake all that using cURL (but you said you think it used to work, so maybe there's a way I don't know about).
So given all that, it kind of seems like the only way to do it would be to get the user's browser to send the user name and password to the vbulletin login script, or else hack vbulletin to allow some other way. |
#4
|
||||
|
||||
![]()
Thanks KH, it looks like I'm just going to go with the basic form as presented. Not worth my time at the moment to find other solutions.
|
#5
|
||||
|
||||
![]()
I'd ask whats the point of wanting a login on your page to vB, if it doesn't do anything aside from log them into the forum?
|
#6
|
||||
|
||||
![]() Quote:
So, another part of the problem with having the login form outside the root is when someone logs in and they use incorrect information, it gets "stuck" on the forum login.php and they end up seeing an interface different then what they are use to. Hence my other question regarding login_failure hooks, so that on failure, I can send them back to outside the forum. Does that make sense? --------------- Added 25 Apr 2013 at 23:14 --------------- |
#7
|
||||
|
||||
![]()
Why not just intergrate your frontend with vBulletin? Would likely save a lot of time.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|