PDA

View Full Version : postbit confusion


Lionel
03 Oct 2004, 01: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.

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

Lionel
03 Oct 2004, 01: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

Lionel
03 Oct 2004, 03: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?

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

Lionel
03 Oct 2004, 04:36
thank you Zachery

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

Thanks