Hi there,
is it possible to make content with spoiler tag only visible for registered users?
The discussion revolves around making spoiler content visible only to registered users. testuser2 asks if it’s possible to restrict spoiler content to logged-in users. ondrej replies that it’s not currently possible. Canapin suggests a potential solution using JavaScript/CSS to hide the spoiler effect for unregistered users, but notes that determined users could bypass it by editing CSS. testuser2 clarifies that unregistered users should see blurred content and be redirected to login upon clicking. Canapin agrees it’s feasible and offers to help, though it may take time. maiki cautions against relying on spoiler plugins for access control, as that’s outside their intended purpose. testuser2 expresses interest in the blurred spoiler style as a convenient way to hint at content without developing a new feature.
Hi there,
is it possible to make content with spoiler tag only visible for registered users?
Hello @testuser2!
No it is not possible as far as I’m aware currently.
I guess you can do it with js/css in your theme customization?
Something like: if #current-user exists then remove classes “spoiled”.
It would be perfect when users can see only the “spoiled” version of pictures and text, so that they see ther eis something. And if they click maybe a forward to register/login if not logged in.
Do you think this should be easy possible with js/css?
Ah okay. Maybe it is possible to remove the click event, but since the blurred effect is done via CSS, they’ll be able to see it anyway if they edit the css rule in their browser (regular people won’t do this tough).
edit: sorry a bit trouble to undersand you: you want unrgistered users to see the blurred or unblurred content?
I want unregistered users to see only the blurred version and if they click, maybe a redirect to login/register.
That seems not very hard. I can try to do such a script but you’ll have to wait a few hours because I need to rebuild my Discourse with the spoiler plugin and I prefer to do that in the late evening.
Yay, sounds great. Thank you and no hurry ![]()
I would not depend on a spoiler tag plugin to hide content from non-registered users. It is not the scope of spoiler plugins. ![]()
Hmm okay. I just like the blurred-style of spoiled pictures and text and thought that would be the easiest way instead of developing a new feature. It shows the user that there is some picture or some text