<if condition="in_array($forumid, array(X,Y,Z)) AND $thread['postuserid'] == $post['userid']"> // Image code here </if>
<if condition="in_array($forumid, array(X,Y,Z))"> <if condition="$thread['postuserid'] == $post['userid']"> // Image code here </if> </if>