The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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? |
#2
|
||||
|
||||
Can we see an image of your settings for the tab in the Navigation Manager?
|
#3
|
|||
|
|||
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 |
#4
|
||||
|
||||
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:
|
#5
|
|||
|
|||
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 |
#6
|
||||
|
||||
Is this a vbulletin file, or a custom file ?
|
#7
|
|||
|
|||
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. |
#8
|
||||
|
||||
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.
|
#9
|
|||
|
|||
I figured there was a better way to solve the problem then what I came up with.
|
#10
|
|||
|
|||
Quote:
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? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|