# 阻止用户在其他类别中移动主题

**URL:** <https://meta.discourse.org/t/prevent-users-from-moving-topics-in-other-categories/255933>\
**Category:** Development\
**Created:** [2023年二月22日 13:08 UTC](https://meta.discourse.org/t/prevent-users-from-moving-topics-in-other-categories/255933 "2023-02-22T13:08:26Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [2023年二月22日 18:25 UTC](https://meta.discourse.org/t/prevent-users-from-moving-topics-in-other-categories/255933/4 "2023-02-22T18:25:05Z")

</div>

@Canapin 为我提供了一段代码，用于隐藏特定群组之外的群组的点赞按钮。

这可以为您提供一个很好的基准。

> [@Looking to hide Likes & Decorate Op](https://meta.discourse.org/t/looking-to-hide-likes-decorate-op/255729/2?u=heliosurge):
>
> 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](https://meta.discourse.org/t/css-classes-for-current-users-groups/226068) 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…

已修复链接

---

_[View the full topic](https://meta.discourse.org/t/prevent-users-from-moving-topics-in-other-categories/255933)._
