The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
External Files, need some help.
Hello,
I've used the guide for including external php files and it does work. There is only one issue that doesn't seem to work... I've got $sitemenu to include a .html file. $sitemenu is defined within the php file that I added into a plugin (using that guide). Normally, I just used php code on my website, but of course it is different with vB. Since I can't do include php codes in the templates, I've tried something like: PHP Code:
The plugin is hooked to global_start and the variable is being used the header. Is there a better way to have this work? |
#2
|
||||
|
||||
Have you followed that page exactly and used the PHP code provided (and change the path of course)?
|
#3
|
|||
|
|||
Just a guess but...
The link you gave give this code: Code:
$includedhtml = implode('', file('path/to/this/file/myfile.html')); |
#4
|
|||
|
|||
I have php working, I'm talking about the included html file in the in the php file I have connected to vBulletin using that guide.
As in, I have connected a external php file. however, the php file has a varialbe as seen above of which I want to be echoed onto vB. Thanks. |
#5
|
|||
|
|||
In which case you need to return the variable:
i.e. put return($sitemenu); after your include statment in the PHP file. Source: http://www.php.net/include/#id2543347 Try that see if it works. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|