Hi,
I have a php script that has a header and footer file. I want to use the vbulletin header and footer for the script.
If I'm going about this the wrong way, please let me know. If I'm on the right track, please tell me how to display this code
PHP Code:
$testing = "this is a test";
echo 'This is my content and here is the value of $testing';
which is near the bottom of my sample page below. My code is showing everything but that code and it can be seen in action here:
http://www.rental-script.com/review_test/test2.php
PHP 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', 'test2');
// #################### 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
'test_header',
'test_footer',
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ########################## REQUIRE BACK-END ############################
chdir('../testvb');
require_once('./global.php');
// #################### HARD CODE JAVASCRIPT PATHS ########################
$headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude);
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
$navbits = array();
// change the line below to contain whatever you want to show in the navbar (title of your custom page)
$navbits[$parent] = 'Test Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
$title = "this is my title";
// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' . fetch_template('test_header') . '");');
/* I want to show this code" */
$testing = "this is a test";
echo "This is my content and here is the value of $testing";
eval('print_output("' . fetch_template('test_footer') . '");');
?>
Thanks,
Tim