The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Issue with vBulletin php include on non vb page
We have a new site on which we use a php include to display calendar.php on the home page. It seems to work well with two exceptions. Fist, we noticed the calendar view links are not in the proper place and second, the user login status is incorrect (user is not shown as logged in when he is). These problems are on the home page (root folder - index.php), but the calendar.php page in the forum folder works correctly.
The site home page is: www.lahabraevents.com The calendar page is: www.lahabraevents.com/forum/calendar.php We suspect the problem is a sessions issue due to the home page being in the root folder rather than the forum folder, but we need help from someone a little more knowledgable. Any help is appreciated. |
#2
|
||||
|
||||
Did you make sure to include the global.php in the page?
|
#3
|
|||
|
|||
Chdir() to the forum directory before including the calendar.php.
|
#4
|
|||
|
|||
Thanks for the replies.
Lynne, yes we included global.php both on the page and it is also in the calendar.php include but no joy. Marco, we tried using Chdir but we aren't familiar enough to know how to use it properly. If you could give us some guidance, that would be great. When we tried, we got the dreaded "Unable to add cookies, header already sent." message. Thanks in advance for any help. |
#5
|
|||
|
|||
PHP Code:
|
#6
|
|||
|
|||
Hi Marco,
Thanks for the reply. Unfortunately, that is the code I have tried before in numerous variations along with other coded edits - full paths, relative paths, etc. - with no success. Either I still have the original problems at best, or worse, some sort of error code. Any further help is certainly appreciated. Here is the current code for the page (if I don't include the base href, I lose the CSS). BTW, this is a test page in the same directory as index.php. The url is http://www.lahabrevents.com/index-test.php.: <base href="http://www.lahabraevents.com/forum/" /> <?php chdir('/forum/'); include ("http://www.lahabraevents.com/forum/calendar.php"); ?> thanks, David |
#7
|
||||
|
||||
Why do you include the whole calendar.php page - this will most likely create errors. either replicate calendar.php's code, or modify it to meet your needs.
|
#8
|
|||
|
|||
Quote:
Thanks for the thoughts. Admittedly I am a novice, so please bear with me. It seems the problem is due to relative paths in all the files. The site home page (the page in question) is in the root folder. The calendar.php file is in the /forum/ folder. If I understand your suggestion correctly, I can copy the calendar.php code into the home page rather than using an include. I tried this and modified the paths on all the includes for that file accordingly. But we then have the same problem with the first file called down the line - in this case my modified code can now find /forum/global.php but returns an error because /includes/init.php can't be found. I would then need to modify the path in global.php and so on back to who knows where. That seems more than a little convoluted, not to mention opening the door to other issues. Hopefully I am missing something simple. As you can tell I could really use some guidance. Thanks for any help. David |
#9
|
|||
|
|||
preface urls in your templates as...
HTML Code:
$vboptions[bburl] |
#10
|
|||
|
|||
Quote:
Thanks for that. Tried it with same result. It appears I would need to modify all the include files and still not sure if that would work. David |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|