1
DonPatricio
Main Menu

I wondered how only registered users can look at links in the main menu! It would be easy to set that the whole menu would only appear if your logged in, but how do you show only parts of the Main Menu for registered users?

2
aph3x
Re: Main Menu
  • 2007/2/9 10:23

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


Set group permissions for that block to be visible just for the logged in users, only parts from the main menu ...set group permissions vs. installed modules.
Everything I'm not made me everything I am
The Themes

3
DonPatricio
Re: Main Menu

I dont get it i am sry..i speak german, so i dont quite understand what you mean..

4
aph3x
Re: Main Menu
  • 2007/2/9 10:49

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


Login as admin and go to the administration side of ur XOOPS site, when you move mouse over the System Admin icon on the left and the menu appears, select Groups...Once there you will be presented with the groups created, if standard installation those are : Webmasters ; Registered Users ; Anonymous ...In the right side of each one you will find a link named Modify, go to the apropiate group you want to modify and you will be presented with a form that allows you to set permissions on what that group is allowed to see & access from your site.
For example...if you want Anonymous Group NOT to have access to the News module , make sure that on section Module Access rights the News item is not selected, that will remove the News link from the menu JUST for the Anonymous Users.
If you want Anonymous Group NOT to see the Main Menu block, make sure that on section Block Access Rights the Main Menu block is NOT selected.
Everything I'm not made me everything I am
The Themes

5
DonPatricio
Re: Main Menu

Thank you very much for your detailed answers! But, I think I didnt express myself righT!

I have one Block "the Main Menu"! There I have 2 Links! 1.) Home 2.) School ! <-- all under 1 Block!

Now I want for example that only registered Users are allowed to see "Schools"! Yu cantt set that in the Administration Panel as far as I know! You can only set, that the whole main menu Block is only allowed to acces by registered users!

I hope you know what I mean..


One idea was to creat a new block! I tried that, but I couldnt link the new block!

Thank you so far..

6
aph3x
Re: Main Menu
  • 2007/2/9 11:14

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


If link "School" is a link added by editing the menu's block than you'll have something like...

<{if $xoops_isuser == 1}>
mysite.com/school.php
<{/if}>


link will be accordingly to the actual destination and file's extension

That will make it invisible for unregistered users
Everything I'm not made me everything I am
The Themes

7
DonPatricio
Re: Main Menu

actually I edited the system_block_mainmenu.html

here:

<table cellspacing="0">
<
tr>
<
td id="mainmenu">
<
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}>a>

<{foreach 
item=module from=$block.modules}>
<
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}>a> <{foreach item=sublink from=$module.sublinks}>
<
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}>a>
<{/foreach}>
<{/foreach}>

<
class="menuMain" href="<{$xoops_url}>/school.php">Schoola>
tdtr>
table>

8
aph3x
Re: Main Menu
  • 2007/2/9 11:26

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


<{if $xoops_isuser == 1}>
<
class="menuMain" href="<{$xoops_url}>/school.php">Schoola>
<{/if}>
Everything I'm not made me everything I am
The Themes

9
DonPatricio
Re: Main Menu

Thank you very much for your help!

Login

Who's Online

274 user(s) are online (215 user(s) are browsing Support Forums)


Members: 0


Guests: 274


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits