PDA

View Full Version : Show Permission


CaptainAwesome
05-10-2014, 08:25 AM
While looking and editing the Nav bar, i came across:

This determines which variable(s) in the vBulletin $show array will be used to decide if the element should be displayed. For instance 'member' means it will only display if $show['member'] is true. Multiple variables can be specified by joining them with a dot. All of them must then be true for the element to display.

Does this mean i could limit who sees the articles/blog based on their user group? And if so, does that mean only they can see the button or could everyone see it but just not access the content?

Thanks

kh99
05-10-2014, 09:56 AM
You *could* use that feature to control which usergroups can see the Article or Blog tabs, if there were a $show variable that was either true or false. You'd need a plugin to check a user's group and set a variable in $show.

But that only controls the display of the tabs or other navigation elements. It wouldn't stop a user from going there if there's a link somewhere else (or if they know the url).

CaptainAwesome
05-10-2014, 10:34 AM
Thanks for the info :)

tipoboy
05-13-2014, 03:06 PM
you would add our plugin and use the hook location

load_show_variables

then your plugin would be
if (is_member_of(vB::$vbulletin->userinfo, 6, 7, 2, 5))
{
$show['xxxxx'] = true;
}

changing the usergroups the the usergroups you wish to see the tab and changing the 'xxxxx' in the code to your unique forum permission name for use when adding your tab

HTH