Follow me (postbit) [Deleted]

Thanks for this resource. (y)

Is there a way to apply different classes to the follow link with a conditional statement, depending on whether or not you're following the user in question?
 
Can you Fix the Code to Horizontal Postbit? Please!!

HTML:
.messageUserInfo {
float: none !important;
width: auto !important;
}

.messageUserBlock div.avatarHolder .avatar img {
width: 48px;
height: 48px;
}

.Responsive .messageUserBlock div.avatarHolder
{
float: left;
padding: 5px;
}

.messageUserBlock h3.userText {
margin-left: 64px;
}

.messageUserBlock {
overflow: hidden;
margin-bottom: 5px;
position: relative;
}

.messageUserBlock .userBanner
{
max-width: 150px;
margin-left: 0;
margin-right: 0;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
position: static;
display: inline-block;
}

.messageUserBlock a.username {
padding-top: 2px;
}
 
Original XenForo 1.1.x and 1.2.x guide

This simple template edit will add a nice follow me button above your user's avatars.

Template: message_user_info

Search for

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="$user" size="m" />
            <!-- slot: message_user_info_avatar -->
        </div>
    </xen:hook>

add above

PHP:
<xen:follow user="$user" class="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>

When done it will look like this

PHP:
<xen:follow user="$user" class="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:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <div class="avatarHolder">
            <span class="helper"></span>
            <xen:avatar user="$user" size="m" />
            <!-- slot: message_user_info_avatar -->
        </div>
    </xen:hook>

Download the "follow me" image and upload it

styles/followme.png

(You can of course change this path as needed)


Simple and easy.
You're welcome :)
 
Last edited:
Top Bottom