Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 26 May 2012, 19:07
Disco_Stu's Avatar
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
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 26 May 2012, 20:00
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Can we see an image of your settings for the tab in the Navigation Manager?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 26 May 2012, 20:10
Disco_Stu's Avatar
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
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 26 May 2012, 20:19
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 26 May 2012, 20:36
Disco_Stu's Avatar
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
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 26 May 2012, 21:33
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Is this a vbulletin file, or a custom file ?
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #7  
Old 26 May 2012, 21:55
Disco_Stu's Avatar
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
I'm adding custom pages using this mod:

http://www.vbulletin.org/forum/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 26 May 2012, 23:27
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #9  
Old 27 May 2012, 01:00
Disco_Stu's Avatar
Disco_Stu Disco_Stu is offline
 
Join Date: Apr 2012
I figured there was a better way to solve the problem then what I came up with.
Reply With Quote
  #10  
Old 28 May 2012, 15:35
jdj jdj is offline
 
Join Date: Sep 2009
Real name: JJ
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
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?

Last edited by jdj; 28 May 2012 at 15:48.
Reply With Quote
  #11  
Old 28 May 2012, 19:03
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
If it's a navtab, not a link/menu item, then you need to add something to the Tab Script(s) textarea to get it to stay (or do a plugin like I wrote). For the calendar, if you look at the top of that file, you'll see this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

So, enter "calendar" (no quotes) into that field.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #12  
Old 30 May 2012, 16:26
bosken bosken is offline
 
Join Date: Jan 2011
Ok, managed to solve almost all my tabs to stay highlighted except for this one:

An external app for links. harleyforum.se/links/index.php is the path.

If i put the word index in script field it messes up, obviously. What should I put there?


Last edited by bosken; 30 May 2012 at 16:34.
Reply With Quote
  #13  
Old 30 May 2012, 18:15
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Well, does the file have THIS_SCRIPT defined at the top of it?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #14  
Old 30 May 2012, 22:27
bosken bosken is offline
 
Join Date: Jan 2011
Originally Posted by Lynne View Post
Well, does the file have THIS_SCRIPT defined at the top of it?
Yes Lynne! now i understand the whole thing. I was on my iPad so had limited options to view the file correctly. It said links_index Thank you!

--------------- Added 30 May 2012 at 22:33 ---------------

However it does not work, first time I click the tab it works, but as soon I go back and click the forum, blog or article tab, it cant find that page, it points forum to mysite.se/links/forum, but should be mysite.se/forum only?

This is my forum tab, default, if it helps you.


Last edited by bosken; 30 May 2012 at 22:44.
Reply With Quote
  #15  
Old 31 May 2012, 03:10
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
If your other tabs are not working, then there is another issue going on.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selected Tab zodehala vBulletin Status Icon Sets 9 20 May 2011 00:07



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 00:11.

Layout Options | Width: Wide Color: