vBulletin ModsThe Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=231525 |
I put this together because it seems lots of people are having problems with the new syntax for conditionals.
First off remember you can not use {vb:raw var} in template conditionals. Show only members:
Show only guest:
Show specific user groups :
Show one member:
Show every one but one member:
Show only moderators of any forum:
Show Moderator of one forum: Remember to change x
Show Moderator of current forum:
Show in one forum: Remember to change x
Show is every forum but one: Remember to change x
Show in several forums:
Show in only one file: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you want it to show in.
Show in every file but one: Look for define('THIS_SCRIPT', 'calendar'); in the top of the php file you do not want it to show in.
If $customvar is set:
If $customvar equals:
If $customvar does not equal:
vBulletin else statement:
vBulletin else if statement:
This is all that I can think of right now off the top of my head. Please feel free to add any I forgot and I will add them to this list and give you credit. |
subscribed!
|
Thanks for this list! :)
|
Excuse me a question, to the undersigned not work conditions with $forum[forumid] is the variable that changed?
thanks PS example <vb:if condition="!in_array($forum[forumid], array(18,19))"> text text </vb:if> |
very nice, this has helped me understand all the conditionals much better.
|
subscribe too..
nice, thx u |
this is so clutch...nice
|
super, thanks & happy new yeahr ;)
|
thank you very much
|
Quote:
There's an other article here. |
Quote:
|
Hi - thanks for this post, however, can you provide conditionals for CMS sections please?
|
Quote:
You may have to preregister the var. |
Thanks
|
Hello everybody! I have one problem with porting one of my products to VB4.
I have the setting for a product called vfsms_can_stick_by_sms - it's comma separated list of forum-sections where this product is turned on. In this product I have the following plugin:
And in template SHOWTHREAD I have next conditional:
I have few problems: 1. variable $vfsms_allowed4sticky_forums can be accessed only as a {vb:raw vfsms_allowed4sticky_forums} and I can not put it to the condition 2. variable $forumid is not accessible anymore Please, somebody, help me! --------------- Added 05 Jan 2010 at 23:28 --------------- but everything is ok if I pass variable directly from the showthread.php:
and in template also replace $forumid on $thread[forumid] This is absolutely wrong way of doing the thing I need, pls tell me how to do it without changes in showthread.php! |
All times are GMT. The time now is 08:05. |
Powered by vBulletin® Version 3.8.14
Copyright © 2022, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.