Heliosurge
(Dan DeMontmorency)
Juillet 6, 2025, 7:14
8
Ce Theme component peut probablement être utilisé comme référence pour construire un composant personnalisé afin de masquer les options de mise en sourdine. Car il masque les likes pour les nouveaux utilisateurs
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…
Celui-ci utilise du JS mais je suis à peu près sûr qu’une solution CSS pure devrait pouvoir être utilisée.
Voici un bouton pour masquer les likes avec 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 « J'aime »