![]() |
Want to add multiple drop-down menus in your Navbar?
I needed this for my new forum but was unable to find a hack that currently does that. So I figured out how to do it myself. I'm sharing it in case anyone else is interested, but please know I am in no way, shape or form a coder, so any help I can give will be extremely limited.
I figured it out by looking at the navbar template and pulling out the chunk of code that makes the "quick links" drop down. I copied it, modified it then added it to the template but it still didn't work (because I didn't realize there were two things that needed to be edited). Ultimately, I went to the online manual at VBulletin.com and searched for popup menu (yes I actually read the manual directions, lol) and used that to help me further. The second drop-down I even added conditionals to make it so only staff sees it is there, and only admins can see some of the links. Here is the code I used with the conditionals (if you want everyone to see it, just edit those out). I have this dropdown after the Quick Links dropdown and this is where I placed the code. Find: HTML Code:
<if condition="$show['member']"> HTML Code:
<if condition="is_member_of($bbuserinfo,5,6,7)"> Find: HTML Code:
<if condition="$show['member']"> HTML Code:
<if condition="is_member_of($bbuserinfo,5,6,7)"> |
COOL! I can get some use out of this! I like the idea of making me and my administrator the only ones who can see the "hidden" RPG link. heheh. Thanks for the script, JK!
PS: Say, you don't know how to embed a new font to your forum, do you? I'm sure it's some easy thing already included as an option somewhere in the panel, but I'm an idiot and can't find it. |
I'm glad you can use it :)
As for the font, off the top of my head I don't remember exactly, but I know in Admin CP you want to go into Styles and Templates and then Style Manager :) |
great article ... thanks for sharing with the community :up:
|
Aww, it didn't work. I got an error that said an </if> tag was mising on line 151. How do I find line 151 and add an </if> tag? Should I post my code up?
What is the 5,6,7 thing for? :p [/noob] |
I'm thinking when you copied and pasted the code, you didn't grab the whole thing, leaving one of the </if> tags off of the end.
The 5,6,7 is for the conditional of who you want the menu to display to. You would need to edit that for your own board - for example, include 5, 6 and 7 if those are the usergroup id numbers for the usergroups you want the menu to display for. |
anyway to get this working in postbit?
|
Quote:
Instead of this : Code:
<if condition="is_member_of($bbuserinfo,5,6,7)"> Code:
<if condition="is_member_of($bbuserinfo,5,6,7)"> |
could you change the is_member_of to select userID instead?
Currently I'm using this: Code:
<if condition="in_array($bbuserinfo['usergroupid'], array(5,6,7,50))"> And I'm using this for useriD.. though it will get confusing having two different types of code to sort out userID's and usergroupID's Code:
<if condition="in_array($bbuserinfo['userid'], array(5,6,7,50))"> |
hmmm, honestly I don't know enough to answer your question, maybe someone else can help?
|
All times are GMT. The time now is 09:20 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|