PDA

View Full Version : Template Conditions, need help


deathemperor
03-03-2004, 06:05 AM
I displayed 4 custom fields in postbit and an image to define those 4 like: "Favourites". The conditions I used (thanks to vb3 greatest ^^) for those custom field are fine. But now I want to use once more condition for the "Favourites" images: If user have entered one of those for, the image would be displayed, and if I there is no field filled, that image should be hidden.
I've tried:
<if condition="$post['filed5'] or $post['filed6'] or $post['file7'] or $post['filed8']"><tr><img src="images/showthread/favorites-left.gif" width="143" height="26" border="0" alt="" class="inlineimg" /></tr>
</if>
but it doesn't work, the image doesn't appear no matter what. What should I replace the 'or' ? || ? and what if I want and.
I'm very interested in vb conditions, they are really helpful ^^.
thanks you in advance.

filburt1
03-03-2004, 12:41 PM
I displayed 4 custom fields in postbit and an image to define those 4 like: "Favourites". The conditions I used (thanks to vb3 greatest ^^) for those custom field are fine. But now I want to use once more condition for the "Favourites" images: If user have entered one of those for, the image would be displayed, and if I there is no field filled, that image should be hidden.
I've tried:
<if condition="$post['filed5'] or $post['filed6'] or $post['file7'] or $post['filed8']"><tr><img src="images/showthread/favorites-left.gif" width="143" height="26" border="0" alt="" class="inlineimg" /></tr>
</if>
but it doesn't work, the image doesn't appear no matter what. What should I replace the 'or' ? || ? and what if I want and.
I'm very interested in vb conditions, they are really helpful ^^.
thanks you in advance.
or or || is fine (I prefer or for readibility). However, in every instance, you spelled "field" incorrectly.

deathemperor
03-04-2004, 06:35 AM
oh my darn mind !
I guess it's because I've got my mail box bombed while I was moving my site to another host and editting the postbit T_T.
now it works fine.
Thank you though I must have done it if I didn't type wrong ^^