Spoiler content only visible for registered users

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.

1 Like

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?

1 Like

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.

1 Like

Yay, sounds great. Thank you and no hurry :smiley:

I would not depend on a spoiler tag plugin to hide content from non-registered users. It is not the scope of spoiler plugins. :slight_smile:


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