forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Michi on March 09, 2005, 02:36:41 pm
-
Hey.
This is what my pageheader-function looks like now:
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir;
// this is the place where the custom header file gets included
ob_start();
include('/home/docs/php/templates/layout.php');
beginBody();
$beginBody = ob_get_contents();
ob_end_clean();
ob_start();
beginPage();
$beginPage = ob_get_contents();
ob_end_clean();
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(),
'{BEGIN_PAGE}' => $beginPage,
'{BEGIN_BODY}' => $beginBody,
);
echo template_eval($template_header, $template_vars);
}
The layout.php -file I'm including checks what style template file the page is supposed to use. The template file consists of functions, eg beginBody(), that consist of the template HTML-stuff I'm trying to wrap the Coppermine galleries with.
Problem is that when I try to print out certain stuff, for example the username, the $username variable that is declared in the beginning of the template file, isn't available in the beginBody-function.
$userid = $_REQUEST['bbuserid']; //THIS IS SET IN A COOKIE
It works fine in vBulletin, so I've figured it has something to do with CPG... I have CPG 1.2.0 installed. Does Coppermine somehow "separate" the functions from the original file and therefore loses the variables along the way...?
-
You have 1.2 installed but you posted in the 1.3 sub board? ???