vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Change page selected tabs (https://vborg.vbsupport.ru/showthread.php?t=250489)

Shamil. 09-14-2010 04:03 PM

Change page selected tabs
 
Hi,

How do I change which tab is given the selected attribute in the navbar on a specific page?

Lynne 09-14-2010 04:55 PM

Usually there is a condition written around it in the code. So, you'd have to modify the condition.

Shamil. 09-14-2010 05:29 PM

Quote:

Originally Posted by Lynne (Post 2098193)
Usually there is a condition written around it in the code. So, you'd have to modify the condition.


I can't seem to find the condition. I've used this to create a custom page:
https://vborg.vbsupport.ru/showthread.php?t=228112

Lynne 09-14-2010 06:11 PM

That's the code to create a page. There is no code in that to make a tab to go along with it.

Shamil. 09-14-2010 07:01 PM

Quote:

Originally Posted by Lynne (Post 2098244)
That's the code to create a page. There is no code in that to make a tab to go along with it.


Is there a code to set the selected tab to Home instead of Forum?

Lynne 09-14-2010 08:26 PM

You would have to edit the plugin that creates the Home tab and include the condition for that page in there.

Shamil. 09-14-2010 08:30 PM

Thanks Lynne, I can image that list getting slightly long :/

Lynne 09-14-2010 09:44 PM

For custom pages? It doesn't have to be. Just define a variable (like they do THIS_SCRIPT) to be the same on each of your custom pages and use that for the condition.

Shamil. 09-14-2010 10:10 PM

Quote:

Originally Posted by Lynne (Post 2098350)
For custom pages? It doesn't have to be. Just define a variable (like they do THIS_SCRIPT) to be the same on each of your custom pages and use that for the condition.

I'm currently restructuring the navbar. I'm ending up with things like:

PHP Code:

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'member' AND THIS_SCRIPT != 'showgroups' AND THIS_SCRIPT != 'memberlist'"

to start with.

Lynne 09-14-2010 10:22 PM

Instead of:
HTML Code:

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'member' AND THIS_SCRIPT != 'showgroups' AND THIS_SCRIPT != 'memberlist'">
use:
HTML Code:

<vb:if condition="!$vboptions['selectednavtab'] AND !in_array(THIS_SCRIPT, array('search', 'usercp', 'member', 'showgroups', 'memberlist'))">


All times are GMT. The time now is 11:22 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.01224 seconds
  • Memory Usage 1,730KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete