Log in

View Full Version : vBulletin Sessions


t3nt3tion
05-07-2008, 10:17 PM
1. I`m trying to do a bridge between a script that uses sessions and vbulletin. I`m having a hardtime creating a session bridge since I don`t know what I should really integrate with the script, so it would automatically login the user in vBulletin. Any hints ? Code that I`d need to check ?

I got to the part that I need to use :

$curdir = getcwd (); // gets current dir
chdir(FORUMPATH); // changes to the forum dir
require_once(FORUMPATH .'/global.php'); // loads up vb functions
chdir ($curdir); // changes back to the directory

2. Another question is why not use the require_once directly ?

Regards,
Adrian

t3nt3tion
05-10-2008, 08:15 PM
*bump*

Dismounted
05-11-2008, 05:40 AM
1. I`m trying to do a bridge between a script that uses sessions and vbulletin. I`m having a hardtime creating a session bridge since I don`t know what I should really integrate with the script, so it would automatically login the user in vBulletin. Any hints ? Code that I`d need to check ?

I got to the part that I need to use :

$curdir = getcwd (); // gets current dir
chdir(FORUMPATH); // changes to the forum dir
require_once(FORUMPATH .'/global.php'); // loads up vb functions
chdir ($curdir); // changes back to the directory

2. Another question is why not use the require_once directly ?

Regards,
Adrian
Have a look through login.php. You will need to replicate those processes. You cannot include global.php directly because global.php includes other files, those includes will break because of the paths if you don't change to the correct directory.

t3nt3tion
05-11-2008, 12:38 PM
Already vgoogled through the forums, found posts from you regarding cookie creation, and it works like a charm !
*searches for a way to vote Dismounted Mod of The Year* ;)