Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Hide warning if % is 0
Gstone Offline
Member
***
Posts: 55
Joined: May 2012
Post: #1
Hide warning if % is 0
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']}
09-04-2012 08:19 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #2
RE: Hide warning if % is 0
$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>


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
09-04-2012 10:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Gstone Offline
Member
***
Posts: 55
Joined: May 2012
Post: #3
RE: Hide warning if % is 0
nice! works perfectly, thank you.
09-04-2012 10:40 AM
Find all posts by this user Quote this message in a reply
Jerremy Offline
Junior Member
**
Posts: 1
Joined: Sep 2012
Post: #4
RE: Hide warning if % is 0
Could anyone please tell me where to exactly paste this PHP code?
09-10-2012 09:30 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #5
RE: Hide warning if % is 0
Templates.

My Blog
09-10-2012 10:37 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: