Heliosurge
(Dan DeMontmorency)
7월 17, 2024, 2:36오후
3
여기 제 주제가 도움이 될 수 있을 것 같습니다. @Canapin 님이 특정 그룹에 속하지 않은 경우 카테고리에서 좋아요 버튼을 숨기는 코드를 공유했습니다. 이 코드를 수정하여 현재 사용자의 상태와 침묵(silenced) 여부를 확인하여 버튼을 숨기도록 사용할 수 있을 것입니다.
Hi I have categories that are visible to public but only certain groups are allowed to post/reply.
I am looking for guidance thst if current user is not part of saud groups to hide the Like button in posts. To remove one of the many flaws of reddit.
I am also looking fir code to allow decorating a Topic Author so all of there posts in the topic identify them as Op.
Thanks.
Coin-coin le Canapin:
가장 쉬운 방법은 현재 사용자의 그룹을 body 클래스에 추가하는 현재 사용자의 그룹을 위한 CSS 클래스 를 사용하는 것입니다. 그런 다음 다음과 같은 CSS를 사용할 수 있습니다:
body.category-your-category-slug:not(.group-group_name) {
button.like {
display: none;
}
}
이해하는 데 어려움을 겪는 부분이 있다면 알려주세요.
이것을 임시 해결책으로 사용할 수 있습니다.
2개의 좋아요