MyBB Hacks

Full Version: Hide warning if % is 0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello again,

i'm have about 0 knowledge when it comes to php/if statements, but I thought this might be an easy one for those that know a lot:

if a member has 0% warning level (as shown in postbit), how would i go about hiding it? something like "if user warn level = 0, then hide" otherwise, it would show up.

this is what is in the postbit, and I figure I have to wrap the if statement around it:

{$post['warninglevel']}
$post['warningpoints'] is what holds the post's author reputation, so this should work:

PHP Code:
<if intval($post['warningpoints']) > 0 then>
Bad boy.
</if>

nice! works perfectly, thank you.
Could anyone please tell me where to exactly paste this PHP code?
Templates.
Reference URL's