Log in

View Full Version : How can I use user system in outside directory?


ticky
02-05-2005, 08:51 PM
I'm trying to make a website where the vB forums will be in the "forum" subdirectory and then the rest of my site on the base directory.

How can I use vB's user system on my main site?

E.g. I want the login box on the main page, but if the user is logged it it'll say so and list any new messages that person has.

Any demo code as well?

Thanks!

- Ticky.

Andreas
02-05-2005, 09:21 PM
Easiest way would be to include the vBulletin Backend


chdir('/path/to/forum');
require_once('./global.php');


Then you can access all internal data-structures ($bbuserinfo, etc.) and do everything you can also do "within" vBulletin.

ticky
02-05-2005, 09:27 PM
Thank you for your reply.

You mentioned internal data structures. Is there a list/diagram anywhere that I can get a good reference these variables and functions?

Thanks!

Andreas
02-05-2005, 09:35 PM
No. Only documentation so far are the PHP files - take a look at them :)