取消置顶限制

有什么方法可以防止普通用户取消置顶主题吗?我深知许多论坛滥用置顶功能,这或许就是 Discourse 允许成员取消置顶的原因。但我只想置顶最重要的信息,并希望这些信息保持置顶状态,直到版主或管理员取消置顶。

1 个赞

Sure, you can disable the site setting automatically unpin topics that is the setting used to globally enable/disable the feature.

3 个赞

But users can still click the X and unpin the message right?

Yes, but only if they know that by clicking on the pin icon something changes.

Ah! And you know how to hide that button with CSS.

Is there a way to prevent this entirely without simply hiding the button with css?

Nope. Hide the button with CSS is the only way.

2 个赞

这是我使用的代码,适用于除 Staff 和 Team 之外的所有其他群组。
附:抱歉“复活”了“僵尸”帖子,但其他人可能仍会觉得它有用。

body:not(.staff) #topic-footer-buttons .pinned-button,
body:not(.primary-group-team) #topic-footer-buttons .pinned-button{
    display: none;
}

body:not(.staff) #topic-footer-buttons .pinned-button:not(.is-hidden)+.topic-notifications-button,
body:not(.primary-group-team) #topic-footer-buttons .pinned-button:not(.is-hidden)+.topic-notifications-button {
    margin-top: 1em;
}
1 个赞