The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Particularly the fonts and colors specified by the admin. Can someone post an example of code which I need to use to get access to these variables?
|
#2
|
|||
|
|||
include ("./global.php");
Gives you access to the entire vBulletin engine. |
#3
|
|||
|
|||
Cool. So I can just look at the templates and files for examples of how they pull these variables. Thanks for the help.
|
#4
|
|||
|
|||
Is there some way you can include globa.php if the software you are using is in a directory other than the one vB is in?
I have an image gallery program I'm trying to integrate, which is in websitename/gallery, whereas vB is in websitename/forums If I hardcode the ref to global.php it obviously breaks, since it then tries to look up config.php, etc. TIA, Chris Quote:
|
#5
|
|||
|
|||
just put the absolute path inside the quotes, or if the directory isn't that far away in the hiarchy you could use the '..''s to create a relative path.
|
#6
|
|||
|
|||
Hmm, so I need to edit the global.php too, then? The problem is I told my addon where global.php was, but then inside global.php it calls config.php, which has a relative path to global.php, which confused my addon.
Did I confuse anyone else now? Chris Quote:
|
#7
|
|||
|
|||
just use
include ("../gallery/global.php"); |
#8
|
|||
|
|||
Ok...
The program resides in www.mysite.com/gallery. Forums are in www.mysite.com/forums I did an include ("../forums/global.php"); but this is the error I get when I try to load the file that has the include: Warning: Failed opening './admin/config.php' for inclusion (include_path='.:/usr/local/nusphere/apache/php/lib') in ../forums/global.php on line 48 Thanks, Chris Quote:
|
#9
|
|||
|
|||
I'd like to know the solution to this too (if there is one). My fix was to simply always put the php file using global.php in the folder with the rest of message board files.
|
#10
|
|||
|
|||
Code:
chdir($DOCUMENT_ROOT . "/forums"); include("$DOCUMENT_ROOT/forums/global.php"); chdir($DOCUMENT_ROOT . "/gallery"); // Only need this if you are going to call any files in the /gallery directory |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|