1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Custom Profile Fields

Discussion in 'XenForo Questions and Support' started by Sheldon, Mar 29, 2012.

  1. Sheldon

    Sheldon Well-Known Member

    Is there any way to limit certain groups from accessing custom profile fields? Or to input choices in them. I don't care if they can see them (final product on someone else's page), I just want at the time to not have them able to choose anything.
     
  2. Sheldon

    Sheldon Well-Known Member

    Here was the code (original):

    Code:
    <div class="main">
    <xen:if is="{$user.customFields.pano}">
        <img src="/pano/{$user.customFields.pano}.png" />
    </xen:if>
    <div class="section primaryUserBlock">
    I did this:

    Code:
    <div class="main">
    <xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">
    <xen:if is="{$user.customFields.pano}">
        <img src="/pano/{$user.customFields.pano}.png" />
    </xen:if>
    </xen:if>
    <div class="section primaryUserBlock">
    and this:

    Code:
    <div class="main">
    <xen:if is="!{xen:helper ismemberof, $visitor, 2, 7}">
    <xen:if is="{$user.customFields.pano}">
        <img src="/pano/{$user.customFields.pano}.png" />
    </xen:if>
    </xen:if>
    <div class="section primaryUserBlock">
    Those would hide the images, but that wasn't what I wanted to achieve. I want them to see the result (Pano), I just don't want the groups above (2 and 7) to be able to select one from the custom profile field choices.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  4. Sheldon

    Sheldon Well-Known Member

    Perfect. Thank you Jake.... (y)
     
    ArnyVee likes this.

Share This Page