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)

Mythotical 04-22-2010 02:15 AM

Using $_GET['r'] isn't working. It will still have the Home tab and the new tab highlighted with both overlapping each other for sub links.

arilukes 04-26-2010 12:49 AM

This works perfectly and is a very easy to understand tutorial on how to create a new tab. I had no problems whatsoever in implementing this.

Thank you so much

Mythotical 04-26-2010 04:36 PM

Ok Yonatan's suggestion didn't work on 4.0.3 PL1. It is causing Home and my tab to be highlighted with all subsections from both displaying.

Lynne 04-26-2010 06:29 PM

Quote:

Originally Posted by Steve M (Post 2027696)
Ok Yonatan's suggestion didn't work on 4.0.3 PL1. It is causing Home and my tab to be highlighted with all subsections from both displaying.

How did you modify the condition for the submenu for the Home tab? If you don't modify it, it will always show as long as you are in the vbcms area since that is how the condition is written.

arilukes 04-28-2010 06:07 AM

I guess the code doesn't work for anything child level including subsections. I used $_GET and put all of my sections and subsections in an array in the vbcms, but only the top level sections will show the tab as hightlighted with the proper subnavbar below. If I click on a subsection, the correct tab stays highlighted, but the subnavbar selections disappear.

This is what I am using in the vbcms

PHP Code:

<vb:if condition="$vboptions['selectednavtab'] == 'vbcms' AND !in_array($_GET['r'], array(181,182,183,184,185,186,187,188,189,190,199,200,201,202,203,210,211,212,213,214,215,216,217,218,219,220,221,222))"

I tried using this in my tab plug-in to see if this fixed the issue

PHP Code:

if (((in_array($_GET['r'], array(181,182,183,184,185,186,187,189,190)) && (THIS_SCRIPT == 'vbcms'))) 

but I get this error

Parse error: syntax error, unexpected '{' in /data/22/2/56/92/2056418/user/2253608/htdocs/forumsbb/includes/class_bootstrap.php(399) : eval()'d code on line 14

Lynne 04-28-2010 01:40 PM

Count your ( and ) - they don't add up, which is why you got the error.

arilukes 04-28-2010 10:18 PM

Yup that was totally it. Thanks!

aaronater 04-29-2010 01:12 PM

Hi, this thread is very long and I'm still quite new to vB but have experience in developing. Is there a tutorial somewhere that shows you how to create the new sections and how to have the navbar tabs link to them all in one?

Thanks.

Lynne 04-29-2010 01:45 PM

Quote:

Originally Posted by aaronater (Post 2029009)
Hi, this thread is very long and I'm still quite new to vB but have experience in developing. Is there a tutorial somewhere that shows you how to create the new sections and how to have the navbar tabs link to them all in one?

Thanks.

Create Sections? Like in the CMS? There are a bunch of articles on vb.com about the CMS. And when you create a section, you may select the option to put the link in the subnavmenu. You can read the articles about this.

aaronater 04-29-2010 02:20 PM

Hi,

Thanks, the thing is when I search 'create new section' or 'create section' I do not get any returns of any interset. I have tried searching but find lots of really basic stuff but not how to create new sections, I might be confused.

Basically I want to create a new tab called 'Contacts' which will link to a page with lists of names and contact details. It's straight forward how to add the tab but what about the pages of content to go along with it?

I understand the code you pasted originally and conditions.

In section manager I can only add sections to 'Home' I want to create a section to be linked to the new tab 'Contacts'


All times are GMT. The time now is 03:42 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.02502 seconds
  • Memory Usage 1,743KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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