Adrian Schneider |
05-02-2006 03:21 AM |
Conditions are executed like so:
Code:
blah blah<if condition="$var">eggnog<else />cheese</if>blahblah
Code:
blah blah" . (($var) ? "eggnog" : "cheese") . "blahblah
Because they aren't parsed through double quotes like the rest, there is no need for the braces. I always use the full object vars in conditions, though the shorthand versions appear to work fine as well.
@Boofo: looking at global.php lines 431 (for me anyway):
PHP Code:
if ($vbulletin->userinfo['userid'])
{
$show['guest'] = false;
$show['member'] = true;
}
else
{
$show['guest'] = true;
$show['member'] = false;
}
so to answer your question: yes. It's probably "best" to use $show variables in templates as much as possible, because it keeps the application logic seperate from your templates, but for things as simple as that it shouldn't really matter.
|