Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: custom header is duplicated  (Read 3080 times)

0 Members and 1 Guest are viewing this topic.

niterider

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Glasshouse Multimedia
custom header is duplicated
« 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: custom header is duplicated
« Reply #1 on: November 05, 2004, 03:59:27 pm »

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
Logged

niterider

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Glasshouse Multimedia
Re: custom header is duplicated
« Reply #2 on: November 11, 2004, 03:17:35 pm »

Ok, these are the changes...

In the template.html file, in the place that I want the custom field to appear:
Code: [Select]
<td colspan="2" valign="top">{CUSTOM_HEADER}</td>
In the theme.php page, as per the instructions in the FAQs:
Code: [Select]
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:
Code: [Select]
<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.
Logged

Nibbler

  • Guest
Re: custom header is duplicated
« Reply #3 on: November 11, 2004, 08:46:35 pm »

You don't need to use this method. Simple html can be added directly to your template.html file.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.