MyBB Community Forums

Full Version: If statement not working latest version
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
<if $mybb->user['avatar'] then>
<img title="{$mybb->user['username']}" alt="Pic" src="{$mybb->user['avatar']}" onerror="this.style.display='none'" />
<else>
<img title="{$mybb->user['username']}" alt="Pic" src="{$theme['imgdir']}/default_avatar.png" />
<else>
</if>

Also

<if $thread['closed'] then>

</if>
This requires a plugin and isn't a core feature, so you'd need to make sure the template conditionals plugin is installed and compatible with your version of MyBB and PHP.
You are right, my bad! Ty !!!