The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have been reading the boards all night, just can't get it working right. The php file does display the data I want, however it does not display the VB wrapper im trying to put it in.
From what ive read on the boards this should theoretically work. However what it does is replace the entire site, w/ the output from the file i am importing in the "global_start" plugin. Im sure im missing something dumb and simple, but help me out here. Step 1: Created and activated a plugin w/ following code Code:
chdir('dir/to/the/file/im/running.php'); ob_start(); require("thefile.php"); $thefilevariable = ob_get_contents(); ob_end_clean(); chdir('back/to/forums'); Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar $thefilevariable $footer </body> </html> Code:
<?php // #### SET PHP ENVIRONMENT ##### error_reporting(E_ALL & ~E_NOTICE); // #### DEFINE IMPORTANT CONSTANTS #### // change the line below to the actual filename without ".php" extention. // the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation. define('THIS_SCRIPT', 'test.php'); // ## PRE-CACHE TEMPLATES AND DATA ##### // get special phrase groups $phrasegroups = array(); // get special data templates from the datastore $specialtemplates = array(); // pre-cache templates used by all actions $globaltemplates = array( // change the lines below to the list of actual templates used in the script 'navbar', 'thetemplate', ); // pre-cache templates used by specific actions $actiontemplates = array(); // ########################## REQUIRE BACK-END ############################ chdir('/home/wwraith/public_html/forums'); require_once('./global.php'); // #################### HARD CODE JAVASCRIPT PATHS ######################## $headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude); // ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## // Example of how to include a seperate file: $navbits = array(); $navbits[$parent] = 'Test Page'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('thetemplate') . '");'); ?> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|