If conditional question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Reeve of Shinra
    Senior Member
    • Sep 2001
    • 4325
    • 4.0.0

    If conditional question

    I have a profile field that I would like to display if a user has information in it but I dont know how to phrase the conditional to get it to work.

    This is what I was trying to use...
    PHP Code:
    <if condition="$bbuserinfo['field24'] == 0">
     <else />
     <
    i><font size="2">
      
    Tag by$post[field24]
      </
    font></i>
     </if> 
    Plan, Do, Check, Act!
  • kyk0
    Member
    • Jul 2003
    • 86
    • 3.0.0 'Gold'

    #2
    PHP Code:
    <if condition="($bbuserinfo['field24'] == 0)">
    <else />
    <
    i><font size="2">
      
    Tag by$post[field24]
      </
    font></i>
    </if> 
    Or could work:

    PHP Code:
    <if condition="$bbuserinfo['field24']">
    <
    i><font size="2">
      
    Tag by$post[field24]
      </
    font></i>
    </if> 
    Australia's Design Community

    Comment

    • Zachery
      Former vBulletin Support
      • Jul 2002
      • 59097

      #3
      you dont need ' ' in the conditional, and do you only want thius to display to users who are browsing the ssaid info who's field24 is filled in?

      Comment

      • Reeve of Shinra
        Senior Member
        • Sep 2001
        • 4325
        • 4.0.0

        #4
        Thanks -- I got it to work, part of my problem was that I didnt change the field type. I don't think VB lets you use the IF conditional if its set to 'profile field' and it was an imported field from 2.x

        I also changed <if condition="$bbuserinfo['field24']"> to
        <if condition="$post[field24]">

        Thanks again.
        Plan, Do, Check, Act!

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...