PDA

View Full Version : Need help to build a conditional


tintin74
03-31-2010, 09:14 AM
On my board I'm using in showthread a conditional like this:

<if condition="$threadinfo['threadid'] == '1010'">
<table height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230">HI!</td>
</tr>
</table>
</if>

<if condition="$threadinfo['threadid'] == '2020'">
<table height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230">HEllo!</td>
</tr>
</table></if>

<else />

<table height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230">Yes we can!</td>
</tr>
</table>





I don't know how to say to the script :" If you don't find the specified thread id in conditional, display something else. I think I need a global conditional but I don't know which.

hope you'll understand my issue. Could you help me ? Thank you

Simon Lloyd
04-03-2010, 07:48 PM
I'm not a coder but perhaps something like this:
<if condition="$threadinfo['threadid'] == '1010'">
<table height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230">HI!</td>
</tr>
</table>
<else />

<if condition="$threadinfo['threadid'] == '2020'">
<table height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230">HEllo!</td>
</tr>
</table>

<else />

<table height="60" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230">Yes we can!</td>
</tr>
</table>
</if>

tintin74
05-30-2010, 03:02 PM
Thank you Simon, I've forgot to thank you. It works.