Hello,
Adapted this to create a link to my main website: Plugin "Main Website Button", on process_template_complete: Code:
$template_hook['navtab_middle'] .= vB_Template::create('Link to Main Website')->render(); Code:
<vb:if condition="$vboptions['selectednavtab'] == 'mainwebsite'"> |
How come when I click on the nav tab, it shows the Forum tab as selected and not the tab I created?
|
Quote:
|
Good article. It worked well. question. if I need to add more tabs do I need to make new templates and hooks?
-CP |
In case anyone is curious and you know how to create a permission group, here is how you can use that group to determine who can see the tab.
FIRST: At the top of the plugin, add a variable for your permission group array: PHP Code:
At the bottom of the plugin, find the following line: PHP Code:
PHP Code:
Open your template and add a line to the top and the bottom. HTML Code:
<vb:if condition="is_member_of($bbuserinfo, $accessgroups)"> HTML Code:
</vb:if> |
I kind of modified this to try and use it with articles as "pages" with the tabs linked to articles.. (and it works, the tabs show as on).... but the HOME button is on too. Is there a way to set the home button to unselected?
Code:
$tabselected = ''; |
I finally figured out a way to add all my variables from my custom page to the navbar. I went about it in a sneaky way.
I first added the following code to my showroster.php file which allowed me to add all the registered variables I wanted to use: PHP Code:
PHP Code:
HTML Code:
<vb:if condition="is_member_of($bbuserinfo, $accessgroups)"> |
Okay I am struggling with this. I want to add a button on my navbar that links to a specific forum, and when a user is viewing that forum for the tab on the navbar to be highlighted.
So this is the information that I used: template name: bb_navbar_events template code: HTML Code:
<vb:if condition="$vboptions['selectednavtab'] == 'navbarevents'"> plugin code: PHP Code:
Should this arrangement be working properly? I want the Events tab to be highlighted when it is on that page, but the Forum tab remains highlighted. Any suggestions? |
How do you do PERMISSIONS with this? I use the following code for permissions in my mods, and it works fine...
Code:
if (!($permissions['medialibperms'] & $vbulletin->bf_ugp_medialibperms['cansubm'])) I am trying to use this code in my plugin, but the permission ALWAYS fails... Code:
if (THIS_SCRIPT == 'media') |
Where do I add these I know to create a new plugin?
|
All times are GMT. The time now is 03:17 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|