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: Shows header and footer one after each other.  (Read 3166 times)

0 Members and 1 Guest are viewing this topic.

Daniel_Hatcher

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
Shows header and footer one after each other.
« on: September 09, 2005, 03:10:10 am »

Heres the code i use

Code: [Select]
    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . $section,
        '{CHARSET}' => $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}' => header_show_now(),
        '{CUSTOM_FOOTER}' => footer_show(),
        );

    echo template_eval($template_header, $template_vars);
}



function header_show_now()
{

ECHO "------------------";



}


function footer_show()
{


ECHO "_______________________";




}

Now the problem is i've set header to show at top footer to show at the bottom. But it displays like so.


----------------------------- ___________________


GALLERY

i need it to show

-------------------------------

GALLERY

__________________

can anyone help?
« Last Edit: September 09, 2005, 01:33:49 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Shows header and footer one after each other.
« Reply #1 on: September 09, 2005, 06:46:40 am »

Use return instead of echo.
Logged

Daniel_Hatcher

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
Re: Shows header and footer one after each other.
« Reply #2 on: September 09, 2005, 11:15:28 am »

That seems to work, but the template.html layout seems to mess up, it shows

Code: [Select]
{CUSTOM_HEADER}

<script type="text/javascript" src="scripts.js"></script>
<!--
  Coppermine version: 1.3.3
  $Source: /cvsroot/coppermine/stable/themes/classic/template.html,v $
  $Revision: 1.2 $
  $Author: gaugau $
  $Date: 2005/04/19 03:17:13 $
-->

<table width="100%" height="100%" border="0" VALIGN="TOP">
<tr>
        <td valign="top">
<CENTER> {MAIN_MENU}</CENTER><BR>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center" valign="top">
                                        {ADMIN_MENU}
                                        {GALLERY}
                                </td>
                        </tr>
                </table>
                </td>
        </tr>
</table>
{CUSTOM_FOOTER}

All of the {} works,  but the {CUSTOM_FOOTER} that just seems to show {CUSTOM_FOOTER} instead of the coding.
Logged

Nibbler

  • Guest
Re: Shows header and footer one after each other.
« Reply #3 on: September 09, 2005, 11:19:49 am »

Any {} placeholders that are located after the {GALLERY} need to be handled by the pagefooter function instead of the pageheader function.
Logged

Daniel_Hatcher

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
Re: Shows header and footer one after each other.
« Reply #4 on: September 09, 2005, 01:28:21 pm »

Thank you, so much. It worked,  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 19 queries.