PDA

View Full Version : Line break after first post...


Warlord
06-11-2009, 02:05 AM
I was wondering what I could use in the postbit template to make a line break between the first post and the rest of the posts?

I tried

<if $post[postcount]==1>
<p>
</if>

But it inserted a paragraph break in between every post instead of just between post #1 and post #2 like I wanted. Any suggestions?

RTMdotORG
06-11-2009, 02:24 AM
line break=<br />

--------------- Added 1244690956 at 1244690956 ---------------

You should be able to use a first post on all pages mod, and add a <br /> at the end of it so it would only be the first post with the break. :D

Lynne
06-11-2009, 03:12 AM
Perhaps:
<if condition="$post[postcount] == '1'">
<br />
</if>

RTMdotORG
06-11-2009, 03:16 AM
Perhaps:
<if condition="$post[postcount] == '1'">
<br />
</if>

Good One! :D

Dismounted
06-11-2009, 06:33 AM
You could also add some code to the ad location template for after the first post.

Warlord
06-11-2009, 09:46 PM
Perhaps:
<if condition="$post[postcount] == '1'">
<br />
</if>

Awesome, thanks! Do you know how I could count all of the reply posts in a thread?

I want the first post to be a news article and all of the following posts to be "Comments" on the news article. I'd like to count the replies and have it say something like

"13 Comments"

In between the first post and the rest of the posts.

I've taken what you've given me here a step further and changed up the template for the replies to give the first post a different look than the rest of them. You can see what I mean here if you like.

http://forums.projectfanboy.com/DC-Comics-News-f72/new-batgirl-teaser-t3551/

Wired1
06-11-2009, 10:11 PM
There are article mods out there. You may want to look at their code to see how they do it.

Warlord
06-12-2009, 12:56 AM
Took me a while but I figured it out, thanks. :D

Lynne
06-12-2009, 03:29 AM
That's nice! :up: