forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: portkey on August 06, 2004, 12:42:40 am

Title: PHP Inclusion Troubles
Post by: portkey on August 06, 2004, 12:42:40 am
I followed the directions in the FAQ section to add a custom header http://coppermine.sourceforge.net/faq.php?q=customHeader#customHeader but for some reason, not only is it showing up where I want it to, but also in the upper corner... can anyone help me??

http://www.gallery.the-portkey.com
Title: Re: PHP Inclusion Troubles
Post by: Joachim Müller on August 06, 2004, 07:29:47 am
the faq is outdated in this respect. Search the board, this has been discussed before.

GauGau
Title: Re: PHP Inclusion Troubles
Post by: portkey on August 06, 2004, 03:01:55 pm
I've searched through here but I still can't find my answer./ My code does show up.... just not where I told it to.
This is what I've done to theme.php:
Code: [Select]
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;
    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_MENU1}' => theme_main_menu1(),
        '{MAIN_MENU2}' => theme_main_menu2(),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{USERS_ONLINE}' => include("http://www.the-portkey.com/usersonline/users.php")
        );
    echo template_eval($template_header, $template_vars);
}
And this is what I've done to tamplate.html:
Code: [Select]
<table width="725" border="0" align="center" cellpadding="6" cellspacing="0">
       <tr>
           <td height="108" valign="top"><div align="right">{MAIN_MENU1}</div><br />
                {MAIN_MENU2} <br><div align="right">{USERS_ONLINE}</div><br />
                <div align="center">{LANGUAGE_SELECT_FLAGS}<br>{THEME_SELECT_LIST}&nbsp;{LANGUAGE_SELECT_LIST}</div><br />
                    {ADMIN_MENU} {GALLERY}</td>
                </tr>
              </table>
Yet only half of it goes where I want it to, and the whole thing appears again above the gallery to the left. Did I do something wrong?

link: http://www.gallery.the-portkey.com