Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-13-2010, 04:47 PM
NashChristian's Avatar
NashChristian NashChristian is offline
 
Join Date: Jul 2007
Location: Nashville, TN
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default NavTab Drop-Down Menus with Sub-Menu Navbar Replacements - Combining two Mods - HELP!

Hello,

I've been advised to start a help thread on this, so here it is. What I'm trying to do is combine two navbar mods from the following articles:What I'm trying to accomplish is to create NavTabs with drop-down menus, where the tab highlights when hovered over or selected (like the default tab behavior), that also displays the arrow indicating the drop-down menu, and the arrow remains the same color as the text, so it maintains visibility. In addition to this, I'd like to include different navbar subnav menus for the major areas of the website (forums, gallery, event calendar, etc...).

What Lynne's mod doesn't have that I need:
  • Drop-down menus on the TABS themselves.
What Shelby's mod doesn't have that I need:
  • The tab does not highlight when hovered over or selected.
  • There are no tablinks subnav replacements.
I greatly appreciate the work of both Lynne and Shelby in providing these tutorials! I just need some help adapting these for my site.

I've installed three separate tabs on my test site, using the three different methods:
  • GALLERY (Using Lynne's Method)
  • TOOLS (Using Shelby's Method)
  • EVENT CALENDAR (Combining the Two Methods)
The EVENT CALENDAR is the method I will be discussing in the rest of this thread and providing the code for. I'm using the two-step process taught by Shelby, with a PLUGIN and corresponding TEMPLATE. Here is the code that I am currently using:

PLUGIN:
Hook Location: process_templates_complete
Title: NavTab - Calendar
Code:
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'calendar')
{
    $vbulletin->options['selectednavtab']='Event Calendar';
    $tabselected = ' selected';
    $tablinks = '                <ul class="floatcontainer">
                        <li><a href="calendar.php?do=add&type=range&c=1">Add New Event</a></li>                     
                </ul> ';
 
}
 
global $template_hook;
$newTemplate = vB_Template::create('navbar_tab_calendar');
$template_hook['navtab_end'] .= '<li class="popupmenu' . $tabselected . '">' . $newTemplate->render() . $tablinks . '</li>';

TEMPLATE:
Title: navbar_tab_calendar
Code:
<a href="javascript://" class="popupctrl navtab">Event Calendar <img src="{vb:stylevar imgdir_misc}/arrow.png" style="vertical-align: middle; margin-right: -5px;" /></a>
<ul class="popupbody popuphover" style="color:{vb:stylevar navbar_selected_popup_body_a_Color}">
<li><a href="calendar.php?c=1&do=displaymonth" style="text-indent: 0px;">Monthly View</a></li>
<li><a href="calendar.php?c=1&do=displayweek">Weekly View</a></li>
<li><a href="calendar.php?do=add&type=range&c=1">Add New Event</a></li>
</ul>

Here is a link to my TEST SITE (v4.0.6)
It is .htaccess Password Protected (as required by vB).
Credentials are listed below:
.htaccess Username: test
.htaccess Password: help

This will only remain accessible until I find a solution, but I will post any updated code later in this thread so that others can benefit from this as well. This is the only test site that I'm using, so be sure to check the latest post in this thread to ensure there have not been modifications to this code.

Here are the PROBLEMS that I am currently noticing with this code:
  • The submenu isn't working correctly, it is displaying directly beneath the button instead of left aligned. When I add additional subnav links, they list vertically instead of horizontally.
  • The drop-down ARROW is NOT the same color as the text. So when the tab is highlighted, the arrow becomes almost invisible.
  • You have to CLICK on the button to activate the drop-down menu, insead of hovering triggering it.
Here is a Screen Shot:



ANY and ALL help would be greatly appreciated!
Thanks!

Jeff
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:50 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
  • Page Generation 0.05676 seconds
  • Memory Usage 2,459KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete