PDA

View Full Version : new entries and other in navbar broken in the showentry


deathemperor
07-15-2011, 04:27 AM
new entries and other in navbar broken in the showentry page only
but it will show correctly in other pages

this also exist in vba links
in link show page

navbar links for: new entries in last xx days and also famous visited entries and other broken and give link for the main doman site not for vba dyna home or vba links home

see http://books.alwatanyh.com/
and just visit any entry then click the new entries to see it will point to the main domain

Brian
07-15-2011, 07:05 PM
Thank you for pointing this out. I have just applied the fix to the forum/includes/vba_dyna_plugin_pt.php file in the download package here, so if you will download the files from here again and update that one on your server then that should fix the problem.
Or if you would like to apply the fix manually just look in the file for this line:
$newdynabits = dyna_construct_newpop_links(ADV_DYNA_PREFIX . '_navbar_newestbits');

And repalce it with this:
$newdynabits = dyna_construct_newpop_links(ADV_DYNA_PREFIX . '_navbar_newestbits', $vba_options['dyna_homeurl'] . '/');

For vBa Links, if you will edit your 'Process Navbar Replacements' plugin via the Admin CP and replace the Plugin PHP Code with the following, that should take care of the links in it.
// ##### Handle Navbar
if (VBA_SCRIPT == 'links_directory')
{
global $navbits, $repfiles, $linksnav, $vba_options, $mylinkslink;

// ##### navbar replacements
$repfiles = array();

$navreplace = array(
'find' => array(
'"clientscript',
'\'misc.php'
),
'replace' => array(
'"' . $vbulletin->options['bburl'] . '/clientscript',
'\'' . $vbulletin->options['bburl'] . '/misc.php'
)
);

$navreplace['find'][] = '\' . $vboptions[\'forumhome\'] . \'.php';
$navreplace['replace'][] = '\' . $vboptions[\'bburl\'] . \'/\' . $vboptions[\'forumhome\'] . \'.php';

$navreplace['find'][] = 'vB_Template_Runtime::linkBuild("forumhome")';
$navreplace['replace'][] = '\'' . $vbulletin->options['bburl'] . '/\' . vB_Template_Runtime::linkBuild("forumhome")';

replace_template_filenames('navbar', $navreplace);


// stop the replacements from replacing search.php in the vBa Links navtabs template
if ($search_repkey = array_search('"search.php', $repfiles['find']))
{
unset($repfiles['find'][$search_repkey]);
unset($repfiles['replace'][$search_repkey]);
}

// ##### Hook replacements (from navbar)
$hookreplacenames = array(
'navtab_start',
'navbar_start',
'navbar_after_getnew',
'navbar_after_pm',
'navbar_after_faq',
'navbar_after_calendar',
'navbar_community_menu_start',
'navbar_community_menu_end',
'navbar_after_community',
'navbar_quick_links_menu_pos1',
'navbar_quick_links_menu_pos2',
'navbar_quick_links_menu_pos3',
'navbar_quick_links_menu_pos4',
'navbar_end',
'navtab_middle',
'navbar_getnew_menu',
'navbar_getdaily_menu',
'navtab_end'
);

if (!empty($repfiles))
{
foreach ($hookreplacenames AS $hookr)
{
if (!$template_hook[$hookr])
{
continue;
}

$template_hook[$hookr] = str_replace(
$repfiles['find'],
$repfiles['replace'],
$template_hook[$hookr]
);
}
}
}

// vBa Links Navbar
if ($vbulletin->options['vba_links_addnavbar'] OR VBA_SCRIPT == 'links_directory')
{
if ($vba_options['links_linktous'])
{
$show['link_to_us'] = true;
}

// New / popular link links
if ($vba_options['links_spiderurls'])
{
$newlinkslink = 'whatsnew/links/';
$newpostslink = 'whatsnew/posts/';

$poplinklinks = array(
'views' => $vba_options['links_homeurl'] . '/whatspopular/views/' . $vbulletin->session->vars['sessionurl_q'],
'rating' => $vba_options['links_homeurl'] . '/whatspopular/rating/' . $vbulletin->session->vars['sessionurl_q'],
'posts' => $vba_options['links_homeurl'] . '/whatspopular/posts/' . $vbulletin->session->vars['sessionurl_q']
);
}
else
{
$poplink = $vba_options['links_homeurl'] . '/browselinks.php?' . $vbulletin->session->vars['sessionurl'] . 'do=poplinks&orderby=';
$newlinkslink = $vba_options['links_homeurl'] . '/browselinks.php?' . $vbulletin->session->vars['sessionurl'] . 'do=newlinks&cutoffdate=';
$newpostslink = $vba_options['links_homeurl'] . '/browselinks.php?' . $vbulletin->session->vars['sessionurl'] . 'do=newposts&cutoffdate=';

$poplinklinks = array(
'views' => $poplink . 'views',
'rating' => $poplink . 'rating',
'posts' => $poplink . 'posts'
);
}

if ($vba_options['links_newlinklimit'])
{
$newlimits = explode(',', $vba_options['links_newlinklimit']);
}

$templater = vB_Template::create('adv_links_navbar');
$templater->register('catid_int', $catid_int);
$templater->register('lnavbarwidth', $lnavbarwidth);
$templater->register('mylinkslink', $mylinkslink);
$templater->register('newlimits', $newlimits);
$templater->register('newlinkslink', $newlinkslink);
$templater->register('newpostslink', $newpostslink);
$templater->register('orderby', $orderby);
$templater->register('poplinklinks', $poplinklinks);
$templater->register('vba_options', $vba_options);

if ($vbulletin->options['vba_links_addnavbar'])
{
if (VBA_SCRIPT == 'links_directory')
{
$vbulletin->options['selectednavtab'] = 'vba_links';
}

$template_hook['navtab_' . $vbulletin->options['vba_links_addnavbar']] .= $templater->render();
}
else
{
$linksnav = $templater->render();
}
}

Our Sponsors
 

deathemperor
07-16-2011, 11:36 AM
about vba dynamic , it is fixed

about vba links
still what is new will show links from the main doman but the famous links is fixed
so plz any fix for what is new for vba links