TinyPortal
Development => Support => Topic started by: darkorical on March 17, 2009, 09:06:35 PM
Link to my site:intranet so you cant see it but if you like 192.168.1.1
SMF version: SMF 1.1.8
TP version: TinyPortal v1.0 beta 3
Theme name and version: default
Mods installed: Custom Action Mod
Is there a way to make 1 sitemap with all my links and have have it determine who gets to see what links based on membergroup?
Id prefer this over making several blocks with links
right now I'm hack-n-slashed in a cookie to the login so I can use this code in a block
if (($_COOKIE['grp'] == 1) || ($_COOKIE['grp'] == 99)){echo' (links here)
and it works just fine but Id like a cleaner approach
You could use the $user_info variable.
global $user_info;
if (in_array(1,$user_info['groups']) || in_array(99,$user_info['groups']) echo { (links here) }
I know that works as well but I was wanting to be able to use just a sitemap block and the menu setup in tiny portal
What exactly do you want to do? From what you said at first, it seemed that you wanted to have some links to show for one group and other links to show for other groups. And you wanted to do it with just creating one block for all links and all groups.
If that's what you want, there is no way to do it other than make that block into a php block and use the code that either you posted or that I posted.
If you only want to have one set of links that will be available to a certain set of groups, you can likely do it from within TP by using the permissions for the block.
If you want any more suggestions, you'll need to give more detail about what you want.
1.) Admin ->Tiny Portal -> Menu
2.) Edit Internal (defalut menu)
3.) Add menu item
4.) Fill in name click link add url in box click save
5.) Check sitemap box and activate link
then make a "Sitemap" block and it will show any links you put in the menu
I want the links from step 3 to only show to certain members basically a who can see what link permission setting
There are no permission settings per link in any type of block. If you want this feature you'll have to use Deni's suggestions.