PDA

View Full Version : Menu Permission


Ksb2050
06-15-2015, 05:18 AM
I want to set a menu item to only show for guests. I want it to hide said menu item for any other usergroup.

I can see that if I go into the menu I can set "Show Permission Name". If I put "member" in the blank it only shows the menu item for those logged in.

I need the complete opposite and I can't figure out how to do it. I've typed "guest" and "unregistered" and it hides the menu item instead for all usergroups.

How can I achieve what I need to do?? :confused:

ForceHSS
06-15-2015, 05:23 AM
Dont think that can be done for default vb but can be coded am sure someone will give you the coding for it soon

Daniel
06-15-2015, 07:42 AM
You will need to make a plugin

Product: vBulletin
Name: Only unregistered sees link in navbar
Hook location: global_state_check
if($vbulletin->userinfo['usergroupid'] == 1)
{
$show['unregistered'] = true;
}else{
$show['unregistered'] = false;
}Plugin is Active: Yes

--

Now go back to your Navigation Manager
Edit the link you want
In show permission name type "unregistered" (no quotes)

Note for other people: It doesn't have to be unregistered or usergroupid 1. Customize it for admins (usergroupid 6), registered users (usergroupid 2), etc.

squidsk
06-15-2015, 01:11 PM
Cleaner php for the same thing would be:

$show['unregistered'] = !show['member'];