vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin Tips & Tricks (https://vborg.vbsupport.ru/forumdisplay.php?f=239)
-   -   [HOW TO - vB4] Adding a Link to Navbar (https://vborg.vbsupport.ru/showthread.php?t=245826)

almannai 07-02-2010 10:00 PM

[HOW TO - vB4] Adding a Link to Navbar
 
1. Go to
Admincp > Styles and Templates > Style Manager > MASTER STYLE (this will effect all style or just choose the Style you want to add link to it)> Navigation / Breadcrumb Templates > Navbar

open it and search for
PHP Code:

{vb:raw template_hook.navtab_end

Add above
PHP Code:

<vb:if condition="THIS_SCRIPT == 'mynewpage'">
<
li class="selected"><class="navtab" href="mynewpage.php">mylink</a></li>
<
vb:else />
<
li><class="navtab" href="mynewpage.php">mylink</a></li>
</
vb:if> 


Search for
PHP Code:

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"

Replace with
PHP Code:

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'mynewpage'"



2. Save and you are done.

james6578 02-02-2011 02:50 PM

thanks almannai, been looking for something like this for hours!

btw, for other users, when I searched for {vb:raw template_hook.navtab_end} it came back 'Not Found' so try searching for 'template_hook' instead until you ind the right one.

otterag 03-08-2011 02:13 PM

I am using vb 4.1.2 cms and found the

{vb:raw template_hook.navtab_end}

added the code above it, with my page link and the title that i wanted the tab.

<vb:if condition="THIS_SCRIPT == 'mynewpage'">
<li class="selected"><a class="navtab" href="mynewpage.php">mylink</a></li>
<vb:else />
<li><a class="navtab" href="mynewpage.php">mylink</a></li>
</vb:if>

but when clicked it still showed the home tab selected. but when i searched for

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">

it didnt come up, the only thing i could fine in the script was

<vb:if condition="!$vboptions['selectednavtab']>

I am not sure what to do with this.

christian gate 08-15-2011 04:53 PM

:confused:I am using vb 4.1.5 cms and found the

{vb:raw template_hook.navtab_end}

added the code above it, with my page link and the title that i wanted the tab.

But when I click The new tabs it still show the Forum tab selected

The new tabs are linked to other forum and I tried to disable the Show Forum Link in Menu but it's still showing, Can someone help please, Thanks

matrex722 04-04-2013 03:38 PM

nice work


All times are GMT. The time now is 06:15 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01151 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete