coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: IceQueen on May 22, 2009, 08:30:37 PM

Title: [Solved]: {Sys_menu} and {Sub_menu} don't show up
Post by: IceQueen on May 22, 2009, 08:30:37 PM
I just created a template, but when I add the {Sys_menu} and {Sub_menu}, they don't show up in the gallery. They are shown as "{Sys_menu}" and "{Sub_menu}" literally. Here it is: http://lemmonicedesigns.net/coppermine/index.php?theme=clsummertheme

Hope someone can help me out!
Title: Re: {Sys_menu} and {Sub_menu} don't show up
Post by: Nibbler on May 22, 2009, 08:36:38 PM
They need to appear before the {GALLERY} tag. Try rearranging your html.
Title: Re: {Sys_menu} and {Sub_menu} don't show up
Post by: IceQueen on May 22, 2009, 09:06:14 PM
Thank you :D
Title: Re: {Sys_menu} and {Sub_menu} don't show up
Post by: Joachim Müller on May 23, 2009, 05:14:18 PM
Or try coming up with a "left-handed" theme: if the tokens for the menus must come after the {GALLERY}-token, they need to be defined withion the pagefooter function instead of the pageheader function. This is the case for example in the Chaoticsould theme - preview it here (http://coppermine-gallery.net/Obsolete?theme=chaoticsoul), download it here (http://sourceforge.net/project/downloading.php?group_id=89658&filename=cpg1.4.x_theme_chaoticsoul_v1.3.0.zip). Take a look how the menu is called there. Take particular notice of the file theme.php - this is the relevant code:// Function for writing a pagefooter

function pagefooter()

{

    //global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS;

    global $USER, $USER_DATA, $ALBUM_SET, $CONFIG, $time_start, $query_stats, $queries;;

    global $template_footer;



    $custom_footer = cpg_get_custom_include($CONFIG['custom_footer_path']);



    if ($CONFIG['debug_mode']==1 || ($CONFIG['debug_mode']==2 && GALLERY_ADMIN_MODE)) {

    cpg_debug_output();

    }



    $template_vars = array(

        '{SYS_MENU}' => theme_main_menu('sys_menu'),

        '{SUB_MENU}' => theme_main_menu('sub_menu'),

        '{ADMIN_MENU}' => theme_admin_mode_menu(),

        '{CUSTOM_FOOTER}' => $custom_footer,

        '{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',

    );



    echo template_eval($template_footer, $template_vars);

}