vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create a New Tab in the navbar (with template) (https://vborg.vbsupport.ru/showthread.php?t=228313)

Anseur 11-21-2009 09:32 PM

Is your templace called "member_ranks" or something else?

Hoagie 11-22-2009 01:33 AM

Its called vbcms_ranks

Please tell me its not that simple.......I knew it would be something simple I was over looking...

Zaiaku 11-22-2009 10:32 PM

Perfect! I didn't want to have to edit the files especially since its in beta.

ragtek 11-23-2009 04:47 AM

Quote:

Originally Posted by Hoagie (Post 1918365)
Plug In Code:
Code:

$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'member_ranks')
{
    $vbulletin->options['Ranks']='unique_name';
    $tabselected = ' class="selected"';

}
$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="ranks.php">Ranks</a>'.$tablinks.'</li>' ;

Template Code:
Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <head>
    <title>{vb:raw vboptions.bbtitle}</title>
    {vb:raw headinclude}
  </head>
  <body>
   
    {vb:raw header}
   
    {vb:raw navbar}
   
    <div id="pagetitle">
      <h1>{vb:raw pagetitle}</h1>
    </div>
   
    <h2 class="blockhead">=MK= Member Ranks</h2>
    <div class="blockbody">
      <div class="blockrow">

<div>
MY CUSTOM CODE WENT HERE ( Removed to save some space)
  </div>
</div>

      </div>
    </div>
   
    {vb:raw footer}
  </body>
</html>


And what's with the template for the navbar?
I think you made it completely false

Hoagie 11-23-2009 04:38 PM

vbcms_navbar_add
Code:

<vb:if condition="$vboptions['selectednavtab'] == 'Ranks'">
<li class="selected">
  <a class="navtab" href="ranks.php{vb:raw session.sessionurl_q}">{vb:rawphrase ragtek_news}</a></li>
<vb:else />
</vb:if>


ragtek 11-24-2009 04:27 AM

Try this:
PHP Code:

if (THIS_SCRIPT == 'member_ranks')
{
    
$tabselected ' class="selected"';
$vbulletin->options['selectednavtab'] = 'Ranks'


$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="ranks.php">Ranks</a>'.$tablinks.'</li>' 

You have to set $vbulletin->options['selectednavtab'] because if it's empty vbulletin sets the forum to standard and then you have 2 "active tabs"

Hoagie 11-25-2009 01:45 PM

1 Attachment(s)
That didnt work.........

but it did add a light gray line at the top of the page....

kingMOB 11-26-2009 05:23 PM

Hi ragtek, thanks for the code, will use it later =)

Right now I'm trying to do something a little differente: create a tertiary navbar just below the sections navbar for the CMS page. In this tertiary navbar wil be listed the subsections for the sections in the navbar. So if there's a section named "Music" in the navbar, when clicked, the tertiary navbar wil show the subsections from "Music". It's almost the same as the Section Navigation Widget, but in the navbar and without all that java =)

Is this possible, and, how? =)

Thank you =)

ragtek 11-26-2009 05:51 PM

Quote:

Originally Posted by kingMOB (Post 1921308)
Hi ragtek, thanks for the code, will use it later =)

Right now I'm trying to do something a little differente: create a tertiary navbar just below the sections navbar for the CMS page. In this tertiary navbar wil be listed the subsections for the sections in the navbar. So if there's a section named "Music" in the navbar, when clicked, the tertiary navbar wil show the subsections from "Music". It's almost the same as the Section Navigation Widget, but in the navbar and without all that java =)

Is this possible, and, how? =)

Thank you =)

phuuuuuuu, very good question, but i don't know how to make it
sorry

ndL 11-27-2009 07:26 PM

please post "news.php" content, because i cant find how to make a selectednavtab, did what you have said, but it still doesnt work!


All times are GMT. The time now is 08:41 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01816 seconds
  • Memory Usage 1,745KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete