inherit
261943
0
Mar 31, 2024 23:42:55 GMT -8
osnafrank
79
August 2020
osnafrank
|
Post by osnafrank on Aug 20, 2021 11:46:56 GMT -8
Forum URL: (private) Woo hoo, TGIF. Greetings from Germany.
Quick Question: Is there a way to deny guests seeing postings behind a spoiler ?
Thanks in Advance and have a wonderful weekend, everyone.
|
|
#e61919
Support Manager
154778
0
1
Apr 27, 2024 23:19:00 GMT -8
Michael
19,550
May 2010
wiseowl
|
Post by Michael on Aug 20, 2021 11:52:00 GMT -8
Hi,
I don't know of any way to restrict guests from seeing what is behind the spoiler tag. Sorry!
This is something we will consider for the future and I'll label this with the Feature Request label.
|
|
inherit
261943
0
Mar 31, 2024 23:42:55 GMT -8
osnafrank
79
August 2020
osnafrank
|
Post by osnafrank on Aug 20, 2021 11:56:47 GMT -8
Hi, I don't know of any way to restrict guests from seeing what is behind the spoiler tag. Sorry! This is something we will consider for the future and I'll label this with the Feature Request label. Thanks for the quick reply, much appreciated. Y'all have a great weekend.
|
|
#e61919
Support Staff
224482
0
1
May 1, 2024 15:57:15 GMT -8
Scott
23,320
August 2015
socalso
|
Post by Scott on Aug 20, 2021 12:49:47 GMT -8
osnafrank , You can hide the spoilers from guests with a couple modifications to the default theme that guests see. 1. Go to Admin > Structure > Layout Templates, Forum Wrapper 2. Look for: <div id="wrapper"> 3. and replace it with: <div id="wrapper" class="{if $[current_user.is_guest]}is-guest{/if}"> 4. Then go to Admin > Themes > Advanced Styles & CSS, Style Sheet 5. Scroll to the very bottom and on a new line add this: #wrapper.is-guest .spoiler_header { display: none; } Note, this currently won't work for guests visiting the forum using mobile devices (mobile view).
|
|
inherit
261943
0
Mar 31, 2024 23:42:55 GMT -8
osnafrank
79
August 2020
osnafrank
|
Post by osnafrank on Aug 23, 2021 8:00:24 GMT -8
Thanks a lot Scott, it's workin great ! Thanks everyone for your help.
|
|
inherit
261943
0
Mar 31, 2024 23:42:55 GMT -8
osnafrank
79
August 2020
osnafrank
|
Post by osnafrank on Aug 23, 2021 11:38:44 GMT -8
Addendum:
Yes, it works, but only for spoilers that have been posted before the modification.
Spoilers posted afterwards are still visible for guests.
Nevertheless, thanks everyone.
|
|
#e61919
Support Staff
224482
0
1
May 1, 2024 15:57:15 GMT -8
Scott
23,320
August 2015
socalso
|
Post by Scott on Aug 23, 2021 11:57:42 GMT -8
osnafrank, the code will work for spoilers regardless if they are made before or after the code was added to the forum. The code targets the element itself regardless of time. Can you link me to a post that still shows a spoiler for quests.
|
|
inherit
261943
0
Mar 31, 2024 23:42:55 GMT -8
osnafrank
79
August 2020
osnafrank
|
Post by osnafrank on Aug 23, 2021 12:52:36 GMT -8
|
|
#e61919
Support Staff
224482
0
1
May 1, 2024 15:57:15 GMT -8
Scott
23,320
August 2015
socalso
|
Post by Scott on Aug 23, 2021 12:58:13 GMT -8
osnafrank, ah ok you have the Vspoiler plugin installed which is the issue. Give me a minute to look this over.
|
|
#e61919
Support Staff
224482
0
1
May 1, 2024 15:57:15 GMT -8
Scott
23,320
August 2015
socalso
|
Post by Scott on Aug 23, 2021 13:32:40 GMT -8
osnafrank, In your CSS try replacing this: #wrapper.is-guest .spoiler_header { display: none; } with this: #wrapper.is-guest .spoiler_header, #wrapper.is-guest .spoiler { display: none!important;}
|
|
inherit
261943
0
Mar 31, 2024 23:42:55 GMT -8
osnafrank
79
August 2020
osnafrank
|
Post by osnafrank on Aug 24, 2021 9:40:50 GMT -8
Scott, that did the trick !
Thanks again for your help, much appreciated.
|
|