Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Manual Add Navbar Links [Plus Image Menu] Details »»
Manual Add Navbar Links [Plus Image Menu]
Version: 1.00, by SoltanWorld SoltanWorld is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.x.x Rating:
Released: 07-15-2010 Last Update: Never Installs: 23
Template Edits
Code Changes  
No support by the author.

This solution allow you to add links in navbar by editing navbar template yourself :

Some Hacks and Modification that you have installed on your forum, adds a link in the middle of navbar, so you can easily have one :

This is suitable for forumes with image navbar like mine : http://soltanworld.com


If you have use this Solution do not forget to mark az installed
----------------------------------------------------------------



- How to add links

To add Links in navbar you should first know some information about navbar and navtabs

some phrase like :

{vb:raw template_hook.navtab_start}
{vb:raw template_hook.navtab_middle}{vb:raw template_hook.navtab_end}

Q:What does this phrases mean?

A: First Phrase
{vb:raw template_hook.navtab_start}, is the start of navtabs. Befor This Phrase means that you link would appear always the first one and the ones you put after this phrase due to how you put the links in order would be sortet in navtabs .
Any Links you put in order after
{vb:raw template_hook.navtab_start} untill this phrase would be shown as you did : {vb:raw template_hook.navtab_middle} , And after this phrase like the start any links after this would be sorted as middle of navtabs, so you can have separator between items you want to add betweens.
And if you want to add a link at the end of navtabs you should find this phrase
{vb:raw template_hook.navtab_end} and add you link before this phrase.

e.g :
Code:
 {vb:raw template_hook.navtab_start}
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT !=  'search'">
             <li class="selected"><a class="navtab" href="link">title</a>
         <vb:else />
             <li><a class="navtab" href="link">title</a></li>
         </vb:if>
{vb:raw template_hook.navtab_middle}<vb:if condition="!$vboptions['selectednavtab'] AND  THIS_SCRIPT !=  'search'">
             <li class="selected"><a class="navtab" href="link">title</a>
         <vb:else />
             <li><a class="navtab" href="link">title</a></li>
         </vb:if>
{vb:raw template_hook.navtab_end}
-For Navbar menu - Sub Menu

Each Navtab link can contains submenu which calles navbar and popup menu

for navbar (under navtabs) items you should use this :


Notice : to add this in navtabs sub menu, you should add this before <vb:else> Please follow the example

Code:
<li><a class="navtab" href="YourLink">Link Title</a>
<ul class="floatcontainer">
                    {vb:raw template_hook.navbar_start}
                    
                        <li><a href="link">title</a></li>
                
                    {vb:raw template_hook.navbar_end}
                </ul>
</li>

and for navbar child menu you can use this as popup menu :

Code:
<li><a class="navtab" href="YourLink">Link Title</a>
<li class="popupmenu">
                        <a href="javascript://" class="popupctrl">navbar link title</a>
                        <ul class="popupbody popuphover">
                            <li><a href="link">sub menu title 1</a></li>
                            <li><a href="link">sub menu title 2</a></li>
                            <li><a href="link">sub menu title 3</a></li>
                        </ul>
                    </li>
</li>

e.g :

Navtab + Navbar + Popup menu

Code:
{vb:raw template_hook.navtab_start}
 <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT !=  'search'">
              <li class="selected"><a class="navtab" href="link">title</a></li>
          <vb:else />
<li><a class="navtab" href="link">title</a></li>
          </vb:if>

{vb:raw template_hook.navtab_middle}

 <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT !=  'search'">     
    <li><a class="navtab" href="link">title</a>          
        <ul class="floatcontainer">

            {vb:raw template_hook.navbar_start}
                <li><a href="link">sample navbar item</a></li>
                    <li class="popupmenu">
                        <a href="javascript://" class="popupctrl">contain popup menu item</a>
                        <ul class="popupbody popuphover">
                            <li><a href="link">title</a></li>
                            <li><a href="link">title</a></li>
                            <li><a href="link">title</a></li>
                            <li><a href="link">title</a></li>
                        </ul>
                    </li>
            {vb:raw template_hook.navbar_end} 

        </ul>
            </li>
<vb:else />
              </li>
    <li><a class="navtab" href="link">title</a></li>
          </vb:if>
{vb:raw template_hook.navtab_end}
-For Image Navtabs :

First of all you need to edit your css file and Stylevar (navbar) to set your desired setting and then You should replace text with this tag in navbar template:
<img src="link">


like :

Code:
  
  <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT !=  'search'">
               <li class="selected"><a class="navtab" href=" Link 
Code:
"><img src="link"></a>
           <vb:else />
               <li><a class="navtab" href="link">title</a></li>
           </vb:if>
If you have use this Solution do not forget to mark az installed

Screenshots

File Type: jpg navbar-soltanworld.jpg (29.2 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
barakuda

Comments
  #12  
Old 07-20-2010, 09:24 PM
gopherhockey's Avatar
gopherhockey gopherhockey is offline
 
Join Date: Jul 2002
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SoltanWorld View Post
you can use this code

Code:
        <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">
            <li class="selected"><a class="navtab" href="link">title</a>
        <vb:else />
            <li><a class="navtab" href="link">title</a></li>
        </vb:if>

Thanks... only issue is the link is highlighted along with Forum now. Its highlighted almost everywhere I go within the forums but isn't if I go to my wiki or blog tabs.
Reply With Quote
  #13  
Old 07-22-2010, 04:35 AM
SoltanWorld's Avatar
SoltanWorld SoltanWorld is offline
 
Join Date: Feb 2010
Location: Loas Angeles
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should use something like this for your mod

Code:
<vb:if condition="$vbulletin->options['selectednavtab'] == 'ldm'">
ldm is the name of the hack "Links and Download Manager"
Just place this with var you have
Reply With Quote
  #14  
Old 07-22-2010, 07:07 AM
Jay Lee Jay Lee is offline
 
Join Date: Jun 2010
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SoltanWorld View Post
Thanks dear,I think this would works :

Code:
<li><a class="navtab" href="YourLink">Link Title</a>
<ul class="floatcontainer">
					{vb:raw template_hook.navbar_start}
					
						<li><a href="link">title</a></li>
				
					{vb:raw template_hook.navbar_end}
				</ul>
</li>
but when i check the original code of navbar template, it contains some raw like

{vb:raw template_hook.navbar_after_faq}
{vb:raw template_hook.navbar_after_pm}

and i think for popup menu it would work too

Code:
<li><a class="navtab" href="YourLink">Link Title</a>
<li class="popupmenu">
						<a href="javascript://" class="popupctrl">navbar link title</a>
						<ul class="popupbody popuphover">
							<li><a href="link">sub menu title 1</a></li>
							<li><a href="link">sub menu title 2</a></li>
							<li><a href="link">sub menu title 3</a></li>
						</ul>
					</li>
</li>
Thanks for the code. Although it doesn't work yet, I think it's a good start. What happens is that the link appears over the other links. I'll do some more testing before I post more questions. This thing has been driving me crazy the last few days. But I still need to get it done, so with your help I think eventually I'll get there!
Reply With Quote
  #15  
Old 09-12-2010, 07:25 PM
zonaenlinea's Avatar
zonaenlinea zonaenlinea is offline
 
Join Date: Dec 2009
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

for 4.0.6 ?
Reply With Quote
  #16  
Old 09-19-2010, 05:18 AM
SoltanWorld's Avatar
SoltanWorld SoltanWorld is offline
 
Join Date: Feb 2010
Location: Loas Angeles
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can edit this in all 4.0.x versions.
Reply With Quote
  #17  
Old 09-23-2010, 04:42 PM
pportuese pportuese is offline
 
Join Date: Jul 2010
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where do you add the code for this? Where in style manager?
Reply With Quote
  #18  
Old 09-30-2010, 12:40 PM
SoltanWorld's Avatar
SoltanWorld SoltanWorld is offline
 
Join Date: Feb 2010
Location: Loas Angeles
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah : in navbar template
Reply With Quote
Reply

Thread Tools

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 05:02 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.12804 seconds
  • Memory Usage 2,317KB
  • Queries Executed 24 (?)
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
  • (10)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (1)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_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