The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
problem in get $vbulletin into external class
This works
PHP Code:
PHP Code:
|
#2
|
|||
|
|||
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).
|
#3
|
|||
|
|||
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:
forum: http://foro.elsilencio.cl/ |
#4
|
|||
|
|||
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.
|
#5
|
|||
|
|||
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 |
#6
|
|||
|
|||
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. |
#7
|
|||
|
|||
test with www and without www logged in
|
#8
|
|||
|
|||
This is what I did. But I just found out, if I choose "Guardar?" when I log in, it works. But if I don't check guardar then go to the bridge.php page, I see userid=0, and I get logged out from the site.
|
#9
|
|||
|
|||
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); |
#10
|
|||
|
|||
Try adding $bootstrap to your globals, like:
Code:
global $vbulletin, $bootstrap; include('global.php'); 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. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|