PDA

View Full Version : Condition to show something if a thread has more than x number of posts?


chaz7979
04-23-2014, 08:04 AM
If I wanted to display some html if a thread has more than 5 posts, how would I do that?

I've seen conditionals that show how to display html after the 1st, 2nd, 3rd, etc post in a thread but, that is not what I am looking for. I simply want to display a chunk of code at the bottom of the showthread if there are more than X number of posts in a thread.

Thanks in advance.

tpearl5
04-23-2014, 02:42 PM
Try this:


<vb:if condition="$thread['replycount'] > X">
stuff...
</vb:if>


if thread doesn't work try threadinfo

chaz7979
04-23-2014, 04:49 PM
Seems to work perfectly -- thank you!

tpearl5
04-23-2014, 08:15 PM
no prob! :)