i have gone another approach to this. I have actauly included a page in the theme.php pageheader function of my coppermine theme. That header function now looks like this:
PHP Code:
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
if(empty($custom_header)){
chdir('/home/digtoxn/public_html/forums');
include('/home/digtoxn/public_html/gallery/dtheader.php');
#include('http://www.digitaltoxicity.net/gallery/dtheader.php'); // Temp fix... Cookies + session DO NOT WORK WITH THIS ~Demi
$custom_header = ob_get_contents();
ob_clean();
chdir('/home/digtoxn/public_html/gallery');
}
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
user_save_profile();
$template_vars = array(
'{LANG_DIR}' => $lang_text_dir,
'{TITLE}' => $CONFIG['gallery_name'].' - '.$section,
'{CHARSET}' => $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'],
'{META}' => $meta,
'{GAL_NAME}' => $CONFIG['gallery_name'],
'{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
'{MAIN_MENU}' => theme_main_menu(),
'{ADMIN_MENU}' => theme_admin_mode_menu(),
'{CUSTOM_HEADER}' => $custom_header,
);
echo template_eval($template_header, $template_vars);
}
and the file i am including looks like this:
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'dtgalleryheader'); // change this depending on your filename
// ################### 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(
'gallery_shell',
);
// pre-cache templates used by specific actions
$actiontemplates = array(
);
// ######################### REQUIRE BACK-END ############################
// ## Grabs global.php ##
chdir("/home/digtoxn/public_html/forums");
require_once("./global.php");
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$navbits = array();
$navbits[$parent] = 'Gallery';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('gallery_shell') . '");');
?>
Now if you look above at the first [php] tags(pageheader function)... If i include the file dtheader.php file via direct path, it throws out a VERY odd error...
Fatal error: Call to undefined function: query_first() in /home/digtoxn/public_html/forums/includes/functions.php on line 940
The reason why i find this to be an odd error is because, i KNOW query_first() is being defined.. I traced it back to an issue with the build_session function in sessions.php of vbulletin. vB defines a variable $DB_site. A call to build_session unsets this variable..... I have no rational explanation as to why it does this.... Thats where i get stumped...
As a temp fix you can comment the first include line out and uncomment the line under it in my pageheader() function php code above. That will display what you want (you may need to change the templates since i use a different header template). Just note that since php registeres as a guest to the board, it will display these templates as if a guest was viewing them.
Any help here would be great. I gave my 99cents.