Okay, I've tried everything I can think of besides full integration which would eventually kill me but nothing works out :surprised:
What I'm trying to do is include my header and footer templates into another script (4images inf you're interested) Since I have important conditional statements, this requires the vbulletin conditionals
What I've done:
1. Put
Code:
<?php
// # Set up php error reporting...
error_reporting(E_ALL & ~E_NOTICE);
// # Define important var's
define('NO_REGISTER_GLOBALS', 1);
// name of script
define('THIS_SCRIPT', 'script');
// allows us to use custom templates in this script
define('GET_EDIT_TEMPLATES', true);
// # Cache templates
// get special phrase groups
$phrasegroups = array();
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array(
''
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// # Get backend...
chdir("/home/miyechi/public_html/");
require_once('./global.php');
// $template output's customtemplate1
eval('$headerinclude = "' . fetch_template('headerinclude') . '";');
eval('$header = "' . fetch_template('header') . '";');
eval('$navbar = "' . fetch_template('navbar') . '";');
// output's custometemplate2 (main template)
eval('print_output("' . fetch_template('headergeneral') . '");');
?>
2. In headergeneral, a custom vb template, I have the variables $header, $headerinclude, and $navbar
3. I go to REQUIRE this new file in the header of the gallery script
It works fine.
Except the HUGE fact that the conditionals aren't working! The conditionals seem to be setting place before the userinfo is even outputed. So frustrating
Anyone can shed a light onto this I know this is the lazy way to do it and I'm not exactly a php guru
well you dont need to redefine header fyi, it is a global varible, so you can remove that one. I thjink that headinclude is as well, not to mention the template is headinclude not header include