Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2012, 05:07 PM
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default New tab not staying selected

When I create a new tab using the Navigation Manager it highlights when I click on it but when the new page opens the previous tab (home, forum, what's new) is highlighted as selected. The new tab does not stay selected after the page opens.

Has anyone else experienced this problem? How did you get around it?
Reply With Quote
  #2  
Old 05-26-2012, 06:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can we see an image of your settings for the tab in the Navigation Manager?
Reply With Quote
  #3  
Old 05-26-2012, 06:10 PM
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The settings are as follows:

Active: Yes
Product: vBulletin
Title: Services
Target URL: I set this to my new page which it opens ok
Display Order: 50
Show Permission Name: I leave this as blank
Append Tabid to URL: No
Tab Scripts: This is blank

Try it yourself. Add a new tab to open a new page then start up your site on one of your existing pages , then click to the new page tab and see if it stays selected and highlighted
Reply With Quote
  #4  
Old 05-26-2012, 06:19 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to enter something for the Tab Scripts. That is the THIS_SCRIPT name at the top of the php page. Or, if you have no THIS_SCRIPT, you just need a plugin to set the $root variable. Example for a forumdisplay page used as a navtab:

hook - set_navigation_tab_main

PHP Code:
if (in_array($GLOBALS['forumid'], array(2,15)))  $root 'tab_nzg3_214'
Reply With Quote
  #5  
Old 05-26-2012, 06:36 PM
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok...that worked. But a second issue developed. I have two new tabs that call the same php file with different parms.

When I set both tabs with the same script name the first one always is set as selected even after I click on the second one.

To get around this I created a clone of the php and put a suffix of "2" at the end of the file name and the script name in the cloned php Then I added the suffix to the script name in the second tab. Now everything works.

Cloning the php file is not an elegant solution by any means but it does work and is the only solution I have right now.

Thanks for the info
Reply With Quote
  #6  
Old 05-26-2012, 07:33 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this a vbulletin file, or a custom file ?
Reply With Quote
  #7  
Old 05-26-2012, 07:55 PM
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm adding custom pages using this mod:

https://vborg.vbsupport.ru/showthread.php?t=235359

I posted the detailed solution in the mod comments. It's ugly but it solves the problem.
Reply With Quote
  #8  
Old 05-26-2012, 09:27 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The way to solve it would be to write a plugin like I was showing in post 4 based on THIS_SCRIPT and the parameter that is passed.
Reply With Quote
  #9  
Old 05-26-2012, 11:00 PM
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
Posts: 305
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured there was a better way to solve the problem then what I came up with.
Reply With Quote
  #10  
Old 05-28-2012, 01:35 PM
jdj jdj is offline
 
Join Date: Sep 2009
Location: Hertfordshire, UK
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You need to enter something for the Tab Scripts. That is the THIS_SCRIPT name at the top of the php page. Or, if you have no THIS_SCRIPT, you just need a plugin to set the $root variable. Example for a forumdisplay page used as a navtab:

hook - set_navigation_tab_main

PHP Code:
if (in_array($GLOBALS['forumid'], array(2,15)))  $root 'tab_nzg3_214'
The new navigation manager looks quite useful to me. I just put in a URL to another site and that worked fine.

If on the same top level domain I want to set the tab to display e.g. the members list, or the calendar, then what script would I add here to get the tab to pull up a particular calendar or the list?

PS: I know that if I put in /calendar in the URL box in the navigation manager then the calendar will come up, but the forum tab remains selected. So I'm guessing the answer is the same I need to put a script in the script box for the new 'calendar' or 'members' tab to remain highlighted. So which one for calendar, which one for members list?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:52 AM.


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.05539 seconds
  • Memory Usage 2,274KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete