View Full Version : Bigger or Smaller in a Condition
Frapegliko
10-24-2006, 04:47 PM
How can I define Bigger or Smaller in a Condition?
what is wrong?
<if condition="$foruminfo[forumid] == $vboptions[xxxxx] AND $vboptions[xxxxx] > 0">
MaryTheG(r)eek
10-26-2006, 02:15 PM
I think that is better to broke the condition in parts, like:
<if condition="$foruminfo[forumid] == $vboptions[xxxxx]">
<if $vboptions[xxxxx] > 0>
......do this
</if>
</if>
Adrian Schneider
10-26-2006, 02:19 PM
You guys should be quoting array keys, and using the full object-form variables in template conditionals.<if condition="$foruminfo['forumid'] == $vbulletin->options['x'] and $vbulletin->options['x'] > 0">But really... you should try to keep your application logic out of your templates and put this into your PHP or a plugin. If you do it this way, you can simplify it to something like this <if condition="$show['whatever']">This way, it will make much more sense when looking at it later.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.