Quote:
Originally Posted by taffy056
Can I ask how would you set this so only certain usergroups would see the links, and the tabs?
Thanks
|
You would need to add this code:
PHP Code:
if (is_member_of($vbulletin->userinfo, 5, 6, 7, 17, 19, 18, 39))
{
some code in here blah blah
}
So you would end up with something like this:
PHP Code:
if (is_member_of($vbulletin->userinfo, 5, 6, 7, 17, 19, 18))
{
global $template_hook;
$newTemplate = vB_Template::create('dropdown');
$template_hook['navtab_end'] .= $newTemplate->render();
}
Remember when deleting groups from the code, not to leave a comma at the end. Or you will get errors. If you notice I have a few different groups added to mine.
You can also set up two or more tabs to have drop downs and only be visible to some user-groups by doing the following:
PHP Code:
if (is_member_of($vbulletin->userinfo, 5, 6, 7, 19, 18))
{
global $template_hook;
$newTemplate = vB_Template::create('dropdown');
$template_hook['navtab_end'] .= $newTemplate->render();
}
if (is_member_of($vbulletin->userinfo, 5, 6, 17, 19, 18))
{
global $template_hook;
$newTemplate = vB_Template::create('dropdown2');
$template_hook['navtab_end'] .= $newTemplate->render();
}
I added the usergroup code to the second tab and then just changed the group numbers to match my needs.
This will also require you to create a new template also. So don't forget about that.