vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Conditional for Forum tab (https://vborg.vbsupport.ru/showthread.php?t=289523)

WorldCraft 10-23-2012 06:04 PM

Conditional for Forum tab
 
I'm dissing the Navigation Manager and am re-creating my navbar in the templates because the limitation for THIS_SCRIPT with the Nav Manager always bugged me.

Anyway, I'm trying to re-create the Forum tab. What conditional is used?

I tried:

PHP Code:

<vb:if condition="VB_PRODUCT == 'vbforum'"

vbforum is not the correct value I assume?

Revelence 10-23-2012 06:58 PM

You're trying to set the forums tab active, right?

Isn't it THIS_SCRIPT, rather then VB_PRODUCT?

WorldCraft 10-23-2012 07:53 PM

Yes, for a selected tab. THIS_SCRIPT is fine, but I was wondering if there was a better conditional to use than specifying all of the vB scripts individually.

Example:

PHP Code:

<vb:if condition="VB_PRODUCT == 'vbblog'"

Will allow my Blog tab to remain selected across all Blog related scripts, blog.php, blog_usercp.php, blog_subscription.php, etc.

Revelence 10-23-2012 08:30 PM

Is VB_PRODUCT defined within those scripts?

WorldCraft 10-23-2012 09:06 PM

Nope, VB_PRODUCT isn't defined in any of them.

Revelence 10-23-2012 09:29 PM

Then add this into them.

Code:

define('VB_PRODUCT', 'vbblog');

WorldCraft 10-23-2012 11:31 PM

vbblog isn't what I'm concerned with. That condition works fine. I wanted to know if there was a condition like that but for the forum scripts.

Revelence 10-23-2012 11:56 PM

Quote:

Originally Posted by WorldCraft (Post 2375518)
vbblog isn't what I'm concerned with. That condition works fine. I wanted to know if there was a condition like that but for the forum scripts.

So it stays active with like show thread ect? Could just be something like this

Code:

<vb:if condition="VB_PRODUCT == 'vbblog' || VB_PRODUCT == 'something_else'">
and so on. I'm not 100% sure though, this is just an idea.

John Lester 10-24-2012 02:09 AM

It appears it only works with the blog .... http://www.8tiny.com/source/vbb-suit...nts/index.html


All times are GMT. The time now is 12:45 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.01043 seconds
  • Memory Usage 1,724KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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