Looking to hide Likes & Decorate Op

AI-generated summary

Hiding Likes and Decorating Topic Author

Heliosurge seeks guidance on hiding the Like button for users not part of specific groups in public categories, and decorating the Topic Author’s posts to identify them as OP.

Canapin suggests using CSS to hide the Like button based on user groups, but notes that a plugin would be required to prevent users from liking posts. They also cross-link a related topic for decorating the Topic Author.

Stephen provides a CSS code to decorate responses by the OP, which Heliosurge finds working but wants to move the decoration after the name or add space between the decoration and name.

Canapin notes that the code’s default behavior is to display the decoration after the name, but this may vary depending on the forum’s HTML structure and enabled features.

Heliosurge mentions using Post Badges, National Flags, and User Notes plugins, and wonders if these might interfere with the decoration’s position. They also consider adding a border around the OP’s name as an alternative.

Hi I have categories that are visible to public but only certain groups are allowed to post/reply.

I am looking for guidance thst if current user is not part of saud groups to hide the Like button in posts. To remove one of the many flaws of reddit.

I am also looking fir code to allow decorating a Topic Author so all of there posts in the topic identify them as Op.

Thanks.

You can hide the like button with CSS, but that won’t prevent users from liking posts (a plugin would be required to ensure that), if they figure out how to un-hide the button for example.

I suppose the easiest way would be using CSS Classes for Current User's Groups which adds the current user groups to the body classes, then use CSS such as:

body.category-your-category-slug:not(.group-group_name) {
    button.like {
        display: none;
    }
}

Let me know if you have trouble understanding :slight_smile:

Here’s a related topic which, alas, didn’t have any reply. I cross-link so helping on one topic will help solving the other.

This will decorate responses by the OP to their own topic:

.topic-owner:not(:first-child) article .row .topic-body .topic-meta-data .names::after {
    content: "Topic Starter";
    color: var(--secondary);
    background: var(--secondary-medium);
    padding: 0px 8px;
    border-radius: 8px;
}

You could substitute “topic starter” for “OP” or whatever you like.

Cool this us working. I see it is every post adter First. Lol

How do I move this also to after name?

Or even space between decoration & name.

I tried the code out of curiosity. By default, it’s set after your name:

But it depends on the HTML present in this section, which varies from a forum to another depending on the enabled features.

O have post badges plugin & National flags plugin, User Notes. Woupd anybof these interfer with position?

Alternatively can we sinoly add a border around the Op Name?

Here is a link to the post.

https://community.openmr.com/t/htc-vive-xr-elite-preview-vr-s-best-chance-yet/40447/3?u=heliosurge