Got an answer from Brian over at vbadvanced. Everything in your coding is fine. The includes/functions_links.php constructs the navbar. The links scripts read the PHPINCLUDE_START template but you have to include
$mylinks in the global line and then the "My Links" shows in the navbar on the links directory pages. The only changes in the array section would be if a user did not write in a full url path in the My Links text box. Such would be the case as in [ post=475]Post #475[/post]. The url would show in the "Directory" navbar with the "links directory folder in front of showthread.php - /links/showthread.php etc.. of course being wrong. One fix is to include showthread.php in the array:
Try replacing that function in includes/functions_links.php with this:
Quote:
// ##################### Construct Navbar #################################
if (!function_exists('construct_adv_navbar'))
{
function construct_adv_navbar($navbits, $index = 'false')
{
global $vboptions, $vba_options, $vbphrase, $stylevar, $bbuserinfo, $show, $pmbox, $mylinks;
if (!empty($navbits))
{
$navbits = construct_navbits($navbits);
}
eval('$navbar = "' . fetch_template('navbar') . '";');
$navbar = str_replace(
array(
'"memberlist.php',
'"usercp.php',
'"register.php',
'"faq.php',
'"calendar.php',
'"search.php',
'"login.php',
'"forumdisplay.php',
'"profile.php',
'"private.php',
'"subscription.php',
'"member.php',
'"online.php',
'"clientscript',
'\'misc.php',
'"showthread.php',
$vboptions['bbtitle'],
'"' . $vboptions['forumhome'] . '.php'
),
array(
'"' . $vboptions['bburl'] . '/memberlist.php',
'"' . $vboptions['bburl'] . '/usercp.php',
'"' . $vboptions['bburl'] . '/register.php',
'"' . $vboptions['bburl'] . '/faq.php',
'"' . $vboptions['bburl'] . '/calendar.php',
'"' . $vboptions['bburl'] . '/search.php',
'"' . $vboptions['bburl'] . '/login.php',
'"' . $vboptions['bburl'] . '/forumdisplay.php',
'"' . $vboptions['bburl'] . '/profile.php',
'"' . $vboptions['bburl'] . '/private.php',
'"' . $vboptions['bburl'] . '/subscription.php',
'"' . $vboptions['bburl'] . '/member.php',
'"' . $vboptions['bburl'] . '/online.php',
'"' . $vboptions['bburl'] . '/clientscript',
'\'' . $vboptions['bburl'] . '/misc.php',
'"' . $vboptions['bburl'] . '/showthread.php',
iif($vba_options['links_navbarhomelink'], $vboptions['hometitle'], $vba_options['links_title']),
'"' . iif($vba_options['links_navbarhomelink'], $vboptions['homeurl'], $vba_options['links_homeurl'])
), $navbar);
return $navbar;
}
}
|
I tried the changes above and they work. But it might be just as easy to have users enter the full url path. Most of mine aren't too good with bbcodes anyway. So I just left in the global line - $mylinks, instructed my users to put in the full url path and everything is working fine.
BTW Michael - you may find other scripting problems in the vbadvanced links program where the links directory folder is placed in front of a typical forum file path - /forum/links/member.php? for example. Look in any array section in the links php files (like browslinks.php, showlink.php, misc.php, etc) that deal with a forum function(member.php is one). Had that problem when I first installed "Links Directory". Brian has cleaned up a lot of the code, but you may hit a snag.
Thanks and have a Happy New Year!!
John