Agreed, which is why I went for the Facebook approach..It would be better if the unlike button was only reserved for a post groans feature.
.likesSummary .LikeText {
background: url("/styles/default/xenforo/icons/like.gif") no-repeat;
padding-left: 20px;
padding-bottom: 1px;
}
<xen:if is="{$message.likes}">
<xen:require css="likes_summary.css" />
<div class="likesSummary secondaryContent">
<xen:if is="{$post.position} == 0">
<span class="LikeText LikeThumb">
<xen:likes number="$message.likes" users="$message.likeUsers" url="$likesUrl" liked="$message.like_date" />
<xen:else />
<span class="LikeText">
<xen:likes number="$message.likes" users="$message.likeUsers" url="$likesUrl" liked="$message.like_date" />
</xen:if>
</span>
</div>
</xen:if>
.LikeThumb {
background: transparent url('@imagePath/path/to/image') no-repeat;
}
.LikeThumb {
background: transparent url('@imagePath/path/to/image') no-repeat;
}
Is there a way that I could modify the CSS to only include these images on the first post of every thread?
Any help would be much appreciated.
<div class="publicControls">
<a href="{xen:link threads/post-permalink, $thread, 'post={$post}'}" title="{xen:phrase permalink}" class="item muted postNumber hashPermalink OverlayTrigger" data-href="{xen:link posts/permalink, $post}">#{xen:calc '{$post.position} + 1'}</a>
<xen:hook name="post_public_controls" params="{xen:array 'post={$post}'}">
<xen:if is="{$post.canLike}">
<a href="{xen:link posts/like, $post}" class="LikeLink item control {xen:if '{$post.position} == 0', 'firstPostLike'} {xen:if $post.like_date, unlike, like}" data-container="#likes-post-{$post.post_id}"><span></span><span class="LikeLabel">{xen:if $post.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
</xen:if>
<xen:if is="{$canReply}">
<a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}" data-postUrl="{xen:link posts/quote, $post}" class="ReplyQuote item control reply" title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
</xen:if>
</xen:hook>
</div>
a.firstPostLike.like {
background: url(styles/default/xenforo/icons/like.gif) no-repeat;
padding-left: 20px;
padding-bottom: 1px;
}
a.firstPostLike.unlike {
background: url(styles/default/xenforo/icons/unlike.gif) no-repeat;
padding-left: 20px;
padding-bottom: 1px;
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.