Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 02-17-2009, 02:23 AM
Wyzrd Wyzrd is offline
 
Join Date: Dec 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Replace FAQ in NavBar with new Link similiar to community

I want to replace the FAQ link in the navbar with a drop down menu like on the community link. I want the new link to be call affiliates. Then have it dropdown to show a list of other sites.
Reply With Quote
  #2  
Old 02-17-2009, 02:48 AM
TigerC10's Avatar
TigerC10 TigerC10 is offline
 
Join Date: Apr 2006
Location: Austin, TX
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll have to edite the template. To do that...

Admin CP > Styles and Templates > Style Manager > Your Style > Edit Templates > Navigation / Breadcrumb Templates > navbar

Look for this code:
Code:
<td class="vbmenu_control"><a rel="help" href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
Replace it with:
Code:
<td class="vbmenu_control"><a id="affiliates" href="$show[nojs_link]#affiliates" rel="nofollow" accesskey="6">Affiliates</a> <script type="text/javascript"> vbmenu_register("affiliates"); </script></td>

Then find this code:
Code:
<if condition="$show['communitylink']">
Add this code above it:
Code:
	<!-- affiliates link menu -->
	<div class="vbmenu_popup" id="affiliates_menu" style="display:none;margin-top:3px" align="$stylevar[left]">
		<table cellpadding="4" cellspacing="1" border="0">
		<tr><td class="thead">Our Affiliates</td></tr>
		<tr><td class="vbmenu_option"><a href="http://www.google.com/">Google</a></td></tr>
		</table>
	</div>
	<!-- / affiliates link menu -->
Repeat the code in red for each website you want listed in there. Optionally, you can add vbphrases for the word "Affiliates" and/or "Our Affiliates" replace it accordingly.
Reply With Quote
  #3  
Old 02-17-2009, 03:08 AM
Wyzrd Wyzrd is offline
 
Join Date: Dec 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I knew it was a template edit but I wasn't sure what exactly to change it to. Now one more question. How do I set it so when they click it, it opens in a new tab or window.
Reply With Quote
  #4  
Old 02-17-2009, 03:13 AM
TigerC10's Avatar
TigerC10 TigerC10 is offline
 
Join Date: Apr 2006
Location: Austin, TX
Posts: 616
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, my bad. I forgot about that. Edit the code in red like so:

Code:
<tr><td class="vbmenu_option"><a href="http://www.google.com/" rel="external" target="_blank">Google</a></td></tr>
The target="_blank" part is depricated so it's optional (you really don't need it) - but if you want to support some ridiculously old web browsers then leave it in there.
Reply With Quote
  #5  
Old 02-17-2009, 04:42 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A readily readable article explains how to add drop-down menus: https://vborg.vbsupport.ru/showthread.php?t=122523.
Reply With Quote
  #6  
Old 02-17-2009, 09:52 AM
Wyzrd Wyzrd is offline
 
Join Date: Dec 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for all your help Tiger. Sorry Dismounted I looked and couldn't find that.
Reply With Quote
Reply

Thread Tools
Display Modes

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:51 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.04351 seconds
  • Memory Usage 2,205KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • 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