The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to include php files on vBulletin?
Hello there.
I recently installed vBulletin and i would like to integrate it with the rest of my site. What I'd like to do is to include the header of my site to any page of vBulletin (showpowst, showthread, index, personal messages etc.). I guess I'm going to use the include() function of php. Could you please tell which file to edit and where to add the include() function? Thank you. So... I'm trying to include a .php file (adding a new pluggin to global_start) but there are some issues with the relative paths. vBulletin is installed on public_html/modules/vbulletin/ and the file i want to include is on public_html/ If i try to include it using include("file.php") then it looks for it at public_html/modules/vbulletin/ (that's wrong). If I try to include it using include("../../file.php") it's get included some way but the links are not correct (for example instead for a link to point at index.php, it's pointing at public_html/modules/vbulletin/index.php). Could you pleeeeease help me? Thanks. |
#2
|
||||
|
||||
<a href="http://www.vbulletin.com/forum/showthread.php?p=1066718#post1066718" target="_blank">http://www.vbulletin.com/forum/showt...18#post1066718</a>
Bob |
#3
|
|||
|
|||
Yes i've already read that manual but i have problems with the relative paths.
vBulletin is installed on public_html/modules/vbulletin/ and the file i want to include is on public_html/ If i try to include it using include("file.php") then it looks for it at public_html/modules/vbulletin/ (that's wrong). If I try to include it using include("../../file.php") it's get included some way but the links are not correct (for example instead for a link to point at index.php, it's pointing at public_html/modules/vbulletin/index.php). The problem is the paths of the files i want to include. Could you please help me? |
#4
|
||||
|
||||
The path to file.php must be correct, otherwise it won't find it - /public_html/file.php.
Try it with and without the first /. Also if you have hyperlinks in file.php make sure they are absolute not relative, eg http://domain.com/file.html not file.html. Bob |
#5
|
|||
|
|||
The problem is that the file (file.php) i'd like to include to the vBulletin pages, also includes other files. So even if I try to include it with the absolute path (for example: include('http://www.domain.com/file.php') i get many errors for include() functions inside the file file.php (which are relative and not absolute - it's really hard to make all these paths absolute because there are so many files).
For any other page on my site the function include('file.php') includes the file file.php which is located on the home directory of my site. On vBulletin pages that doesn't work. Is there any way to solve it? Thanks. |
#6
|
||||
|
||||
Are you saying you want to include a file that itself has includes?
Bob |
#7
|
|||
|
|||
Yes, that's right.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|