Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 04:11 pm EST

Geeklog Forums

How to turn off menu_elements for unregistered guests


Status: offline

donm1021

Forum User
Chatty
Registered: 12/31/05
Posts: 56
I see in the config how to require users to login in order for them to use certain functions and see certain menu elements.

I set the following in the config to require login
$_CONF['loginrequired'] = 1;

However, the menu_element "Web Resources" still shows and works with this variableset to "1" - how can I stop the "Web Resources" link from appearing in the Menu until a user has logged in?

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
{allowed_menu_elements} is supposed to do that. It doesn't take plugins into account, though.

bye, Dirk
 Quote

Status: offline

donm1021

Forum User
Chatty
Registered: 12/31/05
Posts: 56
Quote by Dirk: {allowed_menu_elements} is supposed to do that. It doesn't take plugins into account, though.

bye, Dirk


So, what you are saying is it can't be done because 'Web Resources" is a plug in "Links"?

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Yep. You can actually hide the link entirely (there's an option for that in the plugin's config.php file), but it's currently missing the ability to only show up for logged-in users.

You could probably work around that with a PHP snippet in header.thtml or a custom entry in lib-custom.php (see the sample code in function CUSTOM_menuEntries there).

bye, Dirk
 Quote

All times are EST. The time is now 04:11 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