PDA

View Full Version : Breadcrumb trouble when forum is not in root dir


Antivirus
04-12-2007, 11:58 AM
My forums are located here: www.eclipserecords.com/forum/index.php

My homepage is a custom vbulletin page located here: www.eclipserecords.com/index.php


My problem is as follows:
When viewing UserCP (or any other vbulletin page within the forums), the breadcrumb looks as follows:
Homepage (http://www.eclipserecords.com/index.php) > User Control Panel

When viewing forumhome, the breadcrumb looks as follows:
Homepage

What I want is for (within every forum page) there to be a Forum Home within the breadcrumb. For instance, when viewing UserCP, like this:

Homepage (http://www.eclipserecords.com/index.php) > Forumhome (http://www.eclipserecords.com/forum/index.php) > User Control Panel


Now, my entire site uses the navbar template for all pages, even all the custom scripts and pages in the root directory, so what I need is some way to display a link within the breadcrumb to the Forum main index page, but only when viewing pages within the forums.


How would I go about doing that?

Antivirus
05-01-2007, 06:11 PM
bump, anyone? I'm still stumped on this. I think I have to add to the breadcrumb array but not sure exactly where.

CyberAlien
05-01-2007, 06:25 PM
Try to change your current homepage link to forum index, as it used to be before hack you installed for index, then in navbar manually add one more link to homepage before other links.

Antivirus
05-01-2007, 07:00 PM
Try to change your current homepage link to forum index, as it used to be before hack you installed for index, then in navbar manually add one more link to homepage before other links.

ooo... that sounds like a good idea.

[tried]

well, it seems that quite a few of my custom scripts use $vboptions['homeurl'] when calling each other, and it occurs a bunch of times in custom templates as well, so unfortunately changing that breaks stuff :( . I could go through everythingand revise it all as you suggested, but there's got to be an easier way, like adding another step to the navbar array based upon a globalized conditional such as:


if (this_script == "customscript")
{
add to $navits array
}


any idea how to do it that way?

CyberAlien
05-01-2007, 08:47 PM
<if condition="THIS_SCRIPT == 'customscript'"> blah </if>

Antivirus
05-01-2007, 09:18 PM
<if condition="THIS_SCRIPT == 'customscript'"> blah </if>

I suppose i could add a conditional link within the NAVBAR template as opposed to adding the site homepage to the $navbit array . I'll give it a try and see how it works, thanks!

wottech
05-06-2008, 09:50 PM
Did you ever figure this out? I am trying to do something similar and it would be great to just be able to paste some known working code instead of trying to start from scratch. Thanks!

Antivirus
05-07-2008, 04:28 PM
Did you ever figure this out? I am trying to do something similar and it would be great to just be able to paste some known working code instead of trying to start from scratch. Thanks!

No actually, the template conditional didn't work well. I actually ended up just placing ALL my custom files within the /forum as opposed to root directory which resolved the problem.