User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » web - how require visit intro page before entering Page [1]  
quagmire02
All American
44225 Posts
user info
edit post

how would one ensure that the "intro" page is visited first before entering a site, even if they've been there before? and how would you go about redirecting a user who hadn't already visited the intro page to the intro page even if they typed in a valid address within your site? is it only possible to do this with javascript?

4/1/2007 8:32:37 PM

darkone
(\/) (;,,,;) (\/)
11610 Posts
user info
edit post

Do you hate your users?

4/1/2007 8:34:20 PM

BigMan157
no u
103354 Posts
user info
edit post

check the referer with php?

[Edited on April 1, 2007 at 8:42 PM. Reason : or check form POST variables or etc.]

4/1/2007 8:40:58 PM

quagmire02
All American
44225 Posts
user info
edit post

^^ no...rather, it's required to avoid legal issues (or so i understand)

^ i've only just recently gotten into PHP...i'll see what i can dig up (i wasn't even sure where to start)

4/1/2007 9:14:01 PM

Raige
All American
4386 Posts
user info
edit post

If you had to do it I'd find the equivalent of a application.cfm or global.asp that executes before anything else and tell it that if the user doesn't have a session started display this page. When user visits that page give them a session variable that allows them to view the rest of their site.

In cold fusion it's pretty simple. I don't know about asp or php.

4/1/2007 9:40:05 PM

Raige
All American
4386 Posts
user info
edit post

---wack had an internal error sorry bout the double post---

[Edited on April 1, 2007 at 9:49 PM. Reason : !]

4/1/2007 9:49:39 PM

Noen
All American
31346 Posts
user info
edit post

you can sort of do it with htaccess and modrewrite, but here's the easiest way (i think)

setup a PHP session, when it's started (this will need to be global and across the entire site), send them directly to the intro page. For users who just get to the site, they will see it just like normal. For returning users, they will be redirected. have the session timeout after like 3-4 hours.

but really, if there's some legal notice that needs to be seen, do it with some other means, implementing this will piss people off severely and is going to lose your client's a LOT of traffic.

4/2/2007 1:37:27 AM

Raige
All American
4386 Posts
user info
edit post

I can see the need for this with secure document areas where people need to be "forced" to see terms each time for legal reasons.

I think Noen's method is the same as mine but I think how we look at it and possible how we would implement it is different.

First, in application.cfm (first file executed in a directory and sub directories) it will see if they have an active session. If not, they go to your legal page and by using #cgi.script_name# (cold fusion syntax of a cgi variable) when they click "okay" it will send them to whatever page that were trying to go.

It gets more complicated when they bookmark pages that have url specific values. Then you go #cgi.script_name##query_string# (Here's an example of my form for one of my login pages. I do this by telling my application page to see if they have a valid session variable and if they DONT go to my login.cfm. It's the same concept as what you are doing but instead of them having to login, they just need to click okay.

4/2/2007 6:39:30 AM

robster
All American
3545 Posts
user info
edit post

just make it part of the registration process for the site, and then only allow registered users to access information that requires this legal agreement.

4/3/2007 9:38:34 AM

Raige
All American
4386 Posts
user info
edit post

^ That's ideal but requires a great deal more work than my idea but is probably the smartest way to have a "private" section and a public section.

4/3/2007 11:08:05 AM

robster
All American
3545 Posts
user info
edit post

True... Unless your website is built with dreamweaver or some other template manager...

Then, just as the "logged in" check to the top of the page, with permission set as a default to "granted", changing that variable to "restricted" for the pages you want to keep hidden

Could be better in the long run anyhow to spend a little extra time in the beginning to do it the right way.

4/3/2007 12:25:47 PM

1
All American
2599 Posts
user info
edit post

cookies?

4/3/2007 1:20:43 PM

Petschska
All American
1182 Posts
user info
edit post

since you're already being cruel, make the whole site flash based and import lots of uncompressed image files.

4/3/2007 5:41:43 PM

 Message Boards » Tech Talk » web - how require visit intro page before entering Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.