vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Help With Drop Down Menu (https://vborg.vbsupport.ru/showthread.php?t=296109)

betts02 03-14-2013 03:47 PM

Help With Drop Down Menu
 
I have searched and found noting that suits what i need or want so here goes:

I have a simple drop down on my forums by the following:

Create plug in with process_template_complete and add
PHP Code:

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

Create template and add
HTML 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">Events</a>
<ul class="popupbody popuphover">
<li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="Link 1">Link 1</a></li>
<li><a style="text-indent: 0px; color:{vb:stylevar navbar_selected_popup_body_a_Color}" href="Link 2">Link 2</a></li>
</ul>
</li>

Additional.css template i also have

HTML Code:

.navtabs ul.popupbody {
top: 21px;
}

This works fine for a single drop down menu and has been since i installed it

What i want to know is what code would i put for a double drop down menu ?

So that when i hover over say Link 1 it shows further menu items

Many thanks in advance

tbworld 03-14-2013 06:57 PM

It is just another ul, li, list in html, but unfortunately you will have to create your own JavaScript to handle collapsing *accordion style" or hiding "cascading style". I handled it by rewriting vbulletin-core.js and then adding some simple support JavaScript to handle the collapsing and hiding.

Popupctrl does not natively support hover, but that is an easy fix, but you will want to add a mouse-over, mouse-out event/feature or it will be a lousy experience for the end user.

Take a look at a few menus over at directdrive.com. I can help you further when you have a more direct question. Good Luck!


All times are GMT. The time now is 01:16 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.01684 seconds
  • Memory Usage 1,714KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete