vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Navigation Permissions? (https://vborg.vbsupport.ru/showthread.php?t=327241)

I.G.O.T.A. 04-29-2019 07:23 PM

Navigation Permissions?
 
What is the easiest way to set one specific group to view a tab on the navigation bar?

When I add the group in the (Show Permission Name) it doesn't work.

Any ideas?

Thank you,
JJ Smith

MarkFL 04-29-2019 09:39 PM

If you want specific usergroups only to see a navbar tab, then create a plugin hooked at "gloabl_bootstrap_init_complete" with code like this:

PHP Code:

global $vbulletin;
$show['mynavtab'] = false;

if (
is_member_of($vbulletin->userinfo, array(groupid1groupid2, ...)))
{
    
$show['mynavtab'] = true;


Where I have "groupid1, groupid2, ..." you want to put the comma delimited list of usergroups by id that you want to have access to the tab.

And then in the Navigation Manager, in the field labeled "Show Permission Name" put:

mynavtab

You should use your own name for "mynavtab" that indicates the nature of the tab. Make sure they are the same in the plugin and in the Navigation Manager.

I.G.O.T.A. 04-29-2019 10:23 PM

Quote:

Originally Posted by MarkFL (Post 2599190)
If you want specific usergroups only to see a navbar tab, then create a plugin hooked at "gloabl_bootstrap_init_complete" with code like this:

PHP Code:

global $vbulletin;
$show['mynavtab'] = false;

if (
is_member_of($vbulletin->userinfo, array(groupid1groupid2, ...)))
{
    
$show['mynavtab'] = true;


Where I have "groupid1, groupid2, ..." you want to put the comma delimited list of usergroups by id that you want to have access to the tab.

And then in the Navigation Manager, in the field labeled "Show Permission Name" put:

mynavtab

You should use your own name for "mynavtab" that indicates the nature of the tab. Make sure they are the same in the plugin and in the Navigation Manager.

Awesome!

Thank you,
JJ Smith


All times are GMT. The time now is 09:52 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01238 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete