PDA

View Full Version : postbit confusion


Lionel
10-02-2004, 11:49 PM
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.

Zachery
10-02-2004, 11:52 PM
I would guess that $show['thumbnialattachments'] is a vB option turned into a $show, so this will always be true.

Lionel
10-02-2004, 11:59 PM
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

Lionel
10-03-2004, 01:01 AM
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?

Zachery
10-03-2004, 01:52 AM
<if condition="$post[postcount] == 1">stuff here </if>

Lionel
10-03-2004, 02:36 AM
thank you Zachery

SupraT
10-05-2004, 03:50 AM
Could you share the exact code for this. I would like to try to use on my forum.

Thanks