Forums / Templates, Stylesheets, Page Layout / Remove menu item from Admin Interface

Remove menu item from Admin Interface

Locked

Started by artcoder on 10 Aug 2008, 7:43 PM · Views: 3,051

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
10 Aug 2008, 7:43 PM
#1
artcoder avatar

artcoder

Zen Follower

Join Date:
Jan 2007
Posts:
166
Plugin Contributions:
0

Remove menu item from Admin Interface

How to I remove an menu item from "Admin -> Tools"? Any edit to database required?

11 Aug 2008, 5:13 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Remove menu item from Admin Interface

No database edits required.

Look in /admin/includes/boxes/....tools...
and /admin/includes/boxes/extra_boxes/ ....tools...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Aug 2008, 8:36 PM
#3
fogjuice avatar

fogjuice

New Zenner

Join Date:
Aug 2008
Posts:
7
Plugin Contributions:
0

Re: Remove menu item from Admin Interface

I am unsure about something similar, I want to add an item to the menu but I am not sure how...

They way it's done is very confusing.. all i see is things such as:

$za_contents[] = array('text' => BOX_TOOLS_BANNER_MANAGER, 'link' => zen_href_link(FILENAME_BANNER_MANAGER, '', 'NONSSL'));
  $za_contents[] = array('text' => BOX_TOOLS_MAIL, 'link' => zen_href_link(FILENAME_MAIL, '', 'NONSSL'));
  $za_contents[] = array('text' => BOX_TOOLS_NEWSLETTER_MANAGER, 'link' => zen_href_link(FILENAME_NEWSLETTERS, '', 'NONSSL'));
  $za_contents[] = array('text' => BOX_TOOLS_SERVER_INFO, 'link' => zen_href_link(FILENAME_SERVER_INFO, '', 'NONSSL'));
  $za_contents[] = array('text' => BOX_TOOLS_WHOS_ONLINE, 'link' => zen_href_link(FILENAME_WHOS_ONLINE, '', 'NONSSL'));

Where is the actual text that displays the name on the menu and link to each file? Can someone explain to me how zen_href_link() works?

14 Aug 2008, 9:17 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Remove menu item from Admin Interface

The text is defined in language constants defined in language files. ie: BOX_TOOLS_BANNER_MANAGER is defined in a language file, and its value will be inserted as appropriate. This allows the multilingual capabilities of Zen Cart to apply to admin menu choices.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

15 Aug 2008, 1:30 PM
#5
fogjuice avatar

fogjuice

New Zenner

Join Date:
Aug 2008
Posts:
7
Plugin Contributions:
0

Re: Remove menu item from Admin Interface

ah thank you, i see now :) DrByte are you the creator of zencart?

15 Aug 2008, 1:41 PM
#6
fogjuice avatar

fogjuice

New Zenner

Join Date:
Aug 2008
Posts:
7
Plugin Contributions:
0

Re: Remove menu item from Admin Interface

If I want to add a completely new category, can someone explain to me what would be involved?

I have a nice order browser that i've made and I want to implement it but I can't find any docs on how to create new menu categories or add to existing ones, I apologize if this is mean but it seems like they are all over the place but it will probably make sense once I read how it was setup to work..

15 Aug 2008, 3:34 PM
#7
fogjuice avatar

fogjuice

New Zenner

Join Date:
Aug 2008
Posts:
7
Plugin Contributions:
0

Re: Remove menu item from Admin Interface

So i've got it figured out pretty much but where is zen_href_link located?

15 Aug 2008, 10:54 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Remove menu item from Admin Interface

To create a new menu item on an existing menu such as the "Customers" menu, there are 3 simple steps:

  1. Create a new file in the extra_boxes folder, perhaps like this:
    /admin/includes/boxes/extra_boxes/myorderbrowser_customers_dhtml.php
    and put the following inside it:```
<?php $za_contents[] = array('text' => MYORDERBROWSER_LINK_TEXT, 'link' => zen_href_link(FILENAME_MYORDERBROWSER, '', 'NONSSL')); ``` 2. Then create a language file for the link name: /admin/includes/languages/english/extra_definitions/myorderbrowser_definitions.php``` <?php define('MYORDERBROWSER_LINK_TEXT', 'My Order Browser'); ``` 3. And define the filename in a new file as well: /admin/includes/extra_datafiles/myorderbrowser_filenames.php ``` <?php define('FILENAMES_MYORDERBROWSER', 'myorderbrowser.php'); ``` There are lots of examples of admin addons that have added extra menu items. One such example is the "Backup MySQL Plugin". You could use it for inspiration or as an example of the pattern to follow.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.