The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding a tab on the navbar using ACP
I have added some tabs to the navbar by adding a script like this in the navbar file:
PHP Code:
In the ACP settings menu -> navigation manager you can add tabs on the navbar. (v4.2.0) However, i can't get it to work. Product: OK Title: OK Target URL: OK Active: OK Order: OK Show permission name: HELP!!!!!! Whatever i do, i get this error: Error: The specified 'show' variable is invalid. The help says this: Show Permission 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. How do I transform the code above to a code that will be accepted? I also don't know if and how i have to use the Tab script(s) variable. |
#2
|
|||
|
|||
The "Show Permission Name" field (if you use it) needs to be a dot-separated list of keys into the $show array (which is a global variable used in the vb code), and the tab will only be shown if they are all true. In your case, I'm assuming there is no $show variable that matches the if statement in your existing code. So you could make a plugin to set a variable in the $show array. But I think maybe the easiest thing would be for you to leave the "SHow Permission Name" field blank, and create a plugin using hook check_navigation_permission and set the variable $retval to true or false depending on if you want your tab to show, something like:
Code:
if ($retval && $data['name'] == 'identity') { $retval = in_array($vbulletin->userinfo['userid'], array(20,2000,3611,14507)); } To answer your other question, the THIS_SCRIPT field is to decide when your tab should be highlighted as the current tab. Since yours seems to go to the admincp where the tabs aren't shown, you don't need to worry about highlighting (so leave it blank). Same with "Append 'tabid' to URL" - that also has to do with highlighting the current tab. |
#3
|
|||
|
|||
After reading your post, i decided to leave it as it is lol.
It has allways worked, and it still works on 4.2.0 I thought it would be easyer, but never mind. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|