View Single Post
  #32  
Old 03-08-2005, 04:56 PM
DeMiNe0 DeMiNe0 is offline
 
Join Date: Jun 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01824 seconds
  • Memory Usage 1,808KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete