XF 1.4 Hiding Likes Bar by Commenting It Out

Amaury

Well-known member
Per discussion in my hiding elements thread, I'm going to be commenting out wherever possible rather than using display: none.

I am having problems hiding the likes bar. In the template post, I made the following change:

Rich (BB code):
<xen:comment><xen:if is="{$post.canLike}">
                    <a href="{xen:link posts/like, $post}" class="LikeLink item control {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:comment>

However, it's still showing:

KHF Likes.webp

For reference, I previously used:

Code:
.message .likesSummary {
    display: none !important;
}

Edit: Yeah, I'm an idiot. That has to do with the likes/unlike bar on the controls bar, so my change above did work, just not where I wanted it to. Now to find which template the likes bar comes from.
 
Last edited:
Use that inspector :)

Screenshot_6.webp


Search:

Code:
likesSummary secondaryContent

Template found: likes_summary

You can comment that code... or do a step further:

Search for:

likes_summary now

They pull the likes_summary in a lot of places, so you can comment out all of that template, or if you want specific areas look at what templates likes_summary is included in.
 
Thanks, @Russ. I did do a template search for some of the phrases, such as likes_user1_user2_user3_and_x_others_like_this, but it returned no results.

Yeah, I'll be hiding it everywhere because of the way we have likes set up, where you click a View Likes: X link on posts and profile posts and it brings up the overlay. By default, at least four people have to have liked something for to be able to bring up the overlay.
 
Actually, when I went to Templates and narrowed it down to "likes" the likes_summary template did show up, but I went into the post_likes template. Then I got distracted and then you posted.

I think someone should hit me in the head with a brick. Any volunteers? ;)
 
Top Bottom