PDA

View Full Version : error with vb page integration?


apokalupsis
07-22-2004, 01:46 AM
This may not be a 'bug' or error, but I want to confirm that this is supposed to happen and there isn't any code that should be there, to ensure it doesn't.

I followed this to the "T":

http://vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=6

What I did, was integrate the the side menu with the FAQ (faq.php).

If you go to the site: www.myfamilycorner.net , you'll see the navigation on the left. All links work fine. Click FAQ, and that "appears" to work fine.

The problem is...when you go to the FAQ, we are actually in the forums/ directory (not the root/ directory where vbCMPS is installed. This breaks the navmenu on the left as it adds forum/ into the path. The dot.gif also disappears from the first section.

Now...the fix I suppose, would be to use absolute url paths. I did that with the first few links, all seems fine. But is this the only way? Is there a better way to do this? I don't mind adding in the absolute paths to resolve this...but I want to make sure that this is the only way, or best way to do so.

Brian
07-22-2004, 02:10 AM
That's not an error, that's the way HTML works. If you just use "index.php" as a link, then it looks for that file in the folder you're currently in. If you use "/index.php" instead then it will look for the file in your root directory. ;)

Our Sponsors
 

apokalupsis
07-22-2004, 01:52 PM
ok ok, that's what I thought...but I was hoping there was some magical-uber-code in there that could tell it what to look for, and would save me the time of typing out the absolute paths. ;) hehe

Thanks for the quick response, as usual.

apokalupsis
07-22-2004, 04:05 PM
Knew there was a better way that using "absolute paths". ;)

Just use:
<a href="$vboptions[forum_home]/..."> for any links. That way, it will always take you the corrected url. Useful if there is a lot of navigation or desigining for multiple sites.

Our Sponsors
 

Brian
07-23-2004, 12:55 PM
$vboptions[forum_home] isn't a real variable. Since it's blank, that's just producing a link that looks like this: "/", which is basically the same as I suggested.