TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 777
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 82
  • Total: 82

sitemap individual link permissions

Started by darkorical, March 17, 2009, 09:06:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkorical

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


JPDeni

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) }



darkorical

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

JPDeni

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.

darkorical

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

IchBin

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.