View Full Version : postbit confusion

03 Oct 2004, 00:49
I am trying to display showtread for news.
In the postbit templates, I did:

<!-- message -->
<!--lionel--><table width="100%" border="0" cellspacing="0" cellpadding="5"><tr> <td valign="top"> <if condition="$show['thumbnailattachment']"> <table align="right"><tr><td> <fieldset class="fieldset"><legend>News Images</legend>
<div style="padding:$stylevar[formspacer]px">$post[thumbnailattachments]</div> </fieldset></td></tr></table></if><div>$post[message]</div></td></tr></table> <!--/lionel-->
<!-- / message -->

<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">

<!--lionel--><!-- <if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>News Images</legend>
<div style="padding:$stylevar[formspacer]px">$post[thumbnailattachments] </fieldset>
</if> --> <!--/lionel-->

It post very well as per attachment. But why would the subsequent post display the empty fieldsets?

Also is it possible to make the change for the first post only, others to display like normal (the red section above that has been commented out).

Thank you for any help.

03 Oct 2004, 00:52
I would guess that $show['thumbnialattachments'] is a vB option turned into a $show, so this will always be true.

03 Oct 2004, 00:59
I do not have that problem when I live it in the red code where it ships.
Is there a conditional I could use to make the first code display only for first news or for admin? Forcing all below posts to display like vbulletin ships?

all the code above is from postbit

03 Oct 2004, 02:01
Ok, I solved that. I was missing a conditional:

<if condition="$show['attachments']"> right before the <if condition="$show['thumbnailattachment']">

But do such conditional exists to tell it to display like that only the first post?

03 Oct 2004, 02:52
<if condition="$post[postcount] == 1">stuff here </if>

03 Oct 2004, 03:36
thank you Zachery

05 Oct 2004, 04:50
Could you share the exact code for this. I would like to try to use on my forum.