vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Home Enhancements - Hide navbits from index only (https://vborg.vbsupport.ru/showthread.php?t=243517)

Allan 05-28-2010 10:00 PM

Hide navbits from index only
 
1 Attachment(s)
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

AURFSCAN 05-29-2010 06:41 AM

thankyou Allan

Juggernaut 05-29-2010 07:15 AM

using it, thank you :D

RedPoint 05-29-2010 07:21 PM

thanks, i search for this long time ;)

whitedd 05-29-2010 11:10 PM

...great...but what is with CMS???...

AURFSCAN 05-30-2010 01:54 AM

use this for removal from cms


Code:


<div  class="body_wrapper">
<vb:if condition="in_array(THIS_SCRIPT, array('index', 'vbcms'))">
<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>


Allan 05-30-2010 06:43 AM

Quote:

Originally Posted by AURFSCAN (Post 2045345)
use this for removal from cms


Code:


<div  class="body_wrapper">
<vb:if condition="in_array(THIS_SCRIPT, array('index', 'vbcms'))">
<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>


Yes, good idea, thx ;)

Skyrider 09-28-2010 10:40 AM

Gracias for this, installed.

BadgerDog 10-07-2010 09:52 AM

Installed ... thanks ... :)

Works well on 4.04pl1 ... :up:

Regards,
Badger

BioWaffen 10-08-2010 11:32 AM

Works on 4.0.7 , but if I put the CMS in, it doesn?t show it at all, so not from index only ;)

compact123 10-31-2010 05:39 PM

thank you :O

Fergal C 12-04-2010 09:57 AM

installed, thank you.

cloferba 12-04-2010 12:44 PM

thanks!

lgnd 12-18-2010 01:14 PM

Thanks! working on 4.1.0 pl2

ndut 12-19-2010 03:36 AM

installed, on 4.1.0 pl2

egyedu 01-22-2011 06:31 AM

installed, thank you.

Boofo 01-22-2011 07:33 AM

This is a cleaner way to do it and avoids having to have the empty <vb:else /> line in it. Notice the ! marked in red.

Code:

<div class="body_wrapper">
<vb:if condition="!in_array(THIS_SCRIPT, array('index', 'vbcms'))">
<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>


TheTrust 07-10-2011 03:45 AM

Quote:

Originally Posted by Boofo (Post 2152762)
This is a cleaner way to do it and avoids having to have the empty <vb:else /> line in it. Notice the ! marked in red.

Code:

<div class="body_wrapper">
<vb:if condition="!in_array(THIS_SCRIPT, array('index', 'vbcms'))">
<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>


Thank you both of you Allan and Boofo

Front Range 4x4 06-16-2012 10:02 PM

It still shows up in Search when I did it so added this:

Code:

<div class="body_wrapper">
<vb:if condition="!in_array(THIS_SCRIPT, array('index', 'search'))">
<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>


GameOverViper 06-17-2012 01:34 AM

Just installed, thanks!

Keysailor 06-26-2012 05:52 PM

Installed in vB 4.2.0pl2 and it works fine, even with my custom navbar, thanks!

Action-N 01-29-2013 03:24 AM

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>


goxy63 02-19-2013 06:55 PM

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

Action-N 02-22-2013 04:17 AM

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.

caltek 08-13-2013 06:48 PM

Thanks for that - appreciate it.


All times are GMT. The time now is 05:50 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.01342 seconds
  • Memory Usage 1,775KB
  • 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
  • (10)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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