vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Exclude Certain Breadcrumb Links In The Navbar (https://vborg.vbsupport.ru/showthread.php?t=122069)

07-24-2006 10:00 PM

Exclude Certain Breadcrumb Links In The Navbar
 
Note: I did not write this. I had to edit my settings this morning and it took me a bit to find it on vb.com, and it didn't come up in a search here so I'm posting it so that folks can tag it. This is Jake Bunce's tip that he listed here.

This mod allows you to exclude breadcrumbs from the navbar by name.

Eg: I have a forum called "Recording Studio" in the category "General Music Discussion". With this, my navbar breadcrumbs show:

Sevenstring.org ? Recording Studio

Instead of:

Sevenstring.org ? General Music Discussion ? Recording Studio

Because this mod excludes by name, you will want to avoid having multiple forums and categories that have the same names, unless you want to exclude both of them.

You need to use a plugin for this, so first make sure your plugin system is enabled:

Admin CP -> vBulletin Options -> Plugin/Hook System -> Enable Plugin/Hook System

Now create a new plugin for the parse_templates hook location:

Admin CP -> Plugin System -> Add New Plugin

Use this PHP code in the plugin:

Code:

$navexclude = array('title1', 'title2', 'title3');
Edit the red list of names to specify the titles of the breadcrumb links you want to exclude. For example, if you have a category named "Open Forums" then you can exclude that link from the breadcrumbs in the navbar by adding 'Open Forums' to the list.

Admin CP -> Styles & Templates -> Style Manager -> ? ? -> Navigation / Breadcrumb Templates -> navbar_link

Add the red code. Upon saving this template you will get an error about a "wrong datatype for second argument". Ignore the error and click Continue:

Code:

<if condition="!in_array($nav_title, $GLOBALS['navexclude']) OR !$show['breadcrumb']">

        <if condition="$show['breadcrumb']">
                <span class="navbar">&gt; <a href="$nav_url">$nav_title</a></span>
        <else />
                $nav_title
        </if>

</if>


utw-Mephisto 07-25-2006 11:25 PM

Interesting ....

MGM 07-26-2006 05:08 AM

I think you mean edit the green list of names ;)

MGM out

Snake 07-26-2006 11:52 AM

Thanks!

Guest210212002 07-26-2006 12:32 PM

Quote:

Originally Posted by MGM
I think you mean edit the green list of names ;)

MGM out

Depends on your skin here. :cool:

[high]* Guest210212002 blames Brad[/high]

Guest210212002 11-11-2006 03:24 PM

Tested and working in 3.6.3.

FrostByghte 11-21-2006 03:44 PM

Would there be a way to hide the forum instead of the sub forum? I have a number of sub forums with their own templates defined and I would really like a way to remove the top level forum from the breadcrumb. Any chance that could happen with this mod?

thincom2000 01-09-2007 12:56 AM

Try this add-on (written by me): https://vborg.vbsupport.ru/showthread.php?p=1150742
Allows complete rewriting of navbits in the AdminCP.


All times are GMT. The time now is 02:52 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.01826 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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