MyBB Community Forums

Full Version: first post of thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how can i define first post of thread? i ll use it in a if like :

if($mybb->someting['anotherthing'] == "1" || $mybb->something['anotherting'] == "2" && $postcounter == "1")

ideas?

threads have firstpost row.

I just wonder does it have any connection with sticky post?
http://community.mybb.com/thread-77929.html
// Will check if this is a reply or the original post
if($post['replyto'] == 0)
(2010-09-10, 08:46 PM)Jammerx2 Wrote: [ -> ]
// Will check if this is a reply or the original post
if($post['replyto'] == 0)

my if is;
					if($mybb->post['replyto'] == "0" && $mybb->user['usergroup'] == "1" || $mybb->user['usergroup'] == "5" )

but its not effects first posts and if i change order to
if($mybb->user['usergroup'] == "1" || $mybb->user['usergroup'] == "5" && $mybb->post['replyto'] == "0")
it effects everypost. so i coudnt define firstpost for somereason. help needed
(2010-09-14, 01:22 PM)dared Wrote: [ -> ]
(2010-09-10, 08:46 PM)Jammerx2 Wrote: [ -> ]
// Will check if this is a reply or the original post
if($post['replyto'] == 0)

my if is;
					if($mybb->post['replyto'] == "0" && $mybb->user['usergroup'] == "1" || $mybb->user['usergroup'] == "5" )

but its not effects first posts and if i change order to
if($mybb->user['usergroup'] == "1" || $mybb->user['usergroup'] == "5" && $mybb->post['replyto'] == "0")
it effects everypost. so i coudnt define firstpost for somereason. help needed

You will need to put it in brackets if you want both to take effect, like so.

if($mybb->post['replyto'] == "0" && ($mybb->user['usergroup'] == "1" || $mybb->user['usergroup'] == "5"))