Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 12:35 pm EST
Geeklog Forums
Menu according to permissions
Status: offline
gonzo
Forum User
Newbie
Registered: 01/20/04
Posts: 1
I am a newbie to this and I would like to know if it is possible to display a set of elements in the menu for one group of people (e.g. people not logged in) and another for members.
For example, I do not wish people to have access to site statistics, yet it shows up in the menu and people can click on it. I would like to avoid that. Same thing for "contribute" which should be visible only to people who have already logged in.
Many thanks
For example, I do not wish people to have access to site statistics, yet it shows up in the menu and people can click on it. I would like to avoid that. Same thing for "contribute" which should be visible only to people who have already logged in.
Many thanks
4
3
Quote
Status: offline
exaurdon
Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
Someone correct me if I am wrong, but I think the simple answer is, no, this isn't a built-in capability. You can very easily disable those features in the config.php file for non-logged in users, but often that 'menu' is hard coded into the template.
Now, having said that, I believe you could fairly easily create a theme that hid parts of the menu depending on if the user was logged in. Ihaven't done a lot of work with themes, but I believe you _can_ put php into template files, and if so, you could add code to the theme file to change the theme based ont eh user's login status.
Anyone else with a little more confidence in their answer?
Exaurdon
Now, having said that, I believe you could fairly easily create a theme that hid parts of the menu depending on if the user was logged in. Ihaven't done a lot of work with themes, but I believe you _can_ put php into template files, and if so, you could add code to the theme file to change the theme based ont eh user's login status.
Anyone else with a little more confidence in their answer?
Exaurdon
4
3
Quote
gonzo
Anonymous
So..should I do that
1) in the header.thtml or
2) should I look into lib-common.php (where menu_elements is constructed) ?
1) in the header.thtml or
2) should I look into lib-common.php (where menu_elements is constructed) ?
3
11
Quote
gonzo
Anonymous
Is it reasonable to build
{visitor_menu_elements} and {member_menu_elements} in lib-common.php?
{visitor_menu_elements} and {member_menu_elements} in lib-common.php?
10
10
Quote
gonzo
Anonymous
Or rather
place the code suggested above into lib-common.php, with menu_elements being constructed differently depending on the status of $_USER['uid'] ?
place the code suggested above into lib-common.php, with menu_elements being constructed differently depending on the status of $_USER['uid'] ?
4
6
Quote
gonzo
Anonymous
Or rather
place the code suggested above into lib-common.php, with menu_elements being constructed differently depending on the status of $_USER['uid'] ?
place the code suggested above into lib-common.php, with menu_elements being constructed differently depending on the status of $_USER['uid'] ?
7
4
Quote
All times are EST. The time is now 12:35 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