PDA

View Full Version : Conditional for Forum tab


WorldCraft
10-23-2012, 06:04 PM
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:

<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:

<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.

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
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


<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-suite/nav.html?_constants/index.html