forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: niterider on November 05, 2004, 10:04:51 am
-
Following the code in the docs to add a custom header to my theme, and the fix at http://forum.coppermine-gallery.net/index.php?topic=4464.0 , I now have my header appearing twice. For some reason it is written to the page before all the other html, then again where it belongs later in the page.
Any ideas?
thx
nic.
-
No chance except blind guessing. Zip up the theme folder that contains your modifications, and attach it to your posting (using "Additional options" when composing a message), or post your actual changes. The general answer (without more details) would be: "Obviously you haven't applied the modifications as suggested".
You might want to take a look into http://forum.coppermine-gallery.net/index.php?topic=9863.0
Joachim
-
Ok, these are the changes...
In the template.html file, in the place that I want the custom field to appear:
<td colspan="2" valign="top">{CUSTOM_HEADER}</td>
In the theme.php page, as per the instructions in the FAQs:
function pageheader($section, $meta = '')
{
global $CONFIG, $THEME_DIR;
global $template_header, $lang_charset, $lang_text_dir, $lang_default_font_size;
if (empty($custom_header)) {
include('incNav.php');
$custom_header = ob_get_contents();
ob_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(),
'{CUSTOM_HEADER}' => $custom_header
);
echo template_eval($template_header, $template_vars);
}
My included incNav.php file is simply:
<div align="center"><img src="img/MENU.jpg" width="600" height="25" usemap="#Map" border="0"></div>
<map name="Map">
<area shape="rect" coords="6,2,63,22" href="./">
<area shape="rect" coords="186,5,260,22" href="javascript:;" onClick="MM_openBrWindow('products.php','PRODUCTS','scrollbars=yes,width=430,height=650')">
<area shape="rect" coords="70,3,177,21" href="javascript:;" onClick="MM_openBrWindow('biographies.php','BIOGRAPHIES','scrollbars=yes,width=450,height=400')">
<area shape="rect" coords="389,3,498,21" href="news.php">
<area shape="rect" coords="506,4,595,21" href="javascript:;" onClick="MM_openBrWindow('contact.php','CONTACT','scrollbars=yes,width=400,height=450')">
<area shape="rect" coords="276,5,378,20" href="javascript:;" onClick="MM_openBrWindow('trainingtips.php','TRAININGTIPS','scrollbars=yes,width=450,height=600')">
</map>
You can see the end-result at
http://www.bikemax.co.za/photo/index.php
The header row appears at the top of the page, and then again in the place that its supposed to?? :-\\
TIA
nic.
-
You don't need to use this method. Simple html can be added directly to your template.html file.