vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   New tab not staying selected (https://vborg.vbsupport.ru/showthread.php?t=283498)

Lynne 06-15-2012 03:14 PM

set_navigation_tab_main is a hook location. That is selected when you create a plugin. The code he posted is for the plugin. https://www.vbulletin.com/docs/html/plugin_system

UK CHI3F 06-16-2012 04:35 AM

ok the link helped a bit now i have
http://www.xboxplayers.co.uk/site/images/hookplugin.jpg

i guess as i dont know what array is ive got that wrong

Lynne 06-16-2012 05:22 PM

You need to replace this:
(in_array($GLOBALS['forumid'], array(2,15)))

with a condition unique to your page.

UK CHI3F 06-17-2012 09:32 AM

Sorry to be dumb Lynne but i don't understand what condition i would even begin to look for i tried forum/forums thinking it goes with the php page somehow, the forum id is definitely 6 but again i don't understand array where do i begin?

kamran_dotnet 06-21-2012 10:38 AM

i want to show one of my forums completely in new tab
but how can i set sub forums or sub threads on that forum highlight?

--------------- Added [DATE]1340307067[/DATE] at [TIME]1340307067[/TIME] ---------------

Quote:

Originally Posted by kamran_dotnet (Post 2341701)
i want to show one of my forums completely in new tab
but how can i set sub forums or sub threads on that forum highlight?

any idea?

Lynne 06-22-2012 03:22 PM

You would need to put all the forumids into the condition.

kamran_dotnet 06-22-2012 03:58 PM

Quote:

Originally Posted by Lynne (Post 2342059)
You would need to put all the forumids into the condition.

its work fine on all forums i set
thank you
but when a thread on that forums opened, default tab selected again
what should we do with threads?

Lynne 06-23-2012 02:39 PM

It works just fine on my test site for all the threads. Can you please post *exacly* what you have done?

kamran_dotnet 06-23-2012 02:54 PM

Quote:

Originally Posted by Lynne (Post 2342311)
It works just fine on my test site for all the threads. Can you please post *exacly* what you have done?

Quote:

if (in_array($GLOBALS['forumid'], array(149,151,150,152,153,154,144,145,146,147,148) )) $root = 'tab_mde3_676';
all treads created in forum 148 has this problem

dmm2020 06-27-2012 11:36 PM

How do I set up the navigation manager so that when the current page is support page that the support menu STAYS in the navigation bar? What's happening is once I click the links in the menus or links I created via the navigation manager, it shows the default forum links in the navigation bar and I definitely DO NOT want that. Any clues?

Lynne 06-28-2012 02:44 PM

Since you have supplied very little information, all I can really tell you is that you enter the correct information into the Tab Script(s) field for the tab.

M4T VW 07-22-2012 09:43 AM

I have 3 tabs on my forum. Home - Forum - Classifieds

The classifieds tab is a link to a section of the forums, forumdisplay.php?11-Classifieds

I have put "forumdisplay" in the tab script but when you visit some different sections of the forum, the highlighted tab changes to the classifieds tab. It only happens on some sections.
Obviously im aiming for it to only highlight when you are in the "forumdisplay.php?11-Classifieds" sections.

Any ideas?

Lynne 07-22-2012 04:46 PM

You need a plugin. Hook location - set_navigation_tab_main
PHP Code:

if (in_array($GLOBALS['forumid'], array(y,z)))  $root 'tab_xxx_xxx'

Change y,z to your forumids and tab_xxx_xxx to the tab name.

M4T VW 07-22-2012 08:26 PM

Ok, I have made a plugin under the location of "set_navigation_tab_main"

This is the current Code
PHP Code:

if (in_array($GLOBALS['forumid'], array(155,100,48,46,50,54,56,101,49,47,55)))  $root 'tab_mdkx_204'

The tab name is "tab_mdkx_204"
In the tab I have the following Url "forumdisplay.php?{session.sessionurl_q}11-Classifieds"
And in tab script I have just "forum display"

11 is the forum classifieds display, and the numbers in the array above are all the sections under the section 11 forum.

However when I view a few different forums (not all) the classifieds tab gets selected. For example its shows on my general chat section 16.

What am I doing wrong?

Thanks Lynne

Mat

Lynne 07-23-2012 02:33 AM

Do not put anything in the tab script area.

invitezone 07-26-2012 07:10 PM

I wonder if someone can give me some help on my tabs.
I am sure your sick of tbs questions by now by reading some of the above responces to your help, but im really stuck with this.
I am a total n00b with Vbulletin so I cannot make sense of the advice you are giving above, so please if you can be clear with me :)

any here are some screens of the tabs I have created.

http://img232.imageshack.us/img232/1633/tab1g.jpg
http://img826.imageshack.us/img826/8878/tab2c.jpg
http://img818.imageshack.us/img818/2148/tab3x.jpg
http://img266.imageshack.us/img266/8233/tab4.jpg

Now as you can see I have the tabs working, but as also im sure you will see straight away, my tabs wont be highlighted after I click them.
I know from reading above that I may need to create plugins or something and do something with This_Script, but I dont really know what these things are or how to do them.

I know I ask a lot but this is so frustrating. I would really appreciate anyone taking the time to write a simple step by step set of instructions for me to follow.
Hopefully it will help others with their problems as well as me.

Thank you to whoever tries to help me.

kh99 07-26-2012 07:24 PM

Try this: set the Tab Script fields as follows: Private Forum and Public Forum tabs - leave blank. Arcade - "arcade", and DONATE - "payments" (don't include the quotes).

invitezone 07-26-2012 08:32 PM

ok the payments and donate tabs are highlighting fine now, thanks for that.
The Private Forum and Public Forum tabs are still not working though. The Private forum tab is highlighted when i click on either one of them.

kh99 07-26-2012 08:41 PM

Hmm...and you still have "Append 'tabid' to url" set to yes only for the private tab? Try putting "index" in the Tab Script field of the Public tab.

invitezone 07-26-2012 09:52 PM

yep thats sorted it thanks. I dont understand it but it works :D

invitezone 07-27-2012 10:51 PM

the public tab changes back to having the private tab highlighted when im in the public tabs sub forums

M4T VW 07-30-2012 06:24 PM

Quote:

Originally Posted by Lynne (Post 2350608)
Do not put anything in the tab script area.

It works! Thanks Lynne.

Now, Anyone know a way to copy a group of Link/Menus?
Not the actuall tabs but the sub links etc. I have about 7 on my main "forum" tab but then the menus are quite big.
I would like to copy all these to my "classifieds" tab for the time being and then might change a few later down the road.
I hope there is a quick way to copy them!

Thanks
Mat

Lynne 07-30-2012 08:55 PM

I think Andreas wrote a modification that will do what you want with the sub links.

nyenius 08-07-2012 09:18 AM

Quote:

Originally Posted by Lynne (Post 2333206)
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'


This helps a LOT! thanks a bunch :):up:

E0N 09-05-2012 02:11 PM

Quote:

Originally Posted by Lynne (Post 2333206)
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'


Hi. Sorry Im new with vB. Never used it before. Can you write a step by step guide how to do this? I dont really get it :( I have same problem. When I add a new tab and click on it, the tab dont get highligted.

Lynne 09-05-2012 02:58 PM

Try setting "Append 'tabid' to URL" to Yes in the Navigation Manager for that tab and see if that fixes the issue. Otherwise, you will need to write a plugin like above. See the manual here - https://www.vbulletin.com/docs/html/plugin_system

E0N 09-05-2012 03:14 PM

Thanks. That worked :)

Nelson58 09-09-2012 12:43 PM

1 Attachment(s)
The home tab now highlights, but the site does not land on that page even though I made the default the Home tab.

I don't know PHP, so writing my own plugin is out.

Nelson

I.G.O.T.A. 09-10-2012 12:27 AM

My forum tab highlights and I tried everything to get it to stop that. Any ideas what I should do?

Lynne 09-10-2012 12:59 AM

Can you post all the information in the Navigation Manager tab that isn't working?

I.G.O.T.A. 09-10-2012 01:07 AM

Identity vbtab_forum
Active Yes
Product vBulletin
Title Forum
Target URL forum.php{session.sessionurl_q}
Display Order 5
Show Permission Name
Append 'tabid' to URL No
Tab Script(s)

That is what I have.

Lynne 09-10-2012 05:38 PM

So your target is the forum.php page but you don't want that tab to highlight when you go there?

TypoC 09-11-2012 10:44 AM

I'm having trouble as well. I'm trying to set up a "Today's Posts" tab that leads to "search.php?do=getdaily". When I select this tab, the forum.php tab remains highlighted and "Today's Posts" is not highlighted.

Identity: tab_nz,1_358
Active: Yes
Product: vBulletin
Title: Today's Posts
Target URL: search.php?do=getdaily
Display Order: 55
Show Permission Name: [Blank]
Append 'tabid' to URL: Yes
Tab Script(s): search


search.php does have THIS_SCRIPT defined as such:
PHP Code:

define('THIS_SCRIPT''search'); 

Any thoughts? Thank you!

Nelson58 09-14-2012 11:53 AM

What I did, and it isn't perfect, is to add the TabID to EVERY tab. That will make the tab you want highlighted.

It will not change the breadcrumbs however.

Nelson

TypoC 09-15-2012 01:15 PM

Quote:

Originally Posted by Allthumbz (Post 2365343)
What I did, and it isn't perfect, is to add the TabID to EVERY tab. That will make the tab you want highlighted.

The status of 'TabID' doesn't seem to help in this particular tab. I don't know if it's because I'm not just going to 'search.php' but rather an ACTUAL search that changes every time. Is it impossible to get that to stay highlighted?


All times are GMT. The time now is 08:00 PM.

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.04015 seconds
  • Memory Usage 1,822KB
  • 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
  • (5)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)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