![]() |
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?
|
thanks... needed this
|
Is there any way someone could do this for me?
If you can here are the details: I want the super moderators and the administrators to be able to see the link. I want the dropdown menu name to be Administration. Inside of it, I want there to be two links. Admin CP and Mod CP. Admin CP is the link only members of the usergroup Administrators can see. And Mod CP is the link only members of the usergroup Super Moderators can see. Is that going to be a problem doing this for me? I will appriciate it if you do. :) PS: I need to learn the scripting of the templates better, lol. |
Ok here ya go:
Go into your adminCP ->Styles and templates -> style manager -> default style -> select edit templates -> scroll down to 'navigation/breadcrump templates'and double click that -> navbar Like Jennifer K says Find: HTML Code:
<if condition="$show['member']"> HTML Code:
<if condition="is_member_of($bbuserinfo,5,6,7)"> HTML Code:
5,6,7 If you dont want your super mods to see this then delete HTML Code:
5, Then find: HTML Code:
<if condition="$show['member']"> HTML Code:
<if condition="is_member_of($bbuserinfo,5,6,7)"> Edit: do not mind the colors above. The automerge function of this site is causing this. So, here is my new post: I'd like to add a link to the staff links menu which shows moderators unread posts in their forums. How can I do that? |
Thanks a lot, was just going to look for this on Google - haha.
|
Thanks! :D Many thanks!
|
Really needed a drop down to show more links so it would fit on the page many thanks
|
In the 'User CP' drop down on the navbar here at vb.org, the top link is 'user control panel'. It is both dark blue, has bold white font and it is linked. What is the 'td class' value for this?
i.e. I currently have Code:
<td class="vbmenu_option"> |
thx
|
grat job dude. thanks alot
|
If i wanted to add multiple different Drop down boxes (i.e 2 separate boxs) How would I go about this?
|
All times are GMT. The time now is 08:37 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:
|