Welcome to Geeklog, Anonymous Friday, April 26 2024 @ 01:53 pm EDT

Geeklog Forums

Removing some menuitems


TheTiGuR

Anonymous
I've finally gotten my site just about perfectly geeked for my needs, but I have one more thing I need to do to be perfect: Remove those unnecessary and/or duplicated menu items from the top nav bar. Only one plugin I am using, Contacts, is kind enough to allow me to change what the Navbar shows, if anything. For all the other pluings out there, how do I remove their menuitem? I've tried removing the text from the lang file for the particular plugin, but I still end up with the vertical seperators, just without text. Where can I go to do this? If you need an example, ou can view wh.unityalliance.com. Thanks!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Have a look at your theme's header.thtml. You'll notice two variables {menu_elemens} and {plg_menu_elements}. The first variable is replaced with the built-in menu items (contribute, links, calendar, etc.) and the second is replaced with menu entries provided by the plugins. You could simple remove the {plg_menu_elements} variable and then hand-code only the links you want instead. bye, Dirk
 Quote

Status: offline

vinny

Site Admin
Admin
Registered: 06/24/02
Posts: 352
Location:Colorado, USA
To individually remove the menu link you can comment out the function "plugin_getmenuitems_<plugin_name>" from the plugins function.inc file. -Vinny
 Quote

Anonymous

Anonymous
That was exactly what I was looking for. Thanks for the info!
 Quote

Anonymous

Anonymous
you could just disable them in the blocks section of the admin settings, as opposed to completly trashing them.
 Quote

Status: offline

jadiepoo

Forum User
Chatty
Registered: 01/11/03
Posts: 43
Instead of deleting, how do you rename a menu item?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Look for the text of the menu entry in the language file (english.php or whatever you're using). bye, Dirk
 Quote

Status: offline

chief123

Forum User
Chatty
Registered: 05/02/03
Posts: 58
Where are the built-in menu items defined? Thanks.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
lib-common.php, function COM_siteHeader() bye, Dirk
 Quote

Berek

Anonymous
artistic
Hi Guys,

I would like to do something similiar and I cannot seem to see how to remove only one item from the menu. I want to remove the 'Web resources' from the bar. I have a html Links page and do not need two in the bar. I do want to keep the menu.
Can someone tell me how to do this?
I am no expert in this stuff, so please be kind to explain which file, and which parameter to remove.
Regards,
Berek
 Quote

Status: offline

exaurdon

Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
I don't believe 'web resources' is a standard menu item of any type. It is probably a custom part of the theme you have chosen for you site.

What theme are you using?
Does the link show up on other themes?

If it is part of the theme, you will have to edit the theme template files to remove the link.

Ex
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
FAQ: How do I change the menu?

bye, Dirk
 Quote

Berek

Anonymous
Hi again,

I agree that web resources is actually from the theme. However, it is the 'Links' element. I will try to figure out how to change the menu_elements parameter.

Thanks,
Berek
 Quote

Berek

Anonymous
Solution to my problem:
in lib_common.php:

// links link
$header->set_var( 'menuitem_url', $_CONF['site_url'] . '/links.php' );
$header->set_var( 'menuitem_text', $LANG01[72] );
$header->parse( 'menu_elements', 'menuitem', false );

Changed this menuitem to false.

Regards,
Berek
 Quote

All times are EDT. The time is now 01:53 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content