MyBB Community Forums

Full Version: Remove "category" from navigation breadcrumb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
e.g. now I have

Index > Category > Forum > Thread

I want

Index > Forum > Thread

Possible?
Remove the following from ./inc/functions.php around line 3300.

				if($pforumcache[$forumnav['pid']])
				{
					build_forum_breadcrumb($forumnav['pid']);
				}
thanks Smile
Hi, this solution is compatible also with mybb 1.8?

I would like to remove "category" forum name from navigation breadcrumb (the second forum name in navigation).

Isn't possible edit it only in templates?

Thank you
It is not possible to remove a category by jusrt editing templates, because cat and forum are treated as the same variable with no differentiation.

[ExiTuS]
(2019-10-24, 12:52 PM)niere8 Wrote: [ -> ]Hi, this solution is compatible also with mybb 1.8?

I would like to remove "category" forum name from navigation breadcrumb (the second forum name in navigation).

Isn't possible edit it only in templates?

Thank you

yes, but it's a code change, not template edit. Install the patches plugin if you don't want to make edits directly.
A hard PHP code change to remove categories is made in /inc/functions.php (v 1.8.21) line 4458+:

	// Set up link to forum in breadcrumb.
	if($pforumcache[$fid][$forumnav['pid']]['type'] == 'f' || $pforumcache[$fid][$forumnav['pid']]['type'] == 'c')
	{
		$navbits[$navsize]['url'] = "{$base_url}forum-".$forumnav['fid'].".html";
	}

Remove this (second) condition in if statement:
 || $pforumcache[$fid][$forumnav['pid']]['type'] == 'c'
to dismiss all categories.

Edit
I you don't want to heavily modificate your code, you can just replace the 'c' by 'xyz' or any else weird string, that will never be a positive condition.

[ExiTuS]