The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How do I pass the session ID in URL only when the user has cookies disabled ?
Hi,
I developed a custom page and I have a bit of a problem with users that have cookies disabled. When such users are visiting my custom page they get logged out automatically (because I am not passing the session ID variable to my custom page). What is the best way to achieve this ? Should I look for the session ID in the URL practically check the GET input for the session ID and if I find it then passed it along ? This kind of stuff must be done everywhere in VB. I mean, each page normally should check from where the session ID is coming then alter the URLs on the page itself accordingly. I mean, let's suppose that the page contains some links for some places on the forum. When cookies are enabled, the links will look like this: <a href=http://www.test.com/test1.php> Test1 </a> <a href=http://www.test.com/test2.php> Test2 </a> OTOH, when cookies are disabled, the links will look like this: <a href=http://www.test.com/test1.php?s=dwef43r43drf43xsd4d43> Test1 </a> <a href=http://www.test.com/test2.php?s=dwef43r43drf43xsd4d43> Test2 </a> How do I do the same in my own code ? Regards, Razvan |
#2
|
||||
|
||||
within templates, the session id is added via
$session[sessionurl] or $session[sessionurl_q] within files $vbulletin->session->vars['sessionurl'] OR $vbulletin->session->vars['sessionurl_q'] I suggest reviewing templates/files for examples |
#3
|
|||
|
|||
Quote:
And most important: how do I know when to pass the variables in the URL ? There must be a way to know if the user has cookies enabled or disabled. In some places I also found a third version: Code:
$vbulletin->session->vars['sessionurl_js'] Regards, Razvan |
#4
|
||||
|
||||
vbulletin will know when to use it
['sessionurl'] with query such as .php?SESSIONdo=examples ['sessionurl_Q'] without query such as .phpSESSION |
#5
|
|||
|
|||
Basically, you are saying to append this string and VB will populate it when needed. Is that correct ?
Quote:
Practically, the difference between the 2 is an "ampersand" and the end of the string. Is this correct ? |
#6
|
||||
|
||||
that is correct
the difference between the 2 is that ? gets added when no query is available I suggest reviewing your templates and files for examples .. you can also test by disabling cookies in your browser. |
#7
|
|||
|
|||
Quote:
sessionurl = "s\=efeb241f3590c1f98a31deaa78501d5a&" sessionurl_Q = "?s\=efeb241f3590c1f98a31deaa78501d5a" So, the difference is in both an ampersand and and question mark (&?). What about "sessionurl_js". When should I use that ? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|