php forum
php mysql forum
php mysql smarty
 
Topic Options
#313300 - 03/01/07 05:57 AM [7.1] Removing Breadcrumb Redundancy
Myke Offline
Power User

Registered: 09/06/99
Posts: 87
Loc: Sydney, Australia
When viewing a forum or sub-forum, it really bothered me to see the name of the forum I was in repeated twice in the breadcrumb - first as a link, second as plain text.

Instinctively, whenever I wanted to go up one level (the mouse-click equivalent of 'cd ..') I would always click on the second last segment in the breadcrumb, but when you had a breadcrumb that looked like:

site >> Forums >> Foo >> Foo

you'd wind up in the same forum again. This reeeeaallly annoyed me, so here's a little mod that removes the redundant forum name from the breadcrumb.

In libs/ubbthreads.inc.php, find:
Code:
if ($inputTitle) {
	$breadcrumb .= " » $inputTitle";
}

and change to:
Code:
if ($inputTitle != $forum_title) {
	$breadcrumb .= " » $inputTitle";
}


So now, when viewing a forum, you get:

site >> Forums >> Foo

and when viewing a thread, you get:

site >> Forums >> Foo >> Thread Title

as it should be!

Top
#313301 - 03/01/07 06:44 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Myke]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
I like it, great job; and I agree completely on seeing where this could be annoying lol
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#313304 - 03/01/07 08:22 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Gizmo]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
nice simple change - thanks smile
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#313306 - 03/01/07 10:05 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Ian_W]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 85
Loc: UK
Nice one,
I say youve just fixed a bug wink

Top
#313307 - 03/01/07 10:19 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Mark_S]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
Thank you smile
_________________________
- Allen wavey
- What Drives You?

Top
#313325 - 03/02/07 04:46 PM Re: [7.1] Removing Breadcrumb Redundancy [Re: AllenAyres]
Steve C Offline
Lurker

Registered: 02/21/07
Posts: 3
Loc: California
The above mod leaves the last unit on the Forum Summary as a redundant link to the current page.  So I changed the line before the above change by enclosing it within an if ... }

Original:
Code:
$breadcrumb .= " &raquo; <a href=....
  if ($inputTitle) {


Revised:
Code:
if ($inputTitle != $forum_title) {
  $breadcrumb .= " &raquo; <a href=....
}
      if ($inputTitle) {


So now, when viewing a forum summary, I get:
site >> Forums >> Cat >> ForumName

I don't think the change affects the breadcrumb text on the thread-view page.

Top
#313359 - 03/04/07 03:04 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Steve C]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
To be honest I prefer the link to the current forum - I can click on it to refresh the forum and see if there are any new posts smile
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#313367 - 03/04/07 03:30 PM Re: [7.1] Removing Breadcrumb Redundancy [Re: Ian_W]
Gizmo Administrator Offline
Wizard

Registered: 01/10/00
Posts: 5133
Loc: Portland, OR, USA
Originally Posted By: Ian_W
To be honest I prefer the link to the current forum - I can click on it to refresh the forum and see if there are any new posts smile
agreed
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#313413 - 03/06/07 01:13 AM Re: [7.1] Removing Breadcrumb Redundancy [Re: Gizmo]
Steve C Offline
Lurker

Registered: 02/21/07
Posts: 3
Loc: California
Hmmmm, curious and interesting... I've always used the browser's refresh button. Since most sites don't have any type of refresh-specific link, I have gotten quite used to using the browser's button.

Top
#313733 - 03/28/07 03:33 PM Re: [7.1] Removing Breadcrumb Redundancy [Re: Myke]
Rick Offline
Guru

Registered: 05/11/99
Posts: 8372
Loc: Olympia, WA
Thanks Myke. I'll be making this change for 7.1.1.
_________________________
StogieSmokers.com

Top


Moderator:  sirdude 
Who's Online
2 registered (arentzen, blaaskaak), 27 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
How to hide sub forums from summary page
by blaaskaak
12/03/08 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks