vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Mini Mods - Breadcrumb 'Overhaul' (https://vborg.vbsupport.ru/showthread.php?t=248622)

DataHero 08-13-2010 10:00 PM

Breadcrumb 'Overhaul'
 
1 Attachment(s)
Notice: Please do not alter 'my' code to your liking and then claim it's your own. Altering it for personal use is fine.

Do note that this modification was made to my personal taste. For instance, the last bit of the breadcrumb (basically, the location of where you are at, at the moment) has been removed as I personally thought it wasn't needed. But that's my opinion anyway. :)

I do not support - if anyone seeks such - custom or heavily modified templates. This template modification has been tested using the default vBulletin style.

Description:
I wanted to tweak my board to my personal taste. Once I came across SWGEmu, I was inspired by it and thus after a while, decided to figure it out and do something similar -- took me quite some time, but worth every minute! Anyway, this template modification alters the breadcrumb along with the forum description bits (the ones that are displayed in FORUMDISPLAY and SHOWTHREAD). It makes things, in my opinion, look 'neater'.

Instructions:
Navigate to your 'Breadcrumbs / Navigation' templates in the Style Manager of your AdminCP. Open the navbar template. Once there, search for the following lines:
Code:

<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>

Somewhere around that area, beneath, there should be a code similar (or exactly) like this -- remove it (or place between HTML comment tags):
Code:

<td class="alt1" width="100%">
                <if condition="is_array($navbits)">
                        <table cellpadding="0" cellspacing="0" border="0">
                        <tr valign="bottom">
                                <td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
                                <td>&nbsp;</td>
                                <td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
                        </tr>
                        <tr>
                                <td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
                        </tr>
                        </table>
                <else />
                        <div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
                </if>
</td>

Place the following code between comment tags as well (or remove it, your choice):
Code:

<if condition="$show['forumdesc']">
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr>
                <td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
        </tr>
        </table>
        <br />
</if>

----------------------------------------------------------------------------
Now, find the following line:
Code:

<!-- / nav buttons bar -->
Beneath it, add:
Code:

<br />
<div id="breadcrumb-bit">
        <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
                <tbody>
                        <tr>
                                <td nowrap="nowrap">
                                <if condition="is_array($navbits)">
                                        <div style="font-size: 13px;">
                                                <a href="#" onclick="history.back(1); return false;" class="noline">
                                                        <img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" border="0" alt="$vbphrase[go_back]" />
                                                </a>
                                                <a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a> $navbits[breadcrumb]
                                        </div>
                                       
                                <else />
                                <div style="font-size: 13px;"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">
                                        <img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" border="0" alt="" /></a> <strong>$vboptions[bbtitle]</strong>
                                </div>
                                </if>       
                                </td>
                                <td style="min-width:230px; padding-left: 11px;">
                                                        <if condition="$show['forumdesc']">
                                <div>
                                              <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
                                                      <tr>
                                                      <td class="alt1" width="100%"><span class="smallfont">$foruminfo[description]</span></td>
                                                      </tr>
                                              </table>
                                        </div>
                                                          </if>               
                                </td>
                        </tr>
                </tbody>
        </table>
</div>

Once done, go to your Main CSS page of your style, and add the following additional CSS at the bottom:
Code:

#breadcrumb-bit {
        padding: 0px 8px 0px 0px;
        margin: 0px 0px 0px 0px;
        border-top: 1px outset #000;
        border-bottom: 1px inset #000;       
        background-color: transparent;
}

You can alter the CSS as to match your forum skin. Remember: this was done using the default style of vBulletin. :)
----------------------------------------------------------------------------
If you'd like the forum name to display in front of description too, add in front of it:
Code:

$foruminfo[title]
If you want to show the last element in the breadcrumb, add the following line of code wherever you deem necessary:
HTML Code:

<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong>
----------------------------------------------------------------------------
That's pretty much it.

Do click install if you like it! :)

Hell Bomb 08-15-2010 12:36 AM

Very nice. Think I would be allowed to implement this into one of the styles I make if i give you credits?

mikey1991 08-15-2010 01:09 AM

Good Job :)

DataHero 08-15-2010 11:50 AM

Thanks. :)
Quote:

Originally Posted by hellbomb (Post 2084020)
Think I would be allowed to implement this into one of the styles I make if i give you credits?

Yeah, that's fine. So... go ahead, I'd say. :)

Rich 08-19-2010 09:40 PM

Quote:

the last bit of the breadcrumb (basically, the location of where you are at, at the moment) has been removed as I personally thought it wasn't needed. But that's my opinion anyway.
The current location should also be the title of the page. With that in mind, that location contributes to the on-page SEO. You may want to consider re-adding it. (Or not, lol. It has a beneficial aspect to the page though and should be there.)

DataHero 08-25-2010 04:49 AM

Updated original post with contents on how to add the last element. If you want to do so, add the following where you deem it necessary. The markup / container for that is up to you.

HTML Code:

<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong>

al2thero 11-25-2012 07:00 PM

thank you


All times are GMT. The time now is 11:03 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.01061 seconds
  • Memory Usage 1,762KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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