The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Navbar Links based on usergroups
I'd like to be able to only display a particular navbar item based on a set of usergroups I define. I wouldn't think this would be too hard to do, but I'm not sure where to start.
Has anyone done this, can offer pointers, etc? Thanks! |
#2
|
|||
|
|||
I made a set of Dropdown Menus (https://vborg.vbsupport.ru/showthread.php?t=203521 ) which some admin wanted to add a serperate tab which only he and his mods could view.
Using conditionals to wrap an entire tab block like the example below Code:
<if condition="is_member_of($vbulletin->userinfo, X, X, X)"> <li><a class="qmparent" href="javascript:void(0)">ADMIN & MODS ONLY</a> <ul> <li><a href="http://www.ukbusinesslive.co.uk/forum/profile.php?do=editavatar" title="Edit Avatar">Edit Avatar</a></li> <li><a href="http://www.ukbusinesslive.co.uk/forum/profile.php?do=editsignature" title="Edit Signature">Edit Signature</a></li> <li><a href="http://www.ukbusinesslive.co.uk/forum/profile.php?do=editoptions" title="Edit Options">Edit Options</a></li> <li><span class="qmdivider qmdividerx" ></span></li> <li><a href="http://www.ukbusinesslive.co.uk/forum/subscription.php?do=viewsubscription" title="List Subscriptions">List Subscriptions</a></li> </ul></li> </if> <li><span class="qmdivider qmdividery" ></span></li> <li><a class="qmparent" href="javascript:void(0)">PRIVATE MESSAGES</a> <ul> <li><a href="http://www.ukbusinesslive.co.uk/forum/private.php" title="List Messages">List Messages</a></li> <li><a href="http://www.ukbusinesslive.co.uk/forum/private.php?do=newpm" title="Send New Message">Send New Message</a></li> <li><a href="http://www.ukbusinesslive.co.uk/forum/private.php?s=&pp=&folderid=-1" title="Sent Messages">Sent Messages</a></li> <li><a href="http://www.ukbusinesslive.co.uk/forum/private.php?do=trackpm" title="Track Messages">Track Messages</a></li> <li><a href="http://www.ukbusinesslive.co.uk/forum/private.php?do=editfolders" title="Edit Folders">Edit Folders</a></li> </ul></li> The bottom block is viewable by everyone Hope that helps :up: The |
#3
|
|||
|
|||
It looks like that condition is exactly what I needed, thank you very much!
--------------- Added [DATE]1234220413[/DATE] at [TIME]1234220413[/TIME] --------------- Added it to my template, works perfectly, thanks again for the tip on that function! |
#4
|
|||
|
|||
Glad to help
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|