Heliosurge
(Dan DeMontmorency)
6. Juli 2025 um 07:14
8
Diese Theme component kann wahrscheinlich als Referenz verwendet werden, um eine benutzerdefinierte Komponente zum Ausblenden von Stummschaltungsoptionen zu erstellen. Da sie Likes für neue Benutzer ausblendet
This is a very simple theme component that gives you the ability to hide the “like” functionality from new (TL0) users. While not 100% foolproof against an extremely determined troll, it will prevent the “like” elements from ever loading into the DOM while active. The hope is that it can act as an additional obstacle to trolls attempting to abuse likes. I also included the option to hide likes from anons in case that’s helpful for any community.
Before:
[before]
After:
[after]
Installatio…
Diese verwendet JS, aber ich bin ziemlich sicher, dass eine reine CSS-Lösung verwendet werden kann.
Hier ist ein Ausblenden-Like-Button mit CSS
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 understandi…
1 „Gefällt mir“