Moving the Sys and Sub Menus Moving the Sys and Sub Menus
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Moving the Sys and Sub Menus

Started by alona, June 18, 2006, 01:52:02 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

alona

Hey. The problem that I'm having is that in my gallery layout, I want the sys_menu and sub_menus to be under the gallery part. I've read this thread but editing the theme didn't work. If I put the sys_menu and sub_menu above the gallery in my template.html, it works but it makes the gallery theme look weird. I want to have the three sys, sub and admin menus under the gallery itself. Is there any way to edit the code so that it's accepted? http://alona-tal.org/gallery/index.php?theme=Passion%20Red is the link to the layout and gallery. Thanks in advance. :)

Gizmo

I'm going to take the lazy way out tonight and point you to this post that asked the very same question you did. Check it out at http://forum.coppermine-gallery.net/index.php?topic=30565.0. Cool stuff this is!

Also, upgrade your gallery!

Gizmo
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

Sami

#2
okey I'll explain it ;)
check the theme.php of your theme and if you have pagefooter() functeion there then you just need add these :

        '{SYS_MENU}' => theme_main_menu('sys_menu'),// mod to give ability moving SYS_MENU after {gallery}
        '{SUB_MENU}' => theme_main_menu('sub_menu'),// mod to give ability moving SUB_MENU after {gallery}
        '{ADMIN_MENU}' => theme_admin_mode_menu(),// mod to give ability moving ADMIN_MENU after {gallery}

to the $template_vars array your $template_vars should be like this :

    $template_vars = array(
        '{CUSTOM_FOOTER}' => $custom_footer,
        '{SYS_MENU}' => theme_main_menu('sys_menu'),// mod to give ability moving SYS_MENU after {gallery}
        '{SUB_MENU}' => theme_main_menu('sub_menu'),// mod to give ability moving SUB_MENU after {gallery}
        '{ADMIN_MENU}' => theme_admin_mode_menu(),// mod to give ability moving ADMIN_MENU after {gallery}
        '{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',

and if you don't have a pagefooter() function just copy my code to your theme.php

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(
        '{CUSTOM_FOOTER}' => $custom_footer,
        '{SYS_MENU}' => theme_main_menu('sys_menu'),// mod to give ability moving SYS_MENU after {gallery}
        '{SUB_MENU}' => theme_main_menu('sub_menu'),// mod to give ability moving SUB_MENU after {gallery}
        '{ADMIN_MENU}' => theme_admin_mode_menu(),// mod to give ability moving ADMIN_MENU after {gallery}
        '{VANITY}' => (defined('THEME_IS_XHTML10_TRANSITIONAL') && $CONFIG['vanity_block']) ? theme_vanity() : '',
    );

    echo template_eval($template_footer, $template_vars);
}

- keep the comments for your record of modification
- do as gizmo suggest Upgrade to 1.4.8 it's Mandatory
‍I don't answer to PM with support question
Please post your issue to related board

alona

Okay thanks guys! I got it! ^___^ And yeps, I've got 1.4.8 downloaded and I'm upgrading as soon as I finish tweaking this theme. Thanks again. :)

PABebop

bmossavari, you rock!  Needed to do this for my gallery, did a search and found this.  Works PERFECT!!!!

Just wanted to express my appreciation.  All you devs rock!  Thanks for the great program!