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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2011, 10:06 AM
MaXimus MaXimus is offline
 
Join Date: Nov 2011
Location: Dubai, U.A.E.
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to add "Home" Button to my forums?

How can I add a Home Button (as shown below in the image) to have it link to my main website?



My main website URL is: http://bbmatrix.net (just in-case there was some code that you needed to give me)

Thanks

My forums are running on the latest official vBulletin v4.1.8
Reply With Quote
  #2  
Old 11-16-2011, 12:17 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could do this: edit the navbar template and add the part in red (this section is at the very top of the template code):

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:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">
                        <li><a class="navtab" href="bbmatrix.net">Home</a></li>
			<li class="selected"><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a>
Reply With Quote
2 благодарности(ей) от:
MaXimus, sakamoto ryoma
  #3  
Old 11-16-2011, 12:35 PM
MaXimus MaXimus is offline
 
Join Date: Nov 2011
Location: Dubai, U.A.E.
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
You could do this: edit the navbar template and add the part in red (this section is at the very top of the template code):

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:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">
                        <li><a class="navtab" href="bbmatrix.net">Home</a></li>
			<li class="selected"><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a>
Thank you for your reply

When I added the code in red,

The Home Button did appear BUT, it takes me to >>> http://bbmatrix.net/forums/bbmatrix.net

which is an invalid URL obviously, why is it having the bbmatrix.net/forums as a prefix?

I just want it to direct to http://bbmatrix.net

Thank you

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

Ahh I fixed it!

Had to change the code from:

<li><a class="navtab" href="bbmatrix.net">Home</a></li>

to

<li><a class="navtab" href="http://bbmatrix.net">Home</a></li>


That was simple!

Thank you very much for guiding me! I really appreciate it!
Reply With Quote
  #4  
Old 11-16-2011, 12:45 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Matrix Leader View Post
Ahh I fixed it!...

That was my fault, you did post the url you want to go to and I didn't use it. Anyway, glad you got it working.
Reply With Quote
  #5  
Old 11-16-2011, 01:02 PM
MaXimus MaXimus is offline
 
Join Date: Nov 2011
Location: Dubai, U.A.E.
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
That was my fault, you did post the url you want to go to and I didn't use it. Anyway, glad you got it working.
Cheers man!

Thanks for your help!
Reply With Quote
  #6  
Old 11-18-2011, 07:40 AM
vbuser70 vbuser70 is offline
 
Join Date: Nov 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
You could do this: edit the navbar template and add the part in red (this section is at the very top of the template code):

Code:
                        <li><a class="navtab" href="bbmatrix.net">Home</a></li>
Can you tell me, what do I need to use instead of "Home" if I want to have a variable instead of a text string (so I can use different button names for different languages) ?

Thanks in advance !
Reply With Quote
  #7  
Old 11-18-2011, 10:12 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vbuser70 View Post
Can you tell me, what do I need to use instead of "Home" if I want to have a variable instead of a text string (so I can use different button names for different languages) ?

Thanks in advance !
You just need to add a phrase in the phrase manager (use Phrase Type GLOBAL). Then in the navbar template, use {vb:rawphrase varname}, where "varname" is the Varname you entered when you created the phrase. Then you should be able to add translations for all your languages.
Reply With Quote
  #8  
Old 11-18-2011, 03:50 PM
vbuser70 vbuser70 is offline
 
Join Date: Nov 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
You just need to add a phrase in the phrase manager (use Phrase Type GLOBAL). Then in the navbar template, use {vb:rawphrase varname}, where "varname" is the Varname you entered when you created the phrase. Then you should be able to add translations for all your languages.
It's exactly what I was asking for, thank you !
Reply With Quote
  #9  
Old 11-25-2011, 09:04 AM
vbuser70 vbuser70 is offline
 
Join Date: Nov 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just discovered my buttons disappear when I go to Blogs, how to have them displaying there as well ?
Reply With Quote
  #10  
Old 04-03-2012, 06:27 AM
MaXimus MaXimus is offline
 
Join Date: Nov 2011
Location: Dubai, U.A.E.
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks a lot! great tips
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 12:19 PM.


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.04399 seconds
  • Memory Usage 2,263KB
  • 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
  • (3)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete