MyBB Community Forums

Full Version: if/else
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What is the proper syntax for if/else statements in 1.8.11? I am trying to modify the postbit_avatar template to only include an img if $post['avatar'] != '' so that there isn't a blank square for users who do not have an avatar set.
template conditionals plugin needs to be installed to use conditional statements.
plugin release thread has detailed guidance for using the plugin.

below is the basic syntax
<if condition then>
do something
</if>


eg.
<if $post['avatar'] != '' then>
___________________
</if>