Yes, I agree that I am having trouble getting global.php called correctly through this rendering system.
I have tried adding
Code:
chdir ('/home/touring7/public_html/');
require_once('./global.php');
to /kb/index.php
to /kb/knowledgebase.php
and directly to the template in my style called KBPublisher (if you are following my earlier post)
and I have had no luck.
If I just load knowledgebase.php at the browser, I am logged in fine.
As you recall from earlier post, kb/index.php calls /kb/knowledgebase.php as a kb template which then calls the vB template KBPublisher. Everything displays as expected but I am not logged in.
I even tried defining a tag called {global_load} to try and insert an additional call to global.php by inserting the php code to no avail.
Two ideas:
(1) Do I need to 'register' a page such as /kb/index.php?
(2) Perhaps I could call global.php at /kb/index.php to define security tokens and etc and then pass that code via a tag to the vbulletin template via the /kb/index.php rendering system. Suggestions for what form that code should take?
Please help me get the global.php called and working correctly.
--------------- Added [DATE]1323374293[/DATE] at [TIME]1323374293[/TIME] ---------------
I am continuing to experiment and I might be close, if I can get some help:
In the /kb/input.php I place the following code:
Code:
$curdir = getcwd ();
chdir('/home/touring7/public_html/');
require_once('./global.php');
chdir ($curdir);
.
.
.
$page->assign('global_load',$vbulletin->userinfo['securitytoken']);
I have a tag I created in my template called {global_load} which renders the page correctly but on top of the page it prints out the security token obtained from the global call /kb/index.php. So this verifies that I can pass a global variable (security token) through the rendering process.
Can someone suggest a way I can get that rendered page to accept the security token so it will see me as logged in?
Thanks.