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 (https://vborg.vbsupport.ru/showthread.php?t=226914)

HMBeaty 07-18-2011 10:18 PM

Quote:

Originally Posted by Lynne (Post 2222168)
It belongs at the very, very end. It should be your last line in the plugin.

edit: Well, I guess while I was typing Brooks was being the young whippersnapper he is and answering way, waaaaay faster than me!

Not really young anymore lol

Spyike 07-18-2011 10:18 PM

Quote:

Originally Posted by Lynne (Post 2222168)
It belongs at the very, very end. It should be your last line in the plugin.

edit: Well, I guess while I was typing Brooks was being the young whippersnapper he is and answering way, waaaaay faster than me!

Thank you as well.

If I wanted to have the Sublink drop downs directly from the original tab, rather than Tab > Link > Sublink, would I simply delete the lists and leave the unordered lists?

Thanks

Lynne 07-18-2011 11:25 PM

Quote:

Originally Posted by Spyike (Post 2222175)
Thank you as well.

If I wanted to have the Sublink drop downs directly from the original tab, rather than Tab > Link > Sublink, would I simply delete the lists and leave the unordered lists?

Thanks

There is another article about how to make the navtabs dropdowns themselves. You should be able to find it in this forum.

Spyike 07-18-2011 11:49 PM

Quote:

Originally Posted by Lynne (Post 2222201)
There is another article about how to make the navtabs dropdowns themselves. You should be able to find it in this forum.

https://vborg.vbsupport.ru/showthread.php?t=232579 only applies to the Sublink drop downs as does https://vborg.vbsupport.ru/showthread.php?t=232579

AlokSharma 07-30-2011 06:26 AM

Just in case, if someone only wants to add a tab, here is the modified code:

PHP Code:

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

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

Replace:
PHP Code:

if (THIS_SCRIPT == 'chat'

and
PHP Code:

$vbulletin->options['selectednavtab']='chat'

With some unique name.

odln018 08-12-2011 05:00 PM

If possible, could I get some personal assistance in getting this to work on my forum?

I would try some products, but I'm concerned about the developers bailing out, and figure it would be beneficial just to see how it's done "manually".

christian gate 08-15-2011 06:47 PM

Hi, I have 2 questions please

1. If I need to create more than 1 tab, would I have to keep adding this blugin for each tab, if not so how can i use it for more than 1 tab?

2. I need to make 3 different forums ( already Exit), each will have own tab in the navbar, can I do that with this blugin, how?

I am new with coding and if you please give me a step by step instructions.


Thanks:confused:

Lynne 08-15-2011 11:33 PM

1. You may add the plugin code several times into the same plugin and just change the condition for each.

2. Just add a unique condition for each.

HolyKiller 08-17-2011 09:16 PM

Lynne & wowautoauctions: THANKS a LOT !!!

It works excelent for sub-forum with proper highlighting!


Code:

$tabselected = '';
$tablinks = '';
if ($GLOBALS['forumid'] == 222)
{
    $vbulletin->options['selectednavtab']='SOMETHING';
    $tabselected = ' class="selected"';
}
$template_hook['navtab_middle'] .= '<li'.$tabselected.'><a class="navtab" href="http://yoursite/forumdisplay.php/222-Blablabla">SOMETHING</a>'.$tablinks.'</li>' ;

Anyway, one more thing...

Now i have navbar like this:

CMS_FORUM_BLOGS_AAA_BBB_CCC_WHATSNEW

and i would like to have it like this:

CMS_FORUM_AAA_BBB_CCC_BLOGS_WHATSNEW

How to "move" that "BLOG" to the right?

Thanks!

Lynne 08-17-2011 10:49 PM

Quote:

Originally Posted by HolyKiller (Post 2234727)
Anyway, one more thing...

Now i have navbar like this:

CMS_FORUM_BLOGS_AAA_BBB_CCC_WHATSNEW

and i would like to have it like this:

CMS_FORUM_AAA_BBB_CCC_WHATSNEW_BLOGS

How to "move" that "BLOG" to the right?

Thanks!

There are template_hooks in the navbar that are being used to place the navtabs. If you want to move a tab, then find the template hook you want to use and change the existing one (in this case it is a plugin in the blog product) to use the new one.


All times are GMT. The time now is 05:47 AM.

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.01767 seconds
  • Memory Usage 1,753KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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