Forums / General Questions / Menu broken after moving things from configuration to extras

Menu broken after moving things from configuration to extras

Locked

Views: 1,194

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
20 Oct 2009, 11:12 PM
#1
boyemillar avatar

boyemillar

Zen Follower

Join Date:
Jun 2004
Location:
Irvine, Scotland
Posts:
89
Plugin Contributions:
0

Menu broken after moving things from configuration to extras

I am having some issues after moving some of my Admin Menu Choices from the Configuration Menu to the Extras Menu. The Configuration Menu was just to clutered due to having loads of addons installed.

Basically if i select a link from the Extras Menu all other Links which have come from the Configuration menu dissapear until a regular menu item is clicked or I click the Admin Home link. The Items still within the Configuration Menu remain though.

I am using ZC 138a and I have Admin Profiles Installed.

<?php

if (!defined('IS_ADMIN_FLAG')) {
  die('Illegal Access');
}

$options = array
          (array('box' => BOX_CATALOG_RECORD_ARTISTS, 'page' => FILENAME_RECORD_ARTISTS),
					 array('box' => BOX_CATALOG_RECORD_COMPANY, 'page' => FILENAME_RECORD_COMPANY),
					 array('box' => BOX_CATALOG_MUSIC_GENRE, 'page' => FILENAME_MUSIC_GENRE),
					 array('box' => BOX_CATALOG_MEDIA_MANAGER, 'page' => FILENAME_MEDIA_MANAGER),
					 array('box' => BOX_CATALOG_MEDIA_TYPES, 'page' => FILENAME_MEDIA_TYPES),
           array('box' => BOX_TOOLS_TESTIMONIALS_MANAGER_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1016'),
           array('box' => BOX_TOOLS_USER_TRACKING_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=999'),
           array('box' => BOX_TOOLS_PRICELIST_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1009'),
           array('box' => BOX_TOOLS_PRICELIST_PROFILE_1, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1010'),
           array('box' => BOX_TOOLS_PRICELIST_PROFILE_2, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1011'),
           array('box' => BOX_TOOLS_PRICELIST_PROFILE_3, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1012'),
           array('box' => BOX_TOOLS_SUPERTRACKER_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1015'),
           array('box' => BOX_TOOLS_LIGHTBOX_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1000'),
           array('box' => BOX_TOOLS_TABBED_PRODUCTS_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1001'),
           array('box' => BOX_TOOLS_STOCK_NOTIFICATIONS_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1005'),
           array('box' => BOX_TOOLS_GOOGLE_BASE_FEEDER_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1017'),
           array('box' => BOX_TOOLS_RETURNS_AUTHORISATION_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1004'),
           array('box' => BOX_TOOLS_RECOVER_CART_SALES_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=1013'),
           array('box' => BOX_TOOLS_QUICK_UPDATES_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=32'),
           array('box' => BOX_TOOLS_EASY_POPULATE_CONFIG, 'page' => FILENAME_CONFIGURATION, 'param'=>'gID=31')
           );

foreach ($options as $key => $value)
	if (page_allowed($value['page'], $value['param'])=='true') $za_contents[] = array('text' => $value['box'], 'link' => zen_href_link($value['page'], $value['param'], 'NONSSL'));

?>
21 Oct 2009, 11:15 PM
#2
boyemillar avatar

boyemillar

Zen Follower

Join Date:
Jun 2004
Location:
Irvine, Scotland
Posts:
89
Plugin Contributions:
0

Re: Menu broken after moving things from configuration to extras

Got it sorted...

I created another "Configuration" menu by totally changing the code in the "Extras" menu.

I copied the code in the "Configuration" menu and pasted it into the "Extras" menu basically using the same SQL statement but changing the following file...

/your_admin_folder/includes/boxes/extras_dhtml.php

Line 17

<?php echo BOX_HEADING_CONFIGURATION; ?>

to this

<?php echo BOX_HEADING_EXTRAS; ?>

Line 29

where visible = '1' order by sort_order");

to this

where visible = '2' order by sort_order");

Then from PHPMyAdmin I changed the (Configuration Group) Tables "Visible" Entry from "1" to "2" on the Menus I wanted to appear in the "Extras" menu.

The above along with a few other little tweaks to the files in the "/your_admin_folder/includes/boxes/extra_boxes/" folder also fixes the problem I had been having with the 'User Tacking Config' option appearing in 2 separate menus.

All of this means changing some core files and some SQL info so I wouldnt recommend it to novice/most users.

It has allowed me to tidy up my Admin Area which was becoming very cluttered.