Jump to content

I have the concept.


PeripheralBrain

Recommended Posts

I have the concept I want... and I know how to do some of these things by themselves... but not in combination, and I really need to do this in combination for the concept to work.

I'm totally new to PHP/mySQL...

 

Background information:

I'm using ExpressionEngine (incase anyone is familiar)...and I'm using that for a membership system as well as a means to restrict certain content to certain member/account types.  The website is membership ONLY... (using cookies to remain logged in).

 

The part I want to make happen with PHP/mySQL is to restrict some content even further.  I want this content to be accessible through sequence only.  The sequence of what is presented is important... so imagine it is something like this:

 

 

 

Section 1 :    About the world.

Section 2:    About something else.

 

(((For example--- the user clicks Section 1... and now (invisible to the user) the DATE/TIME is taken into the database as the moment they BEGAN that part of the section.)))

 

((( Now the user is presented with the information they requested)))

 

"Here is the content--- information on some countries in the world.

INFoRMATION IS HERE... BLA BLA BLA BLA BLA

BLABLA BLA BLA BAL BLA BLA BLA BLA BLABLA..."

 

Now user has available choices:

"------------------------

1. Tell me about Japan.

2. Tell me about Hawaii.

3. Tell me about Mexico.

4. Tell me about U.S.A."

 

Clicking a link will either take the user to a new PAGE (file) with the information in it... or it will somehow channel the next information from somewhere (text file or something) into the same page, changing the content that way.  However it happens, I want it to be so when a choice is made--- you can not press the back button and choose something else.  I want the user to really 'think' about the choices they are making before they make them... they are free to take their time as long as they wish while they're IN sequence...  but if they interrupt the sequence by pressing back or just closing the browser window *** I WANT TO MAKE THAT SPECIFIC SECTION (1) INACCESSIBLE FOR A DURATION OF TIME (few days) ***.  (((hence the grabbing of the date/time when the user began that section)))... 

 

When the time limit is lifted--- then they can access that content again. 

 

If this requires multiple pages--- then each page will require the previous as a referrer, so that way nothing can be accessed out of the intended sequence.  The idea is that, if the user begins a section--- they MUST go through step 1--- to reach step 9... and they need to do each one in order.

 

The user will have a wide variety of choices though... which means there will be ONE starting point (the beginning of the section), and potentially hundreds of 'ending' points to that section.  For now, I'll just says 'dozens' of ending points... but eventually it will be many more.  Each part of the section requiring the previous page to access it (maintaining sequence).

 

 

If this effect can be done without the need for multiple pages, that might be good... as there will likely be hundreds/thousands of them when I'm done.  That seems like a bit much... but sometimes one page will only have a small bit of information in it, and nothing else before the next choices are presented.  But then again, I'm not sure which would be worse/take longer, having thousands of pages or thousands of database entries I need to figure out how to link up with and where.

 

Does this make sense?

 

I'm trying to figure out a good place to START making this happen...

 

have any of you done anything like this before?

 

Thanks for any help you can be...

Link to comment
Share on other sites

What you've said so far sounds like a good start.  Another idea might be to store the user's current page in a single location, along with the timestamp.  Each time they access a page you can check to see if it's a valid choice for the last page they accessed.  If it's not, then you can set a flag on their account saying they need to wait.

 

As for storing all those pages and linking them, I would be thinking of a structure like this:

 

CREATE TABLE page

(

  page_name varchar not null,

  page_id integer not null primary key, -- This should be auto increment, i don't remember how to do that in mysql

  content varchar

);

 

CREATE TABLE choice

(

  page_id integer not null,

  choice_id integer not null,

  choice_description varchar not null -- Optional - you can store text here like "Tell me about Japan"

);

 

If (page_id, choice_id) is in the choice table, then choice_id is a valid choice from page_id.  This lets you store the structure.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.