![]() |
Custom Pages Running from subfolder?
How can i have my custom modification php file run from another folder? i can´t get it to show anything if i have it in another subfolder in my forum root.
|
Inside the php file, you must point to the global.php file which should show up as ../global.php rather than ./global.php or just global.php. You must point to it seeing as how its not in the main dir.
Also, you may need to correct the chdir aswell, although that should be accurate already. |
Do not use links to other folders in including global.php. Always change the directory to the folder with global.php before including it, not doing so will break the includes.
|
Quote:
|
Quote:
Code:
chdir('/home/yoursite/public_html/forums'); Code:
require_once('../global.php'); |
ah ok will try that
|
how do i fix so i fill in the path in the vbsettings and it get it from there?
|
Fix what?
|
This: chdir('/home/yoursite/public_html/forums'); i don´t wanna have to edit it in the php file so how can i fix so i put the path in vboption and then it writes there.
|
To access vBulletin options, you need to include global.php, to include global.php, you need to set a proper directory.
|
im not good in this but is it possible to add a field in the product settings were i put the path so i don´t have to edit the php file if i changes host or have it on other host?
|
Please read my post again.
|
if i understand you right i must changes the path "chdir('/home/yoursite/public_html/forums');" in the php file but i want it to be ansetting were i can changes the path in the acp. and also the style doesn´t work like it should when i go to the file in the subfolder.
|
Quote:
|
ok but how do i get the style to show correct? and the images?
|
Add <base href="http://yourdomain.com/" /> to the top of your headinclude template.
|
that worked. thanks. but why does it have to be in the top? i tested at the bottom and that didn´t work.
EDIT: is it possible to have a plugin that automatic edit the template and add this in the top of header include? if so how? |
[QUOTE=John3971;1519238]that worked. thanks. but why does it have to be in the top? i tested at the bottom and that didn´t work.
Because code is executed (not really "executed" in the programming sense, though) in the order it appears. You will find that there are Javascript links in the template. |
All times are GMT. The time now is 04:54 PM. |
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:
|