Overlay

Discussion in 'Web Design and Development' started by amtjb, Dec 13, 2014.

  1. amtjb macrumors member

    Joined:
    Jan 5, 2011
    #1
    I am in the process of making a website. I have five navigational buttons on the home page. I want to have an overlay with an image appear that states to the affect " must buy product to get access to website". When visitor clicks on any of the navigational buttons initially. Only after visitor pays for the product I am offering, will the overlay go away to give access to navigational buttons to navigate on the website. What programing language do I need to know to be able to set this procedure up? Can you suggest a book I can read to learn How to do this?
     
  2. olup macrumors 6502

    Joined:
    Oct 11, 2011
    #2
    The overlay itself is just CSS, but you need Javascript to check and activate the overlay, when the links are clicked.
     
  3. NutsNGum macrumors 68030

    NutsNGum

    Joined:
    Jul 30, 2010
    Location:
    Glasgow, Scotland
    #3
    I'd suggest blocking the links server side, as it'd be pretty easy to disable javascript and just use the links regardless.

    If you're going to do it, the easiest method is probably to use Wordpress.

    There should be a few Wordpress plugins available for something like this - probably free - if you don't have much experience building sites with PHP/.NET or have any working knowledge of javascript.

    EDIT:

    Here's an example. It doesn't deal with payment, but shows how easily it can be done using a CMS
     
  4. Jamesbot macrumors member

    Joined:
    Jun 19, 2009
    #4
    You're talking about authentication, and you'll need a way to store and compare credentials on a server to do that.

    In its simplest form, the process looks something like this:

    1. Create a user record with an email and a unique access code. This can be as simple as creating a list of key-value pairs in a flat file on your server.
    2. Provide user with access code and link to the website
    3. User visits link and authenticates with email and access code.
    4. Server looks for a matching email/access code pair
    5. Server sets a cookie with the access token and redirects to the protected content
    6. Before serving a protected page, the server checks the access code stored in the cookie and makes sure it matches the one on the server
    7. If it matches, serve the page. Otherwise, redirect to a login form with your message.

    You can actually perform all of this with apache http basic authentication and mod_rewrite, no server language necessary.

    If you need something more complex, then just pick a general purpose language that you can run on a server and learn how to build web pages with it.

    There's really no way around that if you want to do it yourself.

    Common languages used for the web are PHP, Java, Python, Ruby, C#, Javascript, and Perl. Some of these are more fashionable than others. Just pick the one you like best.
     

Share This Page