The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
First Post Conditional
I need a conditional that will allow me to differentiate first posts from the rest of the posts in a Thread.
I've removed the Title field from the newreply template so members replying to a Thread cannot add a title. So, only the frst post in the Thread has a title. Now, I'd like to remove the Thread icon and the line that goes beneath the Thread icon and title on any post after the first post. Zachery posted (at vBulletin.com) that "$post[count] is the varible - it numbers each post in the thread". But I've been unable to construct a proper conditional - no matter what I've tried either all the posts have the Thread icon and title area or none do. How can I accomplish what I want? |
#2
|
||||
|
||||
HTML Code:
<if condition="$FIRSTPOSTID == $post['postid']"> <!-- this is the first post --> <else /> <!-- this is the second, third etc post --> </if> |
#3
|
||||
|
||||
I must be screwing somethin up. Here's the part of the postbit template in question:
Code:
<if condition="$show['messageicon'] OR $post['title']"> <!-- icon and title --> <div class="smallfont"> <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if> <if condition="$post['title']"><strong>$post[title]</strong></if> </div> <hr size="1" color="$stylevar[tborder_bgcolor]" /> <!-- / icon and title --> </if> |
#4
|
||||
|
||||
HTML Code:
<if condition="$show['messageicon'] OR $post['title']"> <!-- icon and title --> <if condition="$FIRSTPOSTID == $post['postid']"> <div class="smallfont"> <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if> <if condition="$post['title']"><strong>$post[title]</strong></if> </div> </if> <hr size="1" color="$stylevar[tborder_bgcolor]" /> <!-- / icon and title --> </if> |
#5
|
||||
|
||||
Thanks for taking time and helping me with this... but the first post is still not shown differently from the others. In other words, the message icon and title are not displayed in any posts including the first post.
|
#6
|
||||
|
||||
Lee, shouldn't that actually be this?
HTML Code:
<if condition="$post['postid'] == $FIRSTPOSTID">
|
#7
|
||||
|
||||
Ok, I found the solution to your problem. This is what you need to use to find the first post in a thread:
HTML Code:
<if condition="$post['postid'] == $thread['firstpostid']">
|
#8
|
||||
|
||||
Thanks Boofo, that's got it!
Quote:
|
#9
|
||||
|
||||
Quote:
Just curious. What are you doing with this? |
#10
|
||||
|
||||
See This Thread at vBulletin.com. Basically, I have removed the Title field from the newreply box so that when replying to a thread users have no option to add a title to their post. Then, using the conditional you gave me, I've removed the message icon and title area of all posts after the first to clean up the postbit. Check it out in any Thread at the Admin Zone and let me know what you think.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|