Some people really like the drop down navigation that is found in the Vbulletin 3.0 series, or are looking to add additional drop down navigation to the navbar in Vbulletin 4.0. This plugin and new template will allow you to do that.
First, is to goto the Plugins and Products section, this section is in the left hand column of the admin panel near the bottom. In that section you will need to click the option to "Add New Plugin". Note that the red text from both the plugin and template must be the same. You can name it whatever you want, but they must match.
For the new plugin you will enter the following details.
Hook Location: process_templates_complete Title: Whatever You Want Code:
Code:
global $template_hook;
$newTemplate = vB_Template::create('dropdown');
$template_hook['navtab_end'] .= $newTemplate->render();
For step two. You need to make the template that will be used in the navbar. Simply goto the style manager and in choose "Add New Template" from the options. From there, you just need to enter the following.
Ok trying to put a sublink into a sublink and this is where I got stuck. in the attached I have clicked "Tech Area" and the menu drops down Now "Carbs" is not a link it is a category (highlighted in blue). "Carb Cleaning" "Jetting" are Links under the category "Carbs". I do not want "Carb Cleaning" and "Jetting" to be there till "Carbs" is either Clicked or Hovered and I would like it to appear down and to the right any Ideas?
Thanks
Eric
Plugin
PHP Code:
global $template_hook;
$newTemplate = vB_Template::create('dropdown');
$template_hook['navtab_end'] .= $newTemplate->render();
I modified your code so the tab would highlight when hovered or clicked like the rest of the tabs. Unfortunately I had to lose the arrow. I attached a pic of the change and here is the code.
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.
I modified your code so the tab would highlight when hovered or clicked like the rest of the tabs. Unfortunately I had to lose the arrow. I attached a pic of the change and here is the code.