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)
-   -   Miscellaneous Hacks - Alternative Breadcrumbs for your vB4 (https://vborg.vbsupport.ru/showthread.php?t=280518)

private_ale 03-21-2012 11:00 PM

Alternative Breadcrumbs for your vB4
 
1 Attachment(s)
STOP: Before we go any further, I want to make it clear that you need to have a basic understanding of what you're doing. You need to have a basic understanding of CSS in order to make this perfect. I have tried my best to have this use vBulletin's existing stylevars, but you will most likely need to fine-tune it's cosmetic qualities on your own.


Some people have been asking for better breadcrumbs. A few months ago, I published a barebone template on how to accomplish such a task. Despite my good efforts, some people needed additional help to get it working. To make matters easier, I took time out today to make the breadcrumbs work with a vBulletin 4 system. It includes basic Microdata.

As previously mentioned above, these will need some CSS work on a non-default style. When these were originally built, it was for my website, not for mass distribution. I have given my best efforts to port it to using vBulletin's stylevars, but it's very, very crude. I have taken some time to add comments to the CSS so you can easily change the values if they don't work right.

If you want to see a live demo, you may visit my site:
Code:

https://www.beercandle.com/forum.php
Please note my site is using the original revision. This here is the adapted.

Prerequisite to setting this up: This has only been tested on vBulletin 4.1.11; Create a copy of the Style you want to apply this to. Test it first. Make sure it looks good. :)

> Open Template Group `CSS Templates`
>> Open Template `additional.css`

### ADD ###
Code:

.bread_box {
        margin: 0;
        overflow: hidden;
        clear: both;
}
.breadcrumb {
        position: relative;
        font: 11px Arial,Calibri,Verdana,Geneva,sans-serif;
        background: {vb:stylevar sidebar_background};
        border: {vb:stylevar sidebar_border}; /* this is the border color that's around the whole thing */
        -moz-border-radius:{vb:stylevar border_radius};
        -webkit-border-radius: {vb:stylevar border_radius};
        border-radius: {vb:stylevar border_radius};
        overflow: hidden;
}
.breadcrumb .crust {
        display: block;
        float: left;
        position: relative;
}
.breadcrumb .crust:first-child a.crumb {
        padding-left: 13px;
        -moz-border-radius-topleft:{vb:stylevar border_radius};
        -moz-border-radius-bottomleft:{vb:stylevar border_radius};
        -webkit-border-top-left-radius: {vb:stylevar border_radius};
        -webkit-border-bottom-left-radius: {vb:stylevar border_radius};
        border-top-left-radius: {vb:stylevar border_radius};
        border-bottom-left-radius: {vb:stylevar border_radius};
}
.breadcrumb .crust a.crumb, .breadcrumb .crust b.lastcrumb {
        text-decoration: none;
        background-color: {vb:stylevar sidebar_background.backgroundColor}; /* this is the background color of the CRUMBS, ie: the links */
        padding: 0 10px 0 23px;
        border-bottom: {vb:stylevar sidebar_border}; /* this is the same as the border value higher up, this only shows if the last crumb causes it to overflow */
        margin-bottom: -1px;
        outline: 0 none;
        -moz-outline-style: 0 none;
        display: block;
        line-height: 22px;
        _border-bottom: none;
        color:{vb:stylevar link_color}; /* this is the color of the links in the crumbs */
        text-decoration:{vb:stylevar link_textDecoration};
}
.breadcrumb .crust b.lastcrumb {
        background: transparent none;
        color: {vb:stylevar footer_time_color}; /* this is the color of the last crumb, ie: the final destination */
        font-weight: bold;
}
.breadcrumb .crust a.crumb, .breadcrumb .crust b.lastcrumb {
        line-height: 22px;
}
.breadcrumb .crust .arrow {
        border: 12px solid transparent;
        border-right: 1px none black;
        border-left: {vb:stylevar sidebar_border}; /* this is the _background_ color of the "arrow" */
        border-left-width: 12px !important;
        border-left-style: solid !important;
        display: block;
        position: absolute;
        right: -12px;
        top: -1px;
        z-index: 50;
        width: 0px;
        height: 0px;
}
.breadcrumb .crust .arrow span {
        border: 12px solid transparent;
        border-right: 1px none black;
        border-left-color: {vb:stylevar sidebar_background.backgroundColor}; /* this is the border color of the "arrow" */
        display: block;
        position: absolute;
        left: -13px;
        top: -12px;
        z-index: 51;
        white-space: nowrap;
        overflow: hidden;
        text-indent: 9999px;
        width: 0px;
        height: 0px;
}
.breadcrumb .refresh:hover { background-position: 0px -16px; }
.breadcrumb .crust:last-child a.crumb { font-weight: bold; }
.breadcrumb .crust:hover a.crumb {
        background-color:{vb:stylevar blocksubhead_background.backgroundColor}; /* this is the background color of the crumb when it's hovered */
        color:{vb:stylevar linkhover_color}; /* likewise, this is the color of the crumb's link when hovered */
        text-decoration:{vb:stylevar linkhover_textDecoration};
}
.breadcrumb .crust:hover .arrow span {
        border-left-color:{vb:stylevar blocksubhead_background.backgroundColor}; /* this is the color of the "arrow" when hovered. It should be identical to the `.breadcrumb .crust:hover a.crumb` background value */
}


> Open Template Group `Navigation / Breadcrumb Templates`
>> Open Template `navbar`

### FIND ###
Code:

<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="bread_box">
        <nav>
                <fieldset class="breadcrumb">
                        <span class="crumbs">
                                <vb:if condition="$vboptions['hometitle']">
                                        <span class="crust" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
                                                <a href="{vb:raw vboptions.homeurl}" class="crumb" rel="up" itemprop="url" alt="{vb:rawphrase home}">
                                                        <span itemprop="title">{vb:raw vboptions.hometitle}</span>
                                                </a>
                                                <span class="arrow">
                                                        <span>&gt;</span>
                                                </span>
                                        </span>
                                </vb:if>
                                {vb:raw navbits.breadcrumb}
                                {vb:raw navbits.lastelement}
                        </span>
                </fieldset>
        </nav>
</div>


>> Open template `navbar_link`
### REPLACE _EVERYTHING_ WITH ###
Code:

<vb:if condition="$show['breadcrumb']">
        <span class="crust" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="{vb:raw nav_url}" class="crumb" rel="up" itemprop="url">
                        <span itemprop="title">{vb:raw nav_title}</span>
                </a>
                <span class="arrow">
                        <span>&gt;</span>
                </span>
        </span>
<vb:else />
        <span class="crust" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
                <b class="lastcrumb">
                        <span itemprop="title">{vb:raw nav_title}</span>
                </b>
        </span>
</vb:if>


BirdOPrey5 03-22-2012 07:18 PM

Working well for me on 4.1.11 :up:
Thanks.

CouponWCents 03-22-2012 08:41 PM

WOOHOO! Looks great!

CouponWCents 03-22-2012 08:45 PM

Is there anyway to get it not to show up on the CMS or forum pageS?

AURFSCAN 03-23-2012 12:53 AM

Quote:

Originally Posted by CouponWCents (Post 2312236)
Is there anyway to get it not to show up on the CMS or forum pageS?

post 6 here :) - https://vborg.vbsupport.ru/showthread.php?t=243517


tagged this to sus it out.. thanks

Dr.osamA 03-23-2012 09:43 PM

Excellent

installed

plz can you do that from right to left as RTL
thank you

Ohlala.Vn 03-24-2012 09:21 AM

Thank you !!! Very nice

garybrun 03-24-2012 07:24 PM

INstalled thanks.
www.minelabowners.com

abdobasha2004 03-24-2012 07:47 PM

very nive looking
plz provide code for vb 3.8
thanks in advance

Ricsca 03-24-2012 09:23 PM

Thanks


All times are GMT. The time now is 12:34 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.01851 seconds
  • Memory Usage 1,761KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete