Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: Wellwisher on November 25, 2021, 05:23:58 PM

Title: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 25, 2021, 05:23:58 PM
Hi,

I am creating a new NSFW board.
I want users to see a warning message before they enter a specific board or category e.g

"You must be 18+ to view this community discussion"

I like how Reddit has done theirs (screen shot attached).
Is there a mod that can do this or can this be done by default on SMF?

(https://i.imgur.com/PD360dc.png)

-Wellwisher
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: shadav on November 25, 2021, 05:53:31 PM
interesting idea, you'd be better off asking in the Mod Requests (https://www.simplemachines.org/community/index.php?board=79.0) as this would need to be custom made, and if you were asking for free or paying to have it made

not what you are looking for but some ideas for you
set up a new membergroup 18+ have the group requestable by members, limit access to said board to only members of that group

some mods that may be helpful or not
Password Protect Boards (https://custom.simplemachines.org/index.php?mod=2873)
really only works if no one gives out the password

Board Notes (https://custom.simplemachines.org/index.php?mod=163)
displays a note at the top of the board (but by that point, they've already entered the board)

Board Notices (https://custom.simplemachines.org/index.php?mod=2371) does basically the same thing as the one above

I have a script that does this on one of my sites, but it's for the entire site as a general warning
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 25, 2021, 07:02:34 PM
Quote from: shadav on November 25, 2021, 05:53:31 PMinteresting idea, you'd be better off asking in the Mod Requests (https://www.simplemachines.org/community/index.php?board=79.0) as this would need to be custom made, and if you were asking for free or paying to have it made

not what you are looking for but some ideas for you
set up a new membergroup 18+ have the group requestable by members, limit access to said board to only members of that group

some mods that may be helpful or not
Password Protect Boards (https://custom.simplemachines.org/index.php?mod=2873)
really only works if no one gives out the password

Board Notes (https://custom.simplemachines.org/index.php?mod=163)
displays a note at the top of the board (but by that point, they've already entered the board)

Board Notices (https://custom.simplemachines.org/index.php?mod=2371) does basically the same thing as the one above

I have a script that does this on one of my sites, but it's for the entire site as a general warning

Sounds good @shadav . Any chance this thread can be transferred to mod request. Happy to pay £20 to whoever wants the job - providing they make the mod open-source, can work with version 2.0 & 2.1 and available for everyone to download via the SMF site. They can contact me for more details. Payment via paypal.  ;D
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: shadav on November 25, 2021, 07:05:29 PM
there ya go, moved it into the mod request board and changed the title per the rules of the board
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 25, 2021, 07:08:34 PM
Thank you Shadav  ;)
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Aleksi "Lex" Kilpinen on November 26, 2021, 01:45:18 AM
I actually solved this by locking NSFW boards to a requestable group, and included the warnings and disclaimers in the group description.
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 26, 2021, 10:30:30 AM
Quote from: Aleksi "Lex" Kilpinen on November 26, 2021, 01:45:18 AMI actually solved this by locking NSFW boards to a requestable group, and included the warnings and disclaimers in the group description.

I would be cautious as a site owner  doing it that way because what you're saying from a 'legal stand point' is that you're taking full responsibility to screen members. Where as, I want the member to agree to a 'contract/policy' on a self-serve basis.

Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Aleksi "Lex" Kilpinen on November 26, 2021, 11:29:00 AM
Make the group freely joinable then - Same thing, you are not screening at all.
And my use case wasn't really exactly this, we require legal age at registering already and the disclaimers for the group were more along the lines that "The administration doesn't give a fudge if the contents herein offend you in some way, you've been warned. :D "
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 26, 2021, 02:40:04 PM
Quote from: Aleksi "Lex" Kilpinen on November 26, 2021, 11:29:00 AMMake the group freely joinable then - Same thing, you are not screening at all.

My dude, it's about style & pizzazz.  8) That reddit message just pops and looks gorgeous. At the same time, you're doing gods work by reminding visitors they need Jesus. It's perfect.  :laugh:
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: shadav on November 26, 2021, 02:54:27 PM
so I had a thought, maybe just maybe

so here's the one that I use on my site...again this is site based and cookie based

https://github.com/stevemeisner/age-verification

but what I'm thinking is that in your index.template.php in the header where you would add the link to the js you should be able to wrap that in an if statement

so if board id = ; age verification
the only issue would be if they just clicked on say recent topics, I don't think it would pop up
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 26, 2021, 03:06:34 PM
Quote from: shadav on November 26, 2021, 02:54:27 PMthe only issue would be if they just clicked on say recent topics, I don't think it would pop up

Now we're talking, @shadav . This looks promising. I completely forgot about the recent topics.  ???
I don't want NSFW topics coming into the recent topic feed.

Looks like it will take a lot more work than I thought.  :P

Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 26, 2021, 03:13:12 PM
On second thought, I can combine what Aleksi "Lex" Kilpinen said about making the group 'freely joinable' and that will solve the problem of NSWF topics not appearing in the recent topics feed for all.  Plus I can have this nice looking consent pop up.

Yeah this could work. :D

Thanks for the suggestions guys. Thanks Shadav for the Github mod. <3
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: Wellwisher on November 27, 2021, 07:35:40 PM
Quote from: Aleksi "Lex" Kilpinen on November 26, 2021, 11:29:00 AMMake the group freely joinable then

@Aleksi &#034;Lex&#034; Kilpinen how do I do this on SMF?  O:)
Title: Re: [Paid] Add a "warning message" before member enters a specific board e.g "NSFW 18+"?
Post by: shadav on November 27, 2021, 07:48:22 PM
admin > members > membergroups
either create a new membergroup or click on modify on the group you want

Select Group Type
Free (User may leave and join group at will)