# 静音状态以阻止使用反应的能力

**URL:** <https://meta.discourse.org/t/silence-status-to-block-ability-to-use-reactions-as-well/316795>\
**Category:** Feature\
**Tags:** moderation, reactions\
**Created:** [2024年七月17日 13:41 UTC](https://meta.discourse.org/t/silence-status-to-block-ability-to-use-reactions-as-well/316795 "2024-07-17T13:41:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)\
**Post date:** [2024年七月17日 14:36 UTC](https://meta.discourse.org/t/silence-status-to-block-ability-to-use-reactions-as-well/316795/3 "2024-07-17T14:36:09Z")

</div>

我的主题可能有所帮助。@Canapin 分享了在用户不属于某个群组时隐藏某个分类下“点赞”按钮的代码。该代码或许可以修改，以使用当前用户的状态，并在用户被静音时隐藏按钮。

> [@隐藏点赞和装饰选项](https://meta.discourse.org/t/looking-to-hide-likes-decorate-op/255729?u=heliosurge):
>
> 您好，我有一些对公众可见的类别，但只有特定群组才能发帖/回复。 我正在寻找指导，如果当前用户不是这些群组的成员，则隐藏帖子的“点赞”按钮。以消除 Reddit 的众多缺陷之一。 我还想寻找代码，允许装饰主题作者，以便他们在主题中的所有帖子都能识别他们为 OP。 谢谢。

> [@Canapin](#):
>
> 我猜最简单的方法是使用 [CSS Classes for Current User’s Groups](https://meta.discourse.org/t/css-classes-for-current-users-groups/226068)，它会将当前用户所属群组添加到 body 类中，然后使用类似以下的 CSS：
> 
> ```plaintext
> body.category-your-category-slug:not(.group-group_name) {
> button.like {
> display: none;
> }
> }
> 
> ```
> 
> 如果您在理解方面有任何困难，请告诉我。

这可以作为一种临时的解决方案。

---

_[View the full topic](https://meta.discourse.org/t/silence-status-to-block-ability-to-use-reactions-as-well/316795)._
