Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HOW TO - vB4] How add sub-menu drop down to the navbar (tab Forum)
Allan's Avatar
Allan
Join Date: Jun 2003
Posts: 1,513

 

France
Show Printable Version Email this Page Subscription
Allan Allan is offline 01-07-2010, 10:00 PM

This mod add sub-menu drop down to the navbar (tab Forum)

PS: Thank to Lynne for his help

First Method
  • Add new plugin
- Product -> vbulletin
- hook location -> process_templates_complete
- Title -> menu x
- Execution Order -> 5
- Plugin PHP Code

PHP Code:
$template_hook['navbar_end'] .= 
<li class="popupmenu"> 
<a href="javascript://" class="popupctrl">Menu test</a> 
<ul class="popupbody popuphover"> 
<li><a href="http://www.vbulletin-ressources.com/forum">test 1</a></li> 
<li><a href="http://www.vbulletin-ressources.com/forum">test 2</a></li> 
<li><a href="http://www.vbulletin-ressources.com/forum">test 3</a></li> 
</ul> '



Change location
: ($template_hook['navbar_end'] in my example)

- navbar_end -> At the end to the navbar
- navbar_start -> At the beginning of the navbar
- navbar_after_getnew -> After "New Posts"
- navbar_after_pm -> After "Private Messages"
- navbar_after_faq -> After "Faq"
- navbar_after_calendar -> After "Calendar"
- navbar_after_community -> After "Community" button


Second method
  • In the "navbar" template, find:
PHP Code:
{vb:raw template_hook.navbar_end}
                </
ul>
            </
li>
        <
vb:elseif condition="$vboptions['selectednavtab']=='usercp'" /> 
  • Add above:
PHP Code:
<li class="popupmenu">
<
a href="javascript://" class="popupctrl">Menu test</a>
<
ul class="popupbody popuphover">
<
li><a href="http://www.vbulletin-ressources.com/forum">test 1</a></li>
<
li><a href="http://www.vbulletin-ressources.com/forum">test 2</a></li
<
li><a href="http://www.vbulletin-ressources.com/forum">test 3</a></li>   
</
ul>
</
li
  • Result:


PS: Just change the links and titles.
Attached Images
File Type: jpg menu.jpg (16.3 KB, 0 views)
Reply With Quote
  #52  
Old 11-03-2012, 11:07 AM
tambo's Avatar
tambo tambo is offline
 
Join Date: Aug 2008
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha... I'm afraid you might need to guide me a little more than that.

Is it possible to modify the code above so that I can understand where that variable would go and how it would be passed over to the javascript / hyperlink?
Reply With Quote
  #53  
Old 11-03-2012, 04:41 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try something more like:

http://www.example.com/search.php?do=process&query={vb:raw bbuserinfo.username}
Reply With Quote
  #54  
Old 11-05-2012, 06:46 PM
tambo's Avatar
tambo tambo is offline
 
Join Date: Aug 2008
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, Lynne.... you absolute star!

Thankyou.

<3
Reply With Quote
  #55  
Old 05-01-2013, 06:35 PM
Blue-Inc Blue-Inc is offline
 
Join Date: Mar 2006
Location: United Kingdom
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where can I find the CSS for the drop down menu?

I'd like to customise the CSS to my own liking for my forum and add it to additional.css!

Thanks.
Reply With Quote
  #56  
Old 05-04-2013, 05:22 AM
Jpolola Jpolola is offline
 
Join Date: Mar 2011
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can`f find second method (navbar template on VB 4.2.0 PL3
HTML Code:
<div id="navbar" class="navbar">
	<ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
		{vb:raw template_hook.navtab_start}
		{vb:raw navigation}
		{vb:raw template_hook.navtab_end}
	</ul>
	<vb:if condition="$vboptions['enablesearches']">
		<div id="globalsearch" class="globalsearch">
			<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
				<vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
				<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
				<input type="hidden" name="do" value="process" />
				<span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
				<span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search<vb:if condition="$stylevar['textdirection'] == 'rtl'">_rtl</vb:if>.<vb:if condition="is_browser('ie') AND !is_browser('ie', 7)">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
			</form>
			<ul class="navbar_advanced_search">
				<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
				{vb:raw template_hook.navbar_advanced_search}
			</ul>
		</div>
	</vb:if>
</div>
</div><!-- closing div for above_body -->

<div class="body_wrapper">
<div id="breadcrumb" class="breadcrumb">
	<ul class="floatcontainer">
		<li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>
		{vb:raw navbits.breadcrumb}
		{vb:raw navbits.lastelement}
	</ul>
	<hr />
</div>

{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}

<vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'">
	<form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
		<input type="hidden" name="do" value="dismissnotice" />
		<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
		<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
		<input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
		<input type="hidden" name="url" value="{vb:raw return_link}" />
		<ol>
			{vb:raw notices}
		</ol>
	</form>
</vb:if>
--------------- Added [DATE]1367648798[/DATE] at [TIME]1367648798[/TIME] ---------------

Any Idea how to add this code
PHP Code:
<li class="popupmenu">
<
a href="javascript://" class="popupctrl">Menu test</a>
<
ul class="popupbody popuphover">
<
li><a href="http://www.vbulletin-ressources.com/forum">test 1</a></li>
<
li><a href="http://www.vbulletin-ressources.com/forum">test 2</a></li
<
li><a href="http://www.vbulletin-ressources.com/forum">test 3</a></li>   
</
ul>
</
li
Reply With Quote
  #57  
Old 04-30-2014, 07:43 PM
StonePilot StonePilot is offline
 
Join Date: Jan 2007
Location: Texas
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems people don't want to mess with updating this anymore.

Mega Menu? Nested dropdowns? Put a menu with links inside a menu?
Reply With Quote
  #58  
Old 04-30-2014, 08:08 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by StonePilot View Post
Seems people don't want to mess with updating this anymore.

Mega Menu? Nested dropdowns? Put a menu with links inside a menu?
This article covers one thing - adding a sub-menu downdown to the navbar. There is nothing in the description that says anything about covers those other items.
Reply With Quote
Reply


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 09:25 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06218 seconds
  • Memory Usage 2,330KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_html
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (2)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (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_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
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete