Age Gate on/for websites

I have a site for games and reviews and other immaturity, and certain companies (Capcom, Bethesday) reguire "age gates". I know what they are, I don't know how to find software to make one (if any), if there's something special in Flash, or anything else about it. I figure since this is the most comfortable online community I've been in, I'd ask in here. Any suggestions?

How are you creating this site? Are you writing static HTML files yourself, running through an off-the-shelf CMS like Wordpress, or something else?

The only way I know how, Frontpage.

The best age gate, one that won't annoy your users, is one like Reddit's:

IMAGE(http://imgur.com/I8DBe.png)

This is also probably the simplest to implement.

Not very tech savvy, how would I build something like that to put on a site? I've only found "this is what I did!" information, not how they did it though.

Are you using any kind of preprocessed language on your site?

MaxShrek wrote:

The only way I know how, Frontpage.

Ewwww.

I'm not clear on the specifics of developing something like this. Web development is not something I've ever gotten into heavily, as far as languages go. I would say, though, that it would be as simple as pointing the user to the age gate whenever they click the link, then determining if the input passes the test, then sending them on to the content.

To make it work right, the page should always check the age gate, so someone can't just direct-link to the content. This would probably be a test that checks a variable, and if it doesn't pass, redirects to the age gate page, which will then return the variable to the page and get past the redirect. I like the type of age gate I pictured above because it's both easier on the user (how often have you put your actual birthdate into an age gate, really?) and the test is simply a yes or no answer. You don't have to check to make sure the month and day occurred before today, and that the current year minus the selected year is >=18. It makes extremely little difference to the computer (to the degree of being a non-difference to the user) but is much easier to code. Any web devs want to give him some sample code?

You might also want to update the title of the thread to something that would attract a developer... Right now, it's not clear that's what you're looking for in this thread.

Dr.Ghastly wrote:
MaxShrek wrote:

The only way I know how, Frontpage.

Ewwww.

:P

And that's why "how are you making the site?" is always the first question I ask. It's quite revealing.

What you want is a little beyond the creation of static pages using a seven year old "WYSIWYG" editor.

I've only found "this is what I did!" information, not how they did it though.

Well, here's how the "how" works:

1. You create a page with a form that allows people to enter their birthdate. The form POSTs to a script on the server.

2. The server-side script takes the submitted date and compares it with today's date. Most server-side languages (Ruby, PHP, ASP, etc) have built-in Date objects which provide date comparison methods. It's a simple matter to check to see if a date is 18 years earlier than the current date or not.

3. After comparing the two dates, the script redirects to either the main content page (on successful date validation) or to a "you're too young" landing page (if the date is too recent).

If you're wondering how on earth you do all that, well... if you intend to continue creating web content, I would highly recommend getting your basic web development skills up to date. You've ridden the Frontpage horse long after everyone else has sent theirs to the glue factory. Creating sites today, a person should really know how to create their HTML without a WYSIWYG tool (they're hardly made anymore) and learn at least the absolute bare-bones basics of JavaScript and one server-side language.

Even if you don't know how to write the server-side script, do you know how to make a basic <form> for the age gate? If you can (a) write the form and (b) identify what server-side scripting your hosting provider allows, you might even be able to commission someone here to write the script that you can just drop in to your site.

It seems that something like an age-gate is something there may well be examples and tutorials out on the web for already. w3schools.com is a great place to start for basics.

As far as server-side stuff, from my limited experience, the best way to describe it is that each page is a program/script that gets run on the server, and like a simple program can do something like print("hello world"), in a server side script you're doing echo(" < HTML > < HEAD >...") and so on based on conditions like databases, cookies and so on.

To get the age gate going, you need to work out someone visiting your site, and what logic to apply to check the first time if they're 18+, if they've got a cookie from another visit (saving that they've passed the gate before), and what to display in each case.

I'm assuming the reason you have to do this is to avoid takedown notices for M-rated trailers. Other than that, I can't see why a publisher would be able to require an age gate.

I'll agree with NSMike on the simple "Are you over 18?" being enough and not annoying to users. It's not like it's going to stop anyone in the first place anyway.

It should be simple to whip up something like this in jQuery using a cookie, but anyone who disables JS will get right past it. It'll keep you from having to deal with server-side coding, though, and should at least meet the requirements. Google or any other crawlers will be able to see the content and cache it, which again defeats the purpose, but a server-side solution will completely hose your SEO.

If you've made a good faith effort to put up an age gate, they can't fault you for not being the world's greetest programmer.

I'll see if I can whip up a quick demo of something for you later today.

It's to prevent me from losing access and contacts from those companies. And yeah, it's 7 year old Frontpage, but it was free. What can I say? I'm poor.

The website we have I went in literally knowing nothing, and been sorting through stuff, figuring out by trial and error. I should get a book, or read stuff, but I figure I'd check with people here before doing so. I trust the names of Goodjers more than I trust many companies.

There are tons of great editors for free. If you're looking for something WYSIWYG then Kompozer is a free one, and most others will let you easily link up with a browser (or just Alt-Tab, F5).

Yeah I don't have an issue with a WYIWYG editor. They can give you a quick glimpse of how things are going before you do a *real* test to see what a page will really look like.

I just find the idea of Frontpage horrifying.

Here you go, MaxShrek. Pure HTML/CSS/Javascript age gate I whipped up while sitting in a meeting.

GWJ Age Gate Demo
Downloadable ZIP version

After making a choice, the adult or non-adult content will be loaded, or none if they cancel the dialog. Click "Delete Cookie" and refresh to try the other choices.

Hope this helps.

Scratched wrote:

There are tons of great editors for free. If you're looking for something WYSIWYG then Kompozer is a free one, and most others will let you easily link up with a browser (or just Alt-Tab, F5).

Kompozer is nice now that development has resumed. For a while there it was all but abandoned.

Bonus_Eruptus wrote:

Here you go, MaxShrek. Pure HTML/CSS/Javascript age gate I whipped up while sitting in a meeting.

GWJ Age Gate Demo
Downloadable ZIP version

After making a choice, the adult or non-adult content will be loaded, or none if they cancel the dialog. Click "Delete Cookie" and refresh to try the other choices.

Hope this helps.

Cool, I'll check that out and the other suggestions here. Cheers!

But, where are the boobs?

MaxShrek wrote:
Bonus_Eruptus wrote:

Here you go, MaxShrek. Pure HTML/CSS/Javascript age gate I whipped up while sitting in a meeting.

GWJ Age Gate Demo
Downloadable ZIP version

After making a choice, the adult or non-adult content will be loaded, or none if they cancel the dialog. Click "Delete Cookie" and refresh to try the other choices.

Hope this helps.

Cool, I'll check that out and the other suggestions here. Cheers!

But, where are the boobs? :grin:

I figure I'd leave it SFW. There is oogaba, at least.

NSMike wrote:

The best age gate, one that won't annoy your users, is one like Reddit's:

IMAGE(http://imgur.com/I8DBe.png)

This is also probably the simplest to implement.

how can i implement a landing page which requires the user to confirm they are over 18 using html or javascrpt. if they choose yes they will be directed to my website, if they choose no they will be redirected to google. plz help

adrianno wrote:
NSMike wrote:

The best age gate, one that won't annoy your users, is one like Reddit's:

IMAGE(http://imgur.com/I8DBe.png)

This is also probably the simplest to implement.

how can i implement a landing page which requires the user to confirm they are over 18 using html or javascrpt. if they choose yes they will be directed to my website, if they choose no they will be redirected to google. plz help

Use the demo I made above, and just replace the appropriate calls to LoadContent() with calls to:

window.location.replace("http://yourdomain.com");
OR
window.location.replace("http://google.com");