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

hide avatar from guest and add follow me

Discussion in 'Styling and Customization Questions' started by Adam Howard, Apr 14, 2013.

  1. Adam Howard

    Adam Howard Well-Known Member

    This code worked before and I'm unsure what is keeping it from working now (after upgrading XenForo). I'm not use if it is the code or TMS is just being picky.

    Assume for a moment it is the code, I'd love to know what is wrong with it.

    The Goal:

    Hide user avatars from guest and show a "follow me" button above the avatar for members.

    message_user_info

    originally
    PHP:
        <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
            <
    div class="avatarHolder">
                <
    span class="helper"></span>
                <
    xen:avatar user="$usersize="m" />
                <!-- 
    slotmessage_user_info_avatar -->
            </
    div>
        </
    xen:hook>
    After
    PHP:
     <xen:follow user="$userclass="Tooltip" style="background: url('styles/followme.png') no-repeat 8px center; padding:5px; text-align:center; display:block; font-weight:bold;" />
    <
    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 is="{$visitor.user_id}">
    <
    xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
    <
    div class="avatarHolder">
    <
    span class="helper"></span>
    <
    xen:avatar user="$usersize="m" />
    <!-- 
    slotmessage_user_info_avatar -->
    </
    div>
    </
    xen:hook>
    <
    xen:else />
     
  2. Adam Howard

    Adam Howard Well-Known Member

  3. SneakyDave

    SneakyDave Well-Known Member

    What is the point of hiding avatars to guests in the postbit when they are displayed in the thread list and on post quotes?
     

Share This Page