PDA

View Full Version : How to make an optional enter or exit page


Adamw
04-06-2010, 02:44 PM
Hello, I am new to dreamweaver and need tips on setting up a simple start page that would give the options for visitors to enter to the homepage if 18 years + or exit back to search engine if not. Any help would be greatly appreciated!

Corrosive
04-06-2010, 02:57 PM
I think I'd use a 'confirm you are over 18' checkbox to create a session in PHP and if no session is created (when someone accidently tries to navigate past the entrance page) I'd redirect back to the start.

Shouldn't be too hard but you need to make sure PHP is running on your server. There may be a javascript option but that can be disabled and maybe by-passed.

Hope that gives you something to go on.

dzwestwindsor
04-07-2010, 11:43 PM
Well, if you even wanted a simpler alternative, you can just have a link that says "I am over 18 Years Old" and then that link brings them to the homepage.

that's the bare minimum.

Corrosive
04-08-2010, 06:02 AM
Well, if you even wanted a simpler alternative, you can just have a link that says "I am over 18 Years Old" and then that link brings them to the homepage.

that's the bare minimum.

But in this case there would be no guarantee of the visitor going through the 'confirm' page. They could easily bypass it and go straight to whatever over 18 content Adam is hosting. If you insist that a session is created and checked then you will avoid this problem.

I agree your way is easy but it doesn't solve the problem. ;)

domedia
04-08-2010, 01:51 PM
This all depends if it is a requirement for people not to be able to go straight into inside pages. Think what this would mean SEO wise too.

Adamw, you got some more specific requirements?

Adamw
04-08-2010, 02:59 PM
Thanks for the replies so far everyone! I dont really have any specific requirements, other than I just wanting visitors to have to click either enter or exit and have those lead either into the sites main index or back to a search engine. I dont want the main index to be available unless the visitor clicked enter, or physically typed the index adress into the address bar. I would like to have a text or graphic near by the enter exit options that clearly says 18+

I think I will use a relative link with the enter text to access the index page, and an absolute link for the exit text, does this sound like it would work?

Corrosive
04-08-2010, 03:52 PM
OK, so let me get this straight.

I dont want the main index to be available unless the visitor clicked enter, or physically typed the index adress into the address bar.

Anyone navigating to the index page from say, Google, will not be let in unless they click the box to confirm they are over 18?

If they search Google for the term say, 'rude jokes about Domedia' (sorry Dom ;)) and the link goes straight to the 'domediajokes.html' page then that is acceptable? They should get there without going through the entrance page?

Also, if they type in http://www.yoursite.com/domediajokes.html then they can also enter without going through the entrance page?

So, you are only targeting those who go to the first index page to have to click the link?

Is that correct?

Adamw
04-08-2010, 04:17 PM
Good point, how can you make it so no matter what link pops up in say google, they have to click something that says they are 18+?

I want it so if they type www.mysitename.com (http://www.mysitename.com) into the address bar it takes them to an entrance page where they have to confirm they are 18+. Using various other websites as examples to base mine off of I have noticed that after you confirm 18+ on the www.sitename.com (http://www.sitename.com) page it takes you too www.sitename.com/index.php (http://www.sitename.com/index.php) as a home page, or if you just type www.sitename.com/index.php (http://www.sitename.com/index.php) or www.sitename.com/somethingelse (http://www.sitename.com/somethingelse).. it will take you straight to that homepage or other content bypassing the 18+

If theres a way to always require that 18+ confirmation that would be good too

mangofreak
04-08-2010, 04:17 PM
It seems to me that Adam wants to prevent anyone under 18 form entering to the index page. I would think that the index could be just a landing page with the links to enter or not.
The page with the actual content with the rude jokes could have some kind of script that would re-direct the user to the landing page if he/she comes from any other place other that the landing page.
Is that it Adam?

Adamw
04-08-2010, 04:49 PM
yes thats right

Corrosive
04-08-2010, 04:52 PM
OK, try to navigate to here...

http://corrosiveonline.co.uk/_projects/restricted-access-demo/home.php

It should fire you back out to a page with a checkbox to confirm adulthood. Click the button without checking it and it still won't let you in. Check it and press submit and you are in to the rude Domedia jokes.

Is this what you meant?

Adamw
04-08-2010, 05:11 PM
Yes, as well as that option on a landing page www.mysitename.com

Corrosive
04-08-2010, 05:20 PM
Yes, so, in my example your 'landing page' or index.php would be; http://corrosiveonline.co.uk/_projects/restricted-access-demo/index.php

Nothing gets in until they have agreed they are over 18 on the index page. Then they can surf the rest of the site.

What I have done is very quick and dirty and you might want to elaborate on it but I can let you have the files if you like?

...By elaborate on I'd say you need to set a cookie to remember the viewer has checked the box as that could get a bit annoying...

dzwestwindsor
04-09-2010, 12:03 AM
well if your using PHP then corrosive's first post should do just fine for what you want

dzwestwindsor
04-09-2010, 12:05 AM
oh woops sorry, my bad, i didn't relaize that there was a second page to this. lol then my post is kinda really out of date.

Please disregard. >.<