The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do you update cookie/session?
How do you update the cookie/session in vb3.5.4 from a non vb page?
Is there a function in vb I can call to update it? I do not want my users to be logged out of vb when they are browsing other parts of the site outside of vb. I do not want to increase the cookie timeout, nor do I want to use the remember me box. So I want to be able to access the vb cookie/session info and update it so the user isn't timed out if they are in a separate part of the site over the cookie timeout. Jim |
#2
|
|||
|
|||
Just include global.php on your page, all will be handled automatic.
|
#3
|
|||
|
|||
Quote:
PHP Code:
But just including this file does not update anything with the cookie or session. I went from the forum home to my page, waited for the cookie to timeout, reloaded my page a few times, then went to the forum home and I was no longer logged in. Jim Ok, so I tried to use the vbsetcookie function. I'm not sure how it works, or can find any info about it. But with this entered: PHP Code:
What does that error message mean? Am I not calling the vbsetcookie function correctly? Jim |
#4
|
|||
|
|||
To test if it is working, you should do the following:
- Login to your board - Switch to your page. Keep refreshing the page once in a while, and keep doing this until the cookietimeout has passed. - Now go back to your board. PS Is your page and the board on the same domain? |
#5
|
|||
|
|||
Quote:
Does global.php call vbsetcookie when it is included? If it does, how can I check for error messages that are not shown? Jim |
#6
|
|||
|
|||
Quote:
PHP Code:
I've had similair problems when trying to include vbuserinfo on nonvb pages. Now everything works fine, but i'm not satisfied. I'm trying to figure out how to include vbuserinfo, update sessions and cookies without including global.php. There is to much complexity in the vb environment and i want to eliminate any overhead by not including/using any more than strictly necessary :disappointed: Goodluck, Hidjra |
#7
|
|||
|
|||
I realise I'm digging up a very old thread here but I have this exact problem.
I run my forum (3.8.1) and use the vbulletin authentication for my site. The majority of the site usage would be pages that are not part of the forum but are authenticated by vbulletin. My forum is on a domain like this w ww.mydomain.com/forum and my other pages are on a subdomain like this pages.mydomain.com. I have my session timeout set to 3600 at the moment because browsing through the non-forum pages of my site does not update the session tables. I have path to save cookies set to / I have cookie domain set to .mydomain.com On all my site pages I chdir to forum directory and include global.php but still my sessions table doesn't get updated. I have taken the extreme measure of including a hidden iframe that loads the forum index inside just to keep the session updated ! I'd appreciate any advice on this please. Thanks. |
#8
|
|||
|
|||
the session is updated in the shutdown code, which in vb is usually called at the end when the output is generated, so just including global.php isn't enough. I believe if you add a call to exec_shut_down() that should take care of it.
|
#9
|
|||
|
|||
Quote:
That did the trick. I've searched these forums and seen many posts regarding this and never found anyone give the solution ! Thanks. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|