vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Smart tabs Like vb.org (https://vborg.vbsupport.ru/showthread.php?t=207664)

Akademiks 03-08-2009 03:15 AM

Smart tabs Like vb.org
 
I'm looking for a system that works like the tabs here on vb.org that aren't just tabs but smart tabs you see how it knows when your are in forums and when you are in styles etc, how does it work?:D

Dismounted 03-08-2009 04:41 AM

You can achieve this by creating a separate CSS class, and then using conditionals around the tabs to switch a tab's classes. For example, to check for forum 15:
Code:

<if condition="$foruminfo['forumid'] == 15">SOMETHING</if>

Akademiks 03-08-2009 08:41 PM

Please help me this is the code when its not active just plain tab:
Code:

<a href="forumX" class="tab">Graphics</a>
This is when tab is active
Code:

<a href="forumX" class="tab2">Graphics</a>
How would I add the code you showed me with this? Please help thanks

Dismounted 03-09-2009 05:04 AM

Code:

<a href="forumX" class="<if condition="$foruminfo['forumid'] == 15">tab2<else />tab</if>">Graphics</a>

Akademiks 03-09-2009 09:14 PM

thanks dude I <3 you..

Akademiks 03-13-2009 12:25 AM

Quote:

Originally Posted by Dismounted (Post 1763781)
Code:

<a href="forumX" class="<if condition="$foruminfo['forumid'] == 15">tab2<else />tab</if>">Graphics</a>

sorry run into another whole

how would i do this for
Code:

/forum/index.php and with /index.php?
how would the conditionals be?

Dismounted 03-14-2009 04:06 AM

You can use variables/constants that are only specific to that page (e.g. THIS_SCRIPT).

Akademiks 03-14-2009 08:19 AM

Quote:

Originally Posted by Dismounted (Post 1767643)
You can use variables/constants that are only specific to that page (e.g. THIS_SCRIPT).

can you post an example please using my tab script posted above. thanks

Dismounted 03-14-2009 11:57 AM

Have you tried searching for how it is used? Because I know you will find what you want.

Akademiks 03-14-2009 05:55 PM

great, thanks for your reply, it works!

Thank you very much


All times are GMT. The time now is 02:10 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.01482 seconds
  • Memory Usage 1,727KB
  • 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
  • (6)bbcode_code_printable
  • (2)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
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete