Log in

View Full Version : Permission-based Navbar?


caedas
02-27-2008, 02:10 PM
Does one exist? I have seen and tried one or two and they either don't allow permissions to be set for each link (or bar)...or don't work. Could someone point me in the right direction?

Also, while pointing, could you point to the actual script(s) for vBshout? My searches turn up mods for it and never the program itself (though I could be overlooking it.)

Thanks!

Elenna
02-27-2008, 04:25 PM
I can't help you with the vBshout question, sorry!

But you can add conditionals to your navbar code, so that the code between the <if> and </if> displays only to certain usergroups, users, etc.

I have NO idea where I got this (if someone has a better link, please do post!), but here are some conditionals that you can use to customize your template:

1. Show some information only to 1 usergroup.
<if condition="is_member_of($bbuserinfo, 1)">Only group 1 can see this ...</if>

2. Show some information to multiple usergroups.
<if condition="is_member_of($bbuserinfo, 1, 2, 3)">Only groups 1, 2 and 3 can see this ...</if>

3. Show some information only to 1 user id.
<if condition="$bbuserinfo[userid] == 4">Only the user with the id #4 can see this ...</if>

4. Show some information to multiple user Ids.
<if condition="in_array($bbuserinfo[userid], array(1,2,3))">Only the users with the specified id #'s can see this ...</if>

5. Hide information only from 1 usergroup.
<if condition="!is_member_of($bbuserinfo, 4)">Users from this usergroup can't see this ...</if>

6. Hide information from multiple usergroups.
<if condition="!is_member_of($bbuserinfo, 2, 3, 4)">Users from these usergroups can't see this ...</if>

7. Hide information only from 1 user id.
<if condition="$bbuserinfo[userid] == 4">The user with this id # can't see this ...</if>

8. Hide information from multiple user Ids.
<if condition="!in_array($bbuserinfo[userid], array(1,2,3))">The users with these id #'s can't see this ...</if>

9. Show information only in forum
<if condition="$forumid == 1">If you are in the forum with the id# 1, you can see this ...</if>

10. Show information in few forums
<if condition="in_array($forumid, array(1,2,3))">If you are in the forum with the id #'s 1,2 and 3, you can see this ...</if>

11. Hide information in 1 forum
<if condition="$forumid != 1">If you are in the forum with the id# 1, you can't see this ...</if>

12. Hide information in multiple forums.

<if condition="!in_array($forumid, array(1,2,3))">If you are in the forum with the id# 1, you can't see this ...</if>

snakes1100
02-27-2008, 05:55 PM
Lite Version (https://vborg.vbsupport.ru/showthread.php?t=147346&highlight=vbshout)

Full Version (http://www.infernotechnologies.net/)