Log in

View Full Version : have navbar working outside vb but problem with links


arestech
11-03-2006, 09:25 PM
hello
I have navbar coming up on non vb pages but i want to place the navbar on pages in my root directory / and the forums are in a subdirectory /forums, the code im using is below everything works as i said but the links that are being generated in navbar are going to www.site.com/usercp.php etc all top level, when i need it to point to www.site.com/forums/usercp.php what can i add so it appends /forums to all the links it generates i want to use other templates after i get this working any help's appreciated thanks

<?php

chdir('forums');
require_once("./global.php");
eval('$headinclude = "' . fetch_template('headinclude') . '";');
eval('$header = "' . fetch_template('header') . '";');
eval('$navbar = "' . fetch_template('navbar') . '";');

echo $headinclude;
echo $header;
echo $navbar; ?>

Code Monkey
11-04-2006, 03:24 AM
In your navbar template try adding $vboptions[bburl] to your links.

<a href="$vboptions[bburl]/usercp.php">

Same as you would have if you are using it in root on something like CMPS