The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
if condition problem
I have a problem with this
HTML Code:
<vb:if condition="$gameinfo[uid] == $userid">
If i put this in like so HTML Code:
<vb:if condition="{vb:var gameinfouid} Could you please let me know how to get my vars to work in the new template system. HTML Code:
$gameinfo[uid] == $userid |
#2
|
||||
|
||||
Have you registered the variables for use in the template ?
|
#3
|
|||
|
|||
you cannot use this {vb:var gameinfouid} in a if statment you will get errors when saving the template.
|
#4
|
|||
|
|||
I think you have to make the second condition on php side
PHP Code:
HTML Code:
<vb:if condition="$show['foo']">
|
#5
|
||||
|
||||
why not use in your php file
PHP Code:
Code:
<vb:if condition="$show['something']"> html code .... </vb:if> |
#6
|
|||
|
|||
I wouldn't use iif, use instead the ternary operator because iif is deprecated
PHP Code:
PHP Code:
|
#7
|
|||
|
|||
Quote:
but in the template its not seeing it and outputting the info its showing it as $show['something']. here is my PHP code PHP Code:
HTML Code:
<vb:if condition="$show['something']"> <vb:else /> <table border="0" width="100%" align="center"> <tr> <td colspan="2" class="blocksubhead" width="50%" align="center">{vb:raw vbphrase.options}</td> </tr> <tr> <td class="alt1" width="50%" align="center"><vb:if condition="$swap_status1 > 1"> {vb:raw swap_status} <vb:else /> <form action="gamesswap.php?do=swap" method="post" enctype="multipart/form-data" target="_self"> <input type="hidden" name="gid" value="{vb:raw gid}"> <input type="submit" value="{vb:raw vbphrase.gamesswap_view_game_swap}"> </form> </vb:if> </td> <td class="alt1" width="50%" align="center"> <form action="gamesswap.php?do=question" method="post" enctype="multipart/form-data" target="_self"> <input type="hidden" name="gid" value="{vb:raw gid}"> <input type="submit" value="{vb:raw vbphrase.gamesswap_view_game_question}"> </form> </td> </tr> </table> </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|