How could I code this profile field request?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jilly
    Senior Member
    • Apr 2001
    • 1235
    • 3.7.x

    How could I code this profile field request?

    I've added an area to the memberinfo stats block, that shows some images (from a petz hack).

    I wanted to create a profile field for something like:

    Display member's virtual petz yes/no

    and if set to yes, you can see everyone's petz, if no, you don't see any petz

    - I tried this, from an old conditional, but it doesn't seem to be working - any ideas for tweaking it?

    1. I created a profile field, a single-selection radio button with yes no choices

    2. I noted the field number, then went into the memberinfo template, with the if starting above the petz image code, and the end if below, but it gives me an error saying it is missing a beginning if tag.

    if ($bbuserinfo['field56'] == 'Yes')
    {
    the code to show the virtual petz is here
    }

    it gives me an error - any ideas?
  • zCarot [RU]
    Senior Member
    • Oct 2006
    • 109
    • 3.7.x

    #2
    You must use this construction:
    <if condition="($bbuserinfo['field56'] == "Yes")">HERE IS YOUR BLOCK</if>

    Comment

    • jilly
      Senior Member
      • Apr 2001
      • 1235
      • 3.7.x

      #3
      Thanks zCarot!

      That worked perfectly!! Thanks!!!

      Comment

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