how to remove category link from breadcrumbs

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
K@T
Registered User
Posts: 26
Joined: Tue Jul 20, 2010 4:54 pm
Location: akooby office
Name: kris akooby
Contact:

how to remove category link from breadcrumbs

Post by K@T » Tue Jul 20, 2010 5:18 pm

Hi
need help regarding breadcrumb

At top navigation of board i want to remove category link .

eg. home page > category > forum > sub forum

need to change like

home page > fourm > subforum


pls help
Akooby.com : Join fast growing webmasters seo community, free downloads, and many more stuff that works.
biggest entertainment blog. enjoy the latest stuff, updated every hour
Free SMS masti : Unlimited free sms, send free sms to friends

User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: how to remove category link from breadcrumbs

Post by dellsystem » Tue Jul 20, 2010 5:43 pm

Try this.

Open includes/functions_display.php

Find

Code: Select all

foreach ($forum_parents as $parent_forum_id => $parent_data)
BEFORE it (in the line above), add:

Code: Select all

$is_category = TRUE;
Find

Code: Select all

			// Skip this parent if the user does not have the permission to view it
			if (!$auth->acl_get('f_list', $parent_forum_id))
			{
				continue;
			}
After, add

Code: Select all

			if ( $is_category )
			{
				continue;
			}
Find

Code: Select all

			$template->assign_block_vars('navlinks', array(
				'S_IS_CAT'		=> ($parent_type == FORUM_CAT) ? true : false,
				'S_IS_LINK'		=> ($parent_type == FORUM_LINK) ? true : false,
				'S_IS_POST'		=> ($parent_type == FORUM_POST) ? true : false,
				'FORUM_NAME'	=> $parent_name,
				'FORUM_ID'		=> $parent_forum_id,
				'U_VIEW_FORUM'	=> append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id))
			);
After, add

Code: Select all

			$is_category = FALSE;
This will remove the first parent (the category, hopefully). Note that if you view the actual category, the link to the category still shows up. Which is good.

Let me know if there are problems. Moving to MOD Requests
Former moderator and website team member | My MODs, and more (GitHub)

K@T
Registered User
Posts: 26
Joined: Tue Jul 20, 2010 4:54 pm
Location: akooby office
Name: kris akooby
Contact:

Re: how to remove category link from breadcrumbs

Post by K@T » Wed Jul 21, 2010 1:57 pm

Hi

Cheers. It works for me thanks
Akooby.com : Join fast growing webmasters seo community, free downloads, and many more stuff that works.
biggest entertainment blog. enjoy the latest stuff, updated every hour
Free SMS masti : Unlimited free sms, send free sms to friends

gardenofsimple
Registered User
Posts: 1
Joined: Fri Jan 14, 2011 1:36 pm

Re: how to remove category link from breadcrumbs

Post by gardenofsimple » Fri Jan 14, 2011 1:42 pm

Hello all! I had the same problem posted above and I tried to edit the code as suggested. But one thing does not work for me: the category name was removed, but when I open the topic list in a subforum, or a post in a subforum, the main forum name does not appear.

example: i have a forum called "live" and a subforum called "tour 2008". when I open "tour 2008" or a post in it, now the breadbrumb shows:

index > tour 2008 (subforum name)

while I want it to be:

index > live (forumname) > tour 2008 (subforum name)

thanks!

mackk2
Registered User
Posts: 11
Joined: Wed Jun 20, 2012 3:41 pm

Re: how to remove category link from breadcrumbs

Post by mackk2 » Tue Jul 03, 2012 1:36 pm

Hi,
I have the exact same problem

User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 959
Joined: Thu Apr 23, 2009 1:20 pm
Location: Germany
Name: Christian
Contact:

Re: how to remove category link from breadcrumbs

Post by Crizzo » Tue Apr 09, 2013 4:54 pm

If someone will find these. Here is a solution:

Öpen: \includes\functions_display.php
Find:

Code: Select all

// Skip this parent if the user does not have the permission to view it
            if (!$auth->acl_get('f_list', $parent_forum_id))
            {
                continue;
            } 
Replace with:

Code: Select all

// Skip this parent if the user does not have the permission to view it and the parent is a category
            if (!$auth->acl_get('f_list', $parent_forum_id) || ($parent_type == FORUM_CAT))
            {
                continue;
            } 
Regards
My extensions for phpBB: crizzo.de
German phpBB Support at www.phpbb.de

yaashul
Registered User
Posts: 331
Joined: Mon Apr 17, 2006 3:21 pm
Location: India

Re: how to remove category link from breadcrumbs

Post by yaashul » Wed May 07, 2014 2:39 am

I have a different problem.

I have a forum with sub cateogries like this

home -> main category -> subcategory -> forum
home ->main category ->forum

now is there any way main category doesn't show anywhere?
like this
home -> subcategory -> forum
home ->forum
Basically cateogies with no parent should not show.

User avatar
MuhClaren
Registered User
Posts: 126
Joined: Sat Feb 21, 2015 5:23 am

Re: how to remove category link from breadcrumbs

Post by MuhClaren » Sat Feb 21, 2015 5:29 am

Crizzo wrote:If someone will find these. Here is a solution:

Öpen: \includes\functions_display.php
Find:

Code: Select all

// Skip this parent if the user does not have the permission to view it
            if (!$auth->acl_get('f_list', $parent_forum_id))
            {
                continue;
            }
Replace with:

Code: Select all

// Skip this parent if the user does not have the permission to view it and the parent is a category
            if (!$auth->acl_get('f_list', $parent_forum_id) || ($parent_type == FORUM_CAT))
            {
                continue;
            }
Regards
Works perfectly for my phpBB 3.1.3 implementation. Thanks for this. :)

Locked

Return to “[3.0.x] MOD Requests”