View Full Version : profile picture ONLY on first post.
ralphuk100
08-04-2004, 09:37 AM
I want to set up my news forum so that an avatar/profile picture ONLY appears on the first post - any post after this will be a user reply. Anyone know how to do this? Thanks.
CarCdr
08-04-2004, 09:58 AM
Modify your postbit template(s). From Xenon's idea (https://vborg.vbsupport.ru/showpost.php?p=534780&postcount=2):
<if condition="$post['postid'] == $threadinfo['firstpostid']">
first post special handling code
<else />
other posts/normal code
</if>
ralphuk100
08-04-2004, 10:39 AM
Thanks. I tried putting it at the top of postbit but it thinks even the first post is an additional post. See code I used below:
<if condition="$post['postid'] == $threadinfo['firstpostid']">
This is the first post with avatar and other stuff
<else />
this is where the replies will go.
</if>
CarCdr
08-04-2004, 11:02 AM
Hmmm... I expect that "$threadinfo['firstpostid']" is not available to the template.
You could verify by simply including (outputting) the value in a test postbit page to see if it is set.
ralphuk100
08-04-2004, 11:33 AM
Could I just not use if postcount==1 then .... else?
CarCdr
08-04-2004, 11:40 AM
No. Those numbers are not guaranteed to reflect the actual position of a post in a thread.
It should easy to modify showthread.php to set something like "$show[firstpostinfo]", but I think it would be worthwhile to do the test I mentioned earlier.
ralphuk100
08-04-2004, 11:48 AM
I put $threadinfo[firstpostid] in my postbit (I can do it on the one I am using as its a test db) and nothing was displayed....how do I get it into the thread? I thought firstpostid would be global??
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.