Announcement

Collapse
No announcement yet.

Conditionals for profile fields, not working...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conditionals for profile fields, not working...

    Is it my code or something changed from the last versions of vbulletin?
    What im trying to do is... I have a profile field that sets profiles to private, so the field is Single-Selection Radio Buttons so the first option is Yes and the seccond one is No

    the code I need is a conditional to do the following

    if condition Yes
    code...

    else /

    something else...

    I had a code before but doesnt seem to work anymore, too old
    Help

  • #2
    Which template are you editing? That affects the conditional code.

    Comment


    • #3
      Yes, please tell us what template and post the exact code you are using.

      Please don't PM or VM me for support - I only help out in the threads.
      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
      Want help modifying your vbulletin forum? Head on over to vbulletin.org
      If I post CSS and you don't know where it goes, throw it into the additional.css template.

      W3Schools <- awesome site for html/css help

      Comment


      • #4
        Thanx!

        Well actually I couldnt get that one to work, so Ive decided to try another way around, but still no luck

        I need the conditional to display profiles if

        Code:
        <if condition="$prepared['isfriend']">
        But also administrators to be able to view profile so I tried this and didnt work

        Code:
        <if condition="$prepared['isfriend']" OR "is_member_of($userinfo, 6)">
        It gives an error line 56...

        Comment


        • #5
          Found the solutions
          I will post it so it could help somebody else... It should be as follows

          Code:
          <if condition="$prepared['isfriend'] OR is_member_of($vbulletin->userinfo, 6)">

          Comment

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