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: Moving the Sys and Sub Menus  (Read 3435 times)

0 Members and 1 Guest are viewing this topic.

alona

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Moving the Sys and Sub Menus
« on: June 18, 2006, 01:52:02 am »

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. :)
« Last Edit: June 19, 2006, 08:21:55 am by GauGau »
Logged

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: Moving the Sys and Sub Menus
« Reply #1 on: June 18, 2006, 02:43:21 am »

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
Logged
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

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Moving the Sys and Sub Menus
« Reply #2 on: June 18, 2006, 07:42:10 am »

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 :
Code: [Select]
        '{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 :
Code: [Select]
    $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
Code: [Select]
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
« Last Edit: June 18, 2006, 07:49:14 am by bmossavari »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

alona

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Moving the Sys and Sub Menus
« Reply #3 on: June 18, 2006, 11:48:30 pm »

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. :)
Logged

PABebop

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Moving the Sys and Sub Menus
« Reply #4 on: July 19, 2006, 03:50:40 pm »

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!
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.