![]() |
external login - logouthash
Hi there
I have created a simple script that is a login form for vbulletin 4. I was using the variables available when including global.php but this didn't work on some of my pages as I couldn't set the include directory since it was already set by another CMS system. eg chdir($_SERVER['DOCUMENT_ROOT'] . '/forums'); So instead I manually connected to the vb database and got the session and user details. The only thing I can't get is the logouthash variable. logouthash is defined in the /includes/functions.php - PHP Code:
Is TIMENOW the same as time()? I find if I echo TIMENOW its not the same as time() and it changes all the time? How should I define TIMENOW or is there a better way to do this whole thing? |
You are right. TIMENOW is time()
PHP Code:
|
Thanks for that. I got it working. Here is the code in case it can help others -
PHP Code:
Oh yeah I should mention if you've got other db connections open you might need to do this to seperate the vb db connection. Change PHP Code:
PHP Code:
|
Works great, dude! Thanks. You saved me a days work trying to figure out the login code myself.
Just for corrections sake, I did have to add this to bottom to complete the final if statement: PHP Code:
PHP Code:
|
All times are GMT. The time now is 09:13 PM. |
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:
|