vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to add "Home" Button to my forums? (https://vborg.vbsupport.ru/showthread.php?t=274116)

MaXimus 11-16-2011 10:06 AM

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?

http://img137.imageshack.us/img137/8078/capturehfk.png

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

kh99 11-16-2011 12:17 PM

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>


MaXimus 11-16-2011 12:35 PM

Quote:

Originally Posted by kh99 (Post 2268517)
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!

kh99 11-16-2011 12:45 PM

Quote:

Originally Posted by Matrix Leader (Post 2268520)
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.

MaXimus 11-16-2011 01:02 PM

Quote:

Originally Posted by kh99 (Post 2268525)
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!

vbuser70 11-18-2011 07:40 AM

Quote:

Originally Posted by kh99 (Post 2268517)
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 !

kh99 11-18-2011 10:12 AM

Quote:

Originally Posted by vbuser70 (Post 2269137)
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.

vbuser70 11-18-2011 03:50 PM

Quote:

Originally Posted by kh99 (Post 2269163)
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 !

vbuser70 11-25-2011 09:04 AM

Just discovered my buttons disappear when I go to Blogs, how to have them displaying there as well ?

MaXimus 04-03-2012 06:27 AM

thanks a lot! great tips


All times are GMT. The time now is 12:17 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.01015 seconds
  • Memory Usage 1,741KB
  • 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
  • (3)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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