Announcement

Collapse
No announcement yet.

Use Navigation Manager to Create New Tab and Remain Selected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lynne
    replied
    I see group.php just fine on your site. (Well, I see the page but I need to login to actually see the groups.)

    Leave a comment:


  • jdj
    replied
    How do I find the group.php page?

    Originally posted by Lynne View Post
    You can find this yourself by opening up the group.php or album.php page and looking at the top for this:
    Code:
    define('THIS_SCRIPT', 'group');
    the item in red is what you put in the Tab Script(s) textarea.
    Thank you for your answer, I appreciate it.

    If I go to my site, log in, go to forum and click 'forum', then 'community' and then 'groups' what comes up in the navigation bar is www.mysite.co.uk/group.php. That's all.

    So how and where do I find group.php?

    Leave a comment:


  • Lynne
    replied
    Originally posted by jdj View Post
    What are the settings I need for groups and albums?
    You can find this yourself by opening up the group.php or album.php page and looking at the top for this:
    Code:
    define('THIS_SCRIPT', 'group');
    the item in red is what you put in the Tab Script(s) textarea.

    Leave a comment:


  • Matthew Gordon
    replied
    group for the Tab Script(s), group.php for the URL.

    Leave a comment:


  • jdj
    replied
    Originally posted by Matthew Gordon View Post
    If you want the tab to be selected for the calendar, memberlist, and groups pages, yes. If you just want the tab to be just for the calendar, simply put calendar for the Tab Script(s).
    Thank you . I now know it's calendar as the script for calendar, /calendar.php as url, memberlist as the script for memberlist, /memberlist.php as the URL. From a separate thread I know it's faq as the script for faqs and I'm assuming [but haven't tested] /faq.php as the url.

    What are the settings I need for groups and albums?

    Leave a comment:


  • Matthew Gordon
    replied
    If you want the tab to be selected for the calendar, memberlist, and groups pages, yes. If you just want the tab to be just for the calendar, simply put calendar for the Tab Script(s).

    Leave a comment:


  • jdj
    replied
    Originally posted by Matthew Gordon View Post
    Setting the Tab Script(s) to this should do the trick:
    Code:
    calendar.memberlist.group
    Multiple scripts are separated with a dot. It uses the THIS_SCRIPT constant, which is usually (not always) the name of the PHP file that is used. When in doubt, open the PHP file that is being called and look at the top of it. You'll see something like this:
    PHP Code:
    define('THIS_SCRIPT''memberlist'); 
    So just to clarify, using calendar as an example:

    In title I put: calendar
    In target url I put: /calendar.php
    In Tab Script(s) I put: calendar.memberlist.group [as opposed to just calendar]

    And doing that will cause the new calendar tab to remain highlighted.

    PS: I just tested out your answer on my test site. I have created new tabs for the memberslist and calendar with the members tab set at display order 60 and calendar at display order 70. If I put calendar.memberlist.group into the Tab Script(s) box and click the calendar tab then the link takes me to the calendar but the new 'members' tab remains highlighted, not the new calendar tab. If I put just 'calendar' in the Tab Script(s) box for the new 'calendar' tab and 'memberslist' in the Tab Script(s) box for the new 'members' tab then each tab remains highlighted.
    Last edited by jdj; Tue 29th May '12, 7:21am.

    Leave a comment:


  • Matthew Gordon
    replied
    Setting the Tab Script(s) to this should do the trick:
    Code:
    calendar.memberlist.group
    Multiple scripts are separated with a dot. It uses the THIS_SCRIPT constant, which is usually (not always) the name of the PHP file that is used. When in doubt, open the PHP file that is being called and look at the top of it. You'll see something like this:
    PHP Code:
    define('THIS_SCRIPT''memberlist'); 

    Leave a comment:


  • jdj
    replied
    Thanks...it's not my script...so what should it be?

    Originally posted by mainframe View Post
    Hi jdj,

    You need to enter the name of the script on which your button should be selected in the "Tab Script(s)" settings for that tab.
    Thanks for the reply .

    It's not my script though: It's actually one of the scripts for vBulletin, whatever script it is that's delivering calendar/memberslist/groups.

    So what script should it be? I'm not trying to ensure that the tab remains highlighted for one of my scripts; I'm trying to highlight some of the features that are already built into vBulletin.

    Leave a comment:


  • mainframe
    replied
    Hi jdj,

    You need to enter the name of the script on which your button should be selected in the "Tab Script(s)" settings for that tab.

    This can be used to specify a number of scripts that the system will use to check if the Tab should be seleted. The constant THIS_SCRIPT is checked, and if it matches any of the specified script names, the tab will be marked to be displayed as selected. All vBulletin frontend scripts set a THIS_SCRIPT value.

    You can specify more than one by joining them with a dot - however, this option is limited to 30 characters maximum, it is not designed for mass usage. If you are writing a product that uses many different scripts, you should set your own constant in them, and use the 'set_navigation_tab' hook to detect this constant and set your selected tab.

    Leave a comment:


  • Use Navigation Manager to Create New Tab and Remain Selected

    I've just upgraded to 4.2.0, I like the new Navigation manager that allows you to create new tabs; I've worked out how to change the default from 'what's new' back to the CMS at 'articles'; I've added a tab with a URL to another site; it all works just fine.

    I also want to add a tab to my calendar and to my memberslist. That's reasonably straightforward, you just use /calendar.php or /memberlist.php as the target URL. Only problem is that if you do that the tab does not remain selected. I think, but don't know, that it's because there's nothing in the Tab Script (s) box? So what's the fix for this? What script do you put in the tab scripts box?

    Same question for Groups and Albums: Particularly with Groups one of the features of vBulletin that differentiates it is the groups feature, which I think is underutilised on my site and may be on other's sites. Changing the name of groups to a name more relevant to what you're using it for with your target audience is probably easy; if you could add a tab you could highlight it and do more with it.
    Last edited by jdj; Tue 29th May '12, 3:22am.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X