![]() |
problem in get $vbulletin into external class
This works :D
PHP Code:
PHP Code:
|
It doesn't work because the code is written to expect some variables to be global, but if you do the include in a function, they're not. You can get around that by declaring the variables as global before you do the include. I know $vbulletin is one, I think $bootstrap is another, but unfortuantely I don't have the complete list (if you worked it out and posted it here, that would be great).
|
Sorry, this work:
global $vbulletin; but other problem: http://elsilencio.cl/portal/brigde.php [works] http://www.elsilencio.cl/portal/brigde.php [dont work] PHP Code:
http://elsilencio.cl/portal/cookies.png forum: http://foro.elsilencio.cl/ |
Hmm...the only thing I can think of right now is, did you change the cookie domain setting after finding that it didn't work? You might have to clear all cookies from your browser and try again.
|
clean cookies, history, passwords, test in other browser... ff, chrome, safary, etc and same problem.
Register in forum and test the public script please. User ID 999: >>> console.log(document.location + ' ::: ' + document.cookie) http://elsilencio.cl/portal/brigde.php ::: CF_ORACLE=PRECACHED; __cfduid=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaa; __utma=1915749.1000392128.1358186771.1358186771.13 58186771.1; __utmb=1915749.27.10.1358186771; __utmc=1915749; __utmz=1915749.1358186771.1.1.utmcsr=(direct)|utmc cn=(direct)|utmcmd=(none); bb_lastvisit=1358189348; bb_lastactivity=0 User ID 0: >>> console.log(document.location + ' ::: ' + document.cookie) http://www.elsilencio.cl/portal/brigde.php ::: __cfduid=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaa; __utma=1915749.1000392128.1358186771.1358186771.13 58186771.1; __utmb=1915749.27.10.1358186771; __utmc=1915749; __utmz=1915749.1358186771.1.1.utmcsr=(direct)|utmc cn=(direct)|utmcmd=(none); bb_lastvisit=1358189348; bb_lastactivity=0 |
Seems to be working for me. On either page I see:
Code:
Array ( [userid] => 17057 [temp] => [field1] => ... if I'm logged in, and Code:
Array ( [userid] => 0 [usergroupid] => 1 [username] => No registrado when I log out. |
test with www and without www logged in
|
Quote:
|
you're right.
how to fix? this is a bug in vbulletin. --------------- Added [DATE]1358191183[/DATE] at [TIME]1358191183[/TIME] --------------- my temporal solution: Code:
$('#cb_cookieuser_navbar').hide().prop('checked', true); |
Try adding $bootstrap to your globals, like:
Code:
global $vbulletin, $bootstrap; I don't know why that would cause this problem, but other people have asked about doing the same kind of thing and ended up needing to put in $bootstrap. |
All times are GMT. The time now is 10:33 AM. |
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:
|