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

Member Card Privacy

Discussion in 'Styling and Customization Questions' started by DRE, Oct 31, 2012.

  1. DRE

    DRE Well-Known Member

    When we click on our privacy settings and choose select either 'Members Only' or 'People You Follow Only' it hides our profile page.

    How do we hide our Member Card when those options are selected? What conditional would we use for this setting?

    [​IMG]
     
    erich37 likes this.
  2. erich37

    erich37 Well-Known Member

    yeah, it seems the membercard is not included in "Privacy Options" ???
     
  3. HWS

    HWS Well-Known Member

    Yes, membercard shows it's content no matter how privacy options are set.

    We solved it with a few conditionals in the template.
     
  4. DRE

    DRE Well-Known Member

  5. DRE

    DRE Well-Known Member

    Were you able to set your conditionals according to whatever a member's privacy options were set to?
     
  6. DRE

    DRE Well-Known Member

    I'm close to figuring out how to do it.
     
  7. DRE

    DRE Well-Known Member

    Okay this condition doesn't work like I thought it would.

    Code:
    <xen:if is="{$visitor.allow_view_profile} == 'members' ">
    <xen:else />
    </xen:if>
    or this one

    Code:
    <xen:if is="{$visitor.allow_view_profile} == 'members' OR {$visitor.allow_view_profile} == 'followed'" > <xen:else />
    </xen:if>
    
     
  8. DRE

    DRE Well-Known Member

    *bump
     
  9. melbo

    melbo Well-Known Member

  10. DRE

    DRE Well-Known Member

    Thanks but that's not what this is for.
     
  11. DRE

    DRE Well-Known Member

    I don't need this for myself since my profile is public. I spent all night playing with conditionals trying to get this to work. I think it needs php. Gonna probably have to pay for an addon to do this.
     
  12. Adam Howard

    Adam Howard Well-Known Member

    member_card

    Wrap around with

    PHP:
    <xen:if is="{$visitor.user_id}">
    PHP:
    </xen:if>
    So when done it will look like this

    PHP:
    <xen:if is="{$visitor.user_id}">
    <
    xen:edithint template="xenforo_overlay.css" />
    <
    xen:require css="member_card.css" />
     
    <
    div id="memberCard{$user.user_id}data-overlayClass="memberCard">
    <
    div class="avatarCropper">
    <
    class="avatar NoOverlay Av{$user.user_id}l" href="{xen:link members, $user}">
    <
    img src="{xen:helper avatar, {$user}, l}" alt="" style="{xen:helper avatarCropCss, $user}" />
    </
    a>
    <
    xen:if hascontent="true">
    <
    div class="modControls" style="position:absolute; bottom:0px; right:0px">
    <
    xen:contentcheck>
    <
    xen:if is="{$canEditUsers}"><a href="{xen:adminlink users/edit, $user}" target="_blank">{xen:phrase edit}</a></xen:if>
    <
    xen:if is="{$canCleanSpam}"><a href="{xen:link spam-cleaner, $user}" class="OverlayTrigger">{xen:phrase spam}</a></xen:if>
    <
    xen:if is="{$canWarn}"><a href="{xen:link members/warn, $user}">{xen:phrase warn}</a></xen:if>
    <
    xen:if is="{$canBanUsers}"><a href="{xen:adminlink banning/users/add, $user}" target="_blank">{xen:phrase ban}</a></xen:if>
    </
    xen:contentcheck>
    </
    div>
    </
    xen:if>
    </
    div>
     
    <
    div class="userInfo">
    <
    h3 class="username"><xen:username user="$userclass="NoOverlay" /></h3>
     
    <
    div class="userTitleBlurb">
    <
    h4 class="userTitle">{xen:helper userTitle$user}</h4>
    <
    div class="userBlurb">{xen:helper userBlurb$user0}</div>
    </
    div>
     
    <
    blockquote class="status">{xen:helper bodytext$user.status}</blockquote>
     
    <
    div class="userLinks">
    <
    xen:hook name="member_card_links">
    <
    a href="{xen:link members, $user}">{xen:phrase profile_page}</a>
    <
    xen:if is="{$visitor.user_id} AND {$user.user_id} != {$visitor.user_id}">
    <
    xen:if is="{$canStartConversation}"><a href="{xen:link conversations/add, '', 'to={$user.username}'}">{xen:phrase start_conversation}</a></xen:if>
    <
    xen:follow user="$userclass="Tooltip" />
    <
    xen:if is="{xen:helper isIgnored, $user.user_id}"><a href="{xen:link members/unignore, $user}" class="FollowLink">{xen:phrase unignore}</a><xen:elseif is="{$canIgnore}/><a href="{xen:link members/ignore, $user}" class="FollowLink">{xen:phrase ignore}</a></xen:if>
    </
    xen:if>
    </
    xen:hook>
    </
    div>
     
    <
    dl class="userStats pairsInline">
    <
    xen:hook name="member_card_stats">
    <
    dt>{xen:phrase member_since}:</dt> <dd>{xen:date $user.register_date}</dd>
    <!-- 
    slotpre_messages -->
    <
    dt>{xen:phrase messages}:</dt> <dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed">{xen:number $user.message_count}</a></dd>
    <!-- 
    slotpre_likes -->
    <
    dt>{xen:phrase likes_received}:</dt> <dd>{xen:number $user.like_count}</dd>
    <!-- 
    slotpre_trophies -->
    <
    dt>{xen:phrase trophy_points}:</dt> <dd><a href="{xen:link members/trophies, $user}" class="concealed OverlayTrigger">{xen:number $user.trophy_points}</a></dd>
    <
    xen:if is="{$canViewWarnings}">
    <
    dt>{xen:phrase warning_points}:</dt> <dd><a href="{xen:link members, $user}" class="concealed">{xen:number $user.warning_points}</a></dd>
    </
    xen:if>
    </
    xen:hook>
    </
    dl>
     
    <
    xen:if is="{$canViewOnlineStatus}">
    <
    dl class="pairsInline lastActivity">
    <
    dt>{xen:phrase x_was_last_seen'username={$user.username}'}:</dt>
    <
    dd>
    <
    xen:if is="{$user.activity}">
    <
    xen:if is="{$user.activity.description}">
    {
    $user.activity.description}<xen:if is="{$user.activity.itemTitle}"> <em><a href="{$user.activity.itemUrl}class="concealed">{$user.activity.itemTitle}</a></em></xen:if>,
    <
    xen:else />
    {
    xen:phrase viewing_unknown_page},
    </
    xen:if>
    <
    xen:datetime time="{$user.effective_last_activity}class="muted" />
    <
    xen:else />
    <
    xen:datetime time="{$user.effective_last_activity}/>
    </
    xen:if>
    </
    dd>
    </
    dl>
    </
    xen:if>
    </
    div>
     
    <
    class="close OverlayCloser"></a>
    </
    div>
    </
    xen:if>

    edit: never mind. I see you're not just trying to hide this from guest
     
  13. DRE

    DRE Well-Known Member

    Can someone make this as an add-on? I'd donate $30
     
  14. luutruong

    luutruong Active Member

    PM inbox me...please give more request :D
     
  15. DRE

    DRE Well-Known Member

    Added to Suggestions. http://xenforo.com/community/threads/member-card-to-reflect-privacy-setting.40139/

    Yeah lol. Made it as a suggested feature too. http://xenforo.com/community/threads/member-card-to-reflect-privacy-setting.40139/

    I don't think it can be done with conditionals. Do you know how to create addons?
     
    erich37 and Adam Howard like this.
  16. Chris D

    Chris D XenForo Developer Staff Member

    I will step in...

    Can you explain what you want the end result to look like?

    I can do this with conditionals - is there any particular data that you'd like to keep?

    Presumably you want at least the avatar and username still visible to all, anything else?
     
  17. DRE

    DRE Well-Known Member

    The Member Card should reflect the Profile Page privacy settings.

    Meaning... if the profile privacy setting is 'Members Only' then only signed in members should see that member's member card. When a guest clicks their member card nothing should be shown at all.

    If the profile privacy setting is 'People You Follow Only' then only people you follow should be able to see that member's member card (admins being exempt). When anyone else clicks their member card nothing should be shown at all, except a message saying This member limits who may view their full profile. or 'You must be logged-in to view this member's profile'

    When I mean nothing that includes not even the avatar/username to show, since that's reflective of what happens when you try to view their profile page.

    Does any of this makes sense? I think the member card should reflect the user's profile privacy setting.
     
    erich37 likes this.
  18. DRE

    DRE Well-Known Member

    *edits last post.

    Added

    When anyone else clicks their member card nothing should be shown at all, except a message saying This member limits who may view their full profile. or 'You must be logged-in to view this member's profile'
     
  19. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    DRE and Chris D like this.
  20. Chris D

    Chris D XenForo Developer Staff Member

    I've done this with literally one line of code ;)

    I will create an add-on out of it for you. You'll love it.
     
    DRE and Walter like this.

Share This Page