vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] How to Add Drop Down Navigation Items to the Navbar (https://vborg.vbsupport.ru/showthread.php?t=228338)

sulasno 03-05-2010 05:01 AM

post deleted

never mind; I got it working

thanks to the original contributor

ageurtse 03-21-2010 06:14 AM

did someone managed to do sub - sub menu's on the navbar like in post 13
i realy need that.

AfterWorldForum 05-19-2010 06:23 PM

Great article.

Any way to get the template cached, though? I have debub mode turned on, and this template is the only one that seems to be not cached.

Thanks.

Peter.

--------------- Added [DATE]1274379546[/DATE] at [TIME]1274379546[/TIME] ---------------

Hmm. I also have the problem with the navbar background not changing color when highlighted. Removing the style stuff works, but then the arrow icon dissappears.

Using IE8, but also no luck in FF.

Code:

<li class="popupmenu">
<a href="javascript://" class="popupctrl navtab" style="background:transparent url({vb:stylevar imgdir_misc}/arrow.png) no-repeat {vb:stylevar right} center; padding-right: 15px"><img src="images/entropiaplanets/process.png" border="0" align="top" alt="EntropiaPlanets Tools" />&nbsp;&nbsp;EP Tools</a>
<ul class="popupbody popuphover">
                <li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="business.php">Yellow pages</a></li>
                <li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.entropiaplanets.com/forums/vbay.php">Auction</a></li>
                <li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.entropiaplanets.com/forums/misc.php?do=cchatbox">Chat</a></li>
                <li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.entropiaplanets.com/forums/vbugs.php">Bug tracker</a></li>
                <li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="http://www.entropiaplanets.com/forums/missions.php">Mission tracker</a></li>
</ul>
</li>


AfterWorldForum 05-24-2010 07:07 AM

Found out how to get the caching working. I created a new plugin, linked it to the hook cache_templates, and used the following code to cache the template:

Code:

$cache = array_merge($cache, array('<template_name>'));

AfterWorldForum 06-01-2010 04:31 PM

Anyone got a working solution for the non-changing background colour by any chance? I have not yet managed to get that bit working.

merk_aus 06-13-2010 02:06 AM

Thanks worked brilliantly straight out of the box - have bookmarked it to add additional functionality to our site in the coming days this is absolutely brilliant.

mordor1 06-20-2010 10:08 AM

Great tutorial works fine even in 4.04

wpeloquin 06-24-2010 06:37 PM

1 Attachment(s)
Is there any way to make the default "Forum" navtab a dropdown, instead of adding a new tab?

I run a gaming board that hosts multiple games, guilds/clans, etc. I wish to make the Forum navtab a dropdown that i can then have the links to the various areas on the board. I followed this tutorial to create a plugin/template to help show what i am looking to do.

I figure i could remove the default "Forum" tab and replace it with the new one, but i was wondering if it can just be done on the current, default tab.

Steph H 07-15-2010 12:19 AM

Thank you! After a little trial and error, I got this to work wonderfully on our site. I appreciate the help!

reefland 08-05-2010 09:27 PM

Lynn or anyone,

Any ideas how to make this menu stay on top of a .swf file? I have a .swf advert in ad_below_navbar and the dropdown menu slides behind the advert.

Ideas welcomed.

eues 08-13-2010 10:46 PM

Quote:

Originally Posted by simonhind (Post 1947401)
does anyone know how to make this a clickable link

Code:

<li class="popupmenu">
<a href="javascript://" class="popupctrl navtab" style="background:transparent url(images/misc/arrow.png) no-repeat {vb:stylevar right} center; padding-right: 15px">Webmaster Links</a>

when you click it i want to be able to do to a page


i tried

Code:

<li class="popupmenu">
<a href="webmaster.php" class="popupctrl navtab" style="background:transparent url(images/misc/arrow.png) no-repeat {vb:stylevar right} center; padding-right: 15px">Webmaster Links</a>

doesnt work

I would like to know this too please!!

tech4c 08-25-2010 07:22 PM

thanks

NashChristian 09-13-2010 07:07 AM

THIS is Eric's Original Objective & Problem:
Quote:

Originally Posted by Eric Anderson (Post 1922362)
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.

This response does NOT make sense to me, because it does NOT maintain Eric's Objective:
Quote:

Originally Posted by mabersoft (Post 1929343)
PHP Code:

<li class="popupmenu">
<
a href="javascript://" class="popupctrl navtab" style="background:transparent url({vb:stylevar imgdir_misc}/arrow.png) no-repeat {vb:stylevar right} center; padding-right: 15px">Vmax4.com Pages</a>
<
ul class="popupbody popuphover">
<
li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink1.php">SubLink 1</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink2.php">SubLink 2</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink3.php">SubLink 3</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink2.php">SubLink 2</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink3.php">SubLink 3</a></li>
</
ul

Try this. This has arrow.

YES, the arrow works, but the tab is NOT highlight when hovered or clicked like the rest of the tabs (which was the whole point).

Finally, this approach PARTIALLY works:
Quote:

Originally Posted by Pod (Post 1930383)
You can try to add the arrow manually:
PHP Code:

<a href="javascript://" class="popupctrl navtab">Vmax4.com Pages <img src="{vb:stylevar imgdir_misc}/arrow.png" style="vertical-align: middle;" /></a


The problem is that this arrow does NOT change color along with the text color. In other words, it remains white even when the tab color is white (or near white), and is then invisible.

Am I doing something wrong or does ANYONE have a solution to this?

--------------- Added [DATE]1284366171[/DATE] at [TIME]1284366171[/TIME] ---------------

Quote:

Originally Posted by reefland (Post 2079787)
Any ideas how to make this menu stay on top of a .swf file? I have a .swf advert in ad_below_navbar and the dropdown menu slides behind the advert.

Love to hear a reply on this conflict!

Anyone?

--------------- Added [DATE]1284366378[/DATE] at [TIME]1284366378[/TIME] ---------------

Quote:

Originally Posted by anilsaxena (Post 1949316)
I noticed that user has to click first then only on hover it automatically shows drop-down. Is there a way to show drop-down without click?

Love to hear an answer to this issue too!

Anyone?

--------------- Added [DATE]1284366699[/DATE] at [TIME]1284366699[/TIME] ---------------

Quote:

Originally Posted by ukwoman (Post 1977805)
How do I do the same thing but with no subnav? For example I just want to show calendar on the main Nav bar.

Finally, an answer to this would be VERY helpful. I'd like to be able to use a different customized subnav for each of my primary pages (forums, blogs, groups...).

This mod would be tremendously useful if we could get these minor issues addressed.

Thanks for the mod and for any help!
:D Jeff

--------------- Added [DATE]1284404633[/DATE] at [TIME]1284404633[/TIME] ---------------

I've started a new thread HERE for anyone who wants to follow or participate in the development of the modifications above.

Parture 09-16-2010 08:02 PM

For my drop down box how do I get the hover color to be the same as the normal tabs?

See here...
http://biblocality.com/forums/forum.php

Parture 09-23-2010 10:00 PM

Anyone figure out how to get the hover color to change at the same time keeping the arrow and getting the arrow to change color as well?

See what the problem is here...
http://biblocality.com/forums/forum.php

Parture 09-29-2010 01:00 AM

As a result of changing colors in style variables, my drop down boxes span the whole screen. Something went haywire with this plugin.

Actually I don't know this is the cause. All I know is that the drop down boxes span the whole screen in IE and the username is bolden and larger when using IE, but with Firefox it is still the same. This just happened when I was playing with the style variable settings.

merk_aus 01-01-2011 11:36 AM

Can someone please help me find out what i need to do to get this to appear at the beginning of the navbar before the home/forum tabs.

Lynne 01-01-2011 04:09 PM

Quote:

Originally Posted by merk_aus (Post 2142247)
Can someone please help me find out what i need to do to get this to appear at the beginning of the navbar before the home/forum tabs.

You need to look at the navbar template and pick a template_hook that is at the beginning of the navtab bar - the example in the first post used the template_hook at the end of the navtab bar. You may also need to change the execution order for the plugin if you have two plugins trying to use the same template_hook.

merk_aus 01-02-2011 04:03 AM

Quote:

Originally Posted by Lynne (Post 2142330)
You need to look at the navbar template and pick a template_hook that is at the beginning of the navtab bar - the example in the first post used the template_hook at the end of the navtab bar. You may also need to change the execution order for the plugin if you have two plugins trying to use the same template_hook.

Thanks lynne you are a true asset to this website.

Sarcoth 01-04-2011 12:53 PM

Is there a way to control the execution order from outside the plugin? I have the following setting in my product script:

<setting varname="showroster_navbar_order" displayorder="20">
<datatype>posint</datatype>
<validationcode><![CDATA[return ($data >= 1);]]></validationcode>
<defaultvalue>5</defaultvalue>
</setting>

I cannot find anything that would allow me to adjust the order like the location (navtab_start, navtab_middle, and navtab_end). Those work fine, it is the ordering I cannot get to work. Any ideas?

Edited: Sorry, this probably is not the correct place to ask. I've asked the question in a coder's forum instead. Thank you.

abdulbasitsaeed 01-06-2011 06:43 AM

Quote:

Originally Posted by Eric Anderson (Post 1922362)
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.

Template:
PHP Code:

<li class="popupmenu">
<
a href="javascript://" class="popupctrl navtab">Vmax4.com Pages</a>
<
ul class="popupbody popuphover">
<
li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink1.php">SubLink 1</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink2.php">SubLink 2</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink3.php">SubLink 3</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink2.php">SubLink 2</a></li>
<
li><a style="color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="sublink3.php">SubLink 3</a></li>
</
ul


Thank you very much for this, Eric Anderson. It works perfectly on 4.0.6.

I must agree with NashChristian. I am unable to insert the arrow image in a satisfactory manner. Also, the margin on the right of the text seems to be more than on the left.

http://forums.pakfellows.com/

Lynne (or anyone else), do you think you could please help us out with this one? :)

albanah 01-17-2011 02:33 PM

Quote:

Originally Posted by ywwz (Post 1940035)
Substituting 'navtab_middle' for 'navtab_end' places it after the Forum tab and before the Blogs tab.============================

can i use Begin instead of middle or end?

you cannot use Begin.

Use the following code and it will display BEFORE forum, immediately after Home tab

Quote:

global $template_hook;
$newTemplate = vB_Template::create('dropdown_newtab');
$template_hook['navtab_start'] .= $newTemplate->render();

Da-Vinci 04-08-2011 07:01 PM

Can anybody point me in the right direction of how to do this?

https://vborg.vbsupport.ru/external/2011/04/17.jpg

RobbieZ 04-23-2011 12:53 PM

Quote:

Originally Posted by Da-Vinci (Post 2182393)
Can anybody point me in the right direction of how to do this?

https://vborg.vbsupport.ru/external/2011/04/17.jpg

UKBL created a quality dropdown menu system for 3.8 > https://vborg.vbsupport.ru/showthread.php?t=203521

I changed the code so sub-foums would appear by utilizing the same code for drop down, OK it was a lot of messing about and a lot of code, seriously wrecked my head at times but the end product was great!

I have never tried it on VB4 but I do have a few days off next week and may do this as a mini project on my test forum!

I would need a link to the skin your using in your OP.

Da-Vinci 04-23-2011 07:34 PM

Wow cheers Robbie, that would be great, I've got it on the default skin on my VB4 forum, the image above is something somebody else posted on page 1 I just used it to demonstrate the effect I was after.

I was looking at this

http://www.dynamicdrive.com/dynamici...menu/index.htm

As a possible way to get the submenu effect.

Edit:

I thought it might be better to post in the programming discussion forum to stop this article going off topic, so I've posted here. https://vborg.vbsupport.ru/showthread.php?p=2187926

XiTCLUB 04-25-2011 09:18 PM

great work

Mustiii 04-26-2011 02:59 PM

I have a question how must i modify the code to add dropdown items to the subnavbar as you can see on the picture?

https://vborg.vbsupport.ru/external/2011/04/11.png

Thanks for any help

Da-Vinci 04-27-2011 09:12 AM

Quote:

Originally Posted by Mustiii (Post 2188901)
I have a question how must i modify the code to add dropdown items to the subnavbar as you can see on the picture?

https://vborg.vbsupport.ru/external/2011/04/11.png

Thanks for any help

That's covered in this article.

https://vborg.vbsupport.ru/showthread.php?t=232579

https://vborg.vbsupport.ru/attachmen...1&d=1262991479

albanah 04-29-2011 07:54 PM

installed.
it works very well for 4.1.2
Many thanks

BRotondi 04-29-2011 11:03 PM

1000 Thanks for the infos! How can I make the pull-down appear without click, simply when hovering?

Thanks!
Bruno

Mukashi 05-26-2011 12:59 PM

Another interested person wondering how either
a) The arrow can be kept while having the tab highlight as other tabs do
b) The pull-down menu appear on hover, instead of on click.

I'd also be interested in how we can do something which I'd imagine is much more simple....just add a new tab that would function as an external link when clicked. Just want a nice quick link to places such as my Wiki. ^^;

SuperTaz 05-28-2011 01:14 AM

Works great for all my FPS games stat tracker links.

joshtrav 06-14-2011 08:24 PM

I have seen a lot of folks asking how to do the down arrow so that it would highlight properly, as well as the background.

Using this code:
Code:

<a href="javascript://" class="popupctrl navtab">Drop Bombs ▼</a>
instead of this:
Code:

<a href="javascript://" class="popupctrl navtab" style="background:transparent url({vb:stylevar imgdir_misc}/arrow.png) no-repeat {vb:stylevar right} center; padding-right: 15px">Drop Bombs</a>
worked well for us.

To get the down arrow use the ampersand code #9660;

marlera 06-18-2011 10:00 AM

Great article, tnx!

lucky_one07 06-27-2011 09:11 AM

thanks alot this is what i was looking for

LordEd 06-27-2011 07:33 PM

So I got this working, except.. I am not totally pleased with the location I put it in.

What other options are there to the navtab_ function when using the CMS? Alternatively, if anyone could explain how I could find the alternatives myself that would be wicked :)

malmazan 06-28-2011 09:49 PM

It would be nice to know how to select background, text and hover colors so that they are different to the subNavBar ones.

I personally prefer this arrow: src="{vb:stylevar imgdir_misc}/menu_open.gif
and its different from the one used in the subNav.

CouponWCents 06-29-2011 05:12 PM

Thank you soooo much!!

Truth66 07-02-2011 01:57 AM

Hi,

I have a mystery with this drop down tab.

I've had it working on my site for a while. Today, just for the heck of it I tested my site in Google Chrome.
In Google Chrome, the Title wording of the tab appears below tab and the tab is blank. When I click onto the Title, the drop down menu appears.
This does not happen in Internet Explorer 8.

The same thing happens in Firefox.

In addition when viewing my site in Google Chrome and Firefox, the tab does highlight, but doesn't highlight in Internet Explorer 8

Any ideas how to correct this mystery with Google Chrome & Firefox?

Thanks.

Littlerocket 10-15-2011 05:44 PM

Nice little mod. Anyone have any ideas how to reduce the box size?

www.toxicplanet.co.uk

I take it it's some global setting somewhere and unrelated to this actual mod. Cheers


All times are GMT. The time now is 10:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02090 seconds
  • Memory Usage 1,865KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (3)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete