Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hide navbits from index only Details »»
Hide navbits from index only
Version: 1.00, by Allan Allan is offline
Developer Last Online: Mar 2017 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.0.3 Rating:
Released: 05-28-2010 Last Update: Never Installs: 87
Template Edits
Re-useable Code Translations  
No support by the author.

Hello, with this mod, you can hide the navbits (which is useless on index) from index only.

You gain a little height ^^
  • In the "Navbar" template, find:
Code:
<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>
  • Replace with:
Code:
<div  class="body_wrapper">
<vb:if condition="in_array(THIS_SCRIPT, array(index))">
<vb:else />
<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:if>
For CMS: https://vborg.vbsupport.ru/showpost....45&postcount=6

Screenshots

File Type: png avant.png (19.6 KB, 0 views)
File Type: png apres.png (19.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
eTiKeT?, Hippy, smirkley

Comments
  #22  
Old 06-26-2012, 05:52 PM
Keysailor's Avatar
Keysailor Keysailor is offline
 
Join Date: Jan 2010
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed in vB 4.2.0pl2 and it works fine, even with my custom navbar, thanks!
Reply With Quote
  #23  
Old 01-29-2013, 03:24 AM
Action-N's Avatar
Action-N Action-N is offline
 
Join Date: Jan 2002
Location: Pasco, WA
Posts: 225
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this for the CMS, but it hid from everything else not so much the front page which is what I believe is the point. Since all the sections, categories, an other pages use vbms script it needed an extra variable that only the top "Front Page" has. I found a post https://vborg.vbsupport.ru/showthread.php?t=289747 that found such a variable an was able to redesign the code given here. Thanks to brandondrury for discovering the variable.

Pretty much what I think should be standard, but hiding the breadcrumb only on the index/front page as it's not needed if your already there. Since not all other pages are gonna have parentnode variable the breadcrumb was hidden on them to so had to add another condition so it only hides if it's the CMS otherwise use the original code.

I didn't wrap the style tags to help with keeping the page from tweeking out. Did notice a loss of space so there could be a height filler added to the style code:

Code:
<div id="breadcrumb" class="breadcrumb" style="height:8px;">
Basically just go to navbar template an wrap condition statement around the whole breadcrumb code as shown.

REPLACE:
Code:
		<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}
WITH:
Code:
            <vb:if condition="THIS_SCRIPT == 'vbcms'">
		<vb:if condition="$vbulletin->parentnode != 0">
		<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}
		</vb:if>
<vb:else />
		<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}
            </vb:if>
Reply With Quote
  #24  
Old 02-19-2013, 06:55 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have lots of articles this is bad decision, by me your users in some cases will have trouble...with breadcrumbs it is easy to navigate.

If can be removed ONLY on main CMS page it is ok, but removing breadcrumbs everywhere in articles its a mess

Did install, and I just found myself lost in my articles lol

Would like to see it only for main page, uninstalled, tagged
Reply With Quote
  #25  
Old 02-22-2013, 04:17 AM
Action-N's Avatar
Action-N Action-N is offline
 
Join Date: Jan 2002
Location: Pasco, WA
Posts: 225
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Goxy63, that's what my other post was about, with the code for it even. If your getting lost in your articles dependent on the breadcrumbs might want to add a "Home" tab on your navigation.
Reply With Quote
Благодарность от:
goxy63
  #26  
Old 08-13-2013, 06:48 PM
caltek caltek is offline
 
Join Date: Nov 2008
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for that - appreciate it.
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 08:28 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.04520 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
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
  • (5)bbcode_code
  • (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
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (4)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (2)postbit_attachment
  • (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
  • 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