Mambo Breadcrumb Problem while in the forum

Started by cruisinflatout, October 18, 2005, 01:54:00 PM

Previous topic - Next topic

cruisinflatout

I added the code to make the Threads and Topics within SMF show in the Mambo Breadcrumbs according to Kindred's post in the Combined Readme.

I noticed that the breadcrumb has a missing link..."Forum" which should link to forum home doesn't.

To see what I mean, goto http://www.saskstreetbike.com [nofollow] and drill down into a forum topic:

Example: Home > Forum > Streetbike Forum > General Bike Discussion >  whats next?

in this case, all the breadcrumbs should have a link redirecting the user to that level except "Whats next?".  The problem is that "Forum" doesn't have a link either.

Does anyone have a fix? Or can you direct me to the file that would need to be changed???

Thanks.

cruisinflatout

Well, I dunno it's because I'm a n00b around here, but I don't think anyone has every replied to one of my posts...  :D

Anyhow, help would be appreciated.  I have the pathway for the forum linked now but it's not perfect.

In pathway.php, this is what it was

// converts & to & for xtml compliance
$itemname = ampReplace( $item->name );

// if it is the current page, then display a non hyperlink

// if it is the current page, then display a non hyperlink
if ($item->id == $Itemid || empty( $mid ) || empty($item->link)) {
$newlink = "  $itemname";
} else if (isset($item->type) && $item->type == 'url') {
$correctLink = eregi( 'http://', $item->link);
if ($correctLink==1) {
$newlink = '<a href="'. $item->link .'" target="_window" class="pathway">'. $itemname .'</a>';
} else {
$newlink = $itemname;
}
} else {
$newlink = '<a href="'. sefRelToAbs( $item->link .'&Itemid='. $item->id ) .'" class="pathway">'. $itemname .'</a>';
}

$newlink = ampReplace( $newlink );


I added an if to see if the itemname is Forum and it makes a link out of it:

(This is the stuff I added:
if ($itemname == 'Forum') {
         $newlink = '<a href="'. sefRelToAbs( $item->link .'&Itemid='. $item->id ) .'" class="pathway">'. $itemname .'</a>';
         }
      else {


// converts & to &amp; for xtml compliance
$itemname = ampReplace( $item->name );

// if it is the current page, then display a non hyperlink
if ($itemname == 'Forum') {
$newlink = '<a href="'. sefRelToAbs( $item->link .'&Itemid='. $item->id ) .'" class="pathway">'. $itemname .'</a>';
}
else {
// if it is the current page, then display a non hyperlink
if ($item->id == $Itemid || empty( $mid ) || empty($item->link)) {
$newlink = "  $itemname";
} else if (isset($item->type) && $item->type == 'url') {
$correctLink = eregi( 'http://', $item->link);
if ($correctLink==1) {
$newlink = '<a href="'. $item->link .'" target="_window" class="pathway">'. $itemname .'</a>';
} else {
$newlink = $itemname;
}
} else {
$newlink = '<a href="'. sefRelToAbs( $item->link .'&Itemid='. $item->id ) .'" class="pathway">'. $itemname .'</a>';
}
}

$newlink = ampReplace( $newlink );


I would like to make it so if you're at the Forum level, it doesn't display as a link...any help would be appreciated.

Thanks...

rjprince

I'm the one who wrote that snippet, and I totally forgot that I had already changed  the pathway function in Mambo so that it turned the last "official" Mambo pathway entry into a link if there were custom pathway entries to be displayed.

See this thread for my original change to the pathway element plus a discussion on how to modify it for Joomla:

http://forum.joomla.org/index.php/topic,3335.0.html

It's basically what you did, but changing it from a specific check for "Forum" to simply checking if new pathway elements are added.

cruisinflatout

you da man...

now she's smooth as butta  :D

I'm starting to get used to PHP...but I'm more of a java guy and I've never touched a "C type" language in my life...

But it's fun and I'm learning as I go here...

Thanks again...

Advertisement: