1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

entry page? not sure what it would be called

Discussion in 'General Scripting Chat' started by bluecrab, Jun 24, 2010.

  1. bluecrab

    bluecrab Junior Member

    Joined:
    Jul 29, 2009
    Messages:
    132
    Likes Received:
    201
    Need a little help im making a adult site with wordpress and wp is installed in the main dir.
    The main wp file is index.php. What i need to do is have a agree disagree page which covers the index.php until they click the agree button.

    I don't know what would be needed a script some kind of layered pop up which cant be blocked?
    I have seen where the page is greyed out almost in a dark transparent way until you click the agree button on some sites but i don't know what it would be called.
    Can some one help me figure this out?
     
  2. bluecrab

    bluecrab Junior Member

    Joined:
    Jul 29, 2009
    Messages:
    132
    Likes Received:
    201
    "bump"
     
  3. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
    I would check to see if the "agree" session has been set in index.php and if it hasn't redirect your users to site.com/agree.html. Then in agree.html when you're users click agree send them to agree.php and set the "agree" session.

    Not sure if that makes any sense so here some code to help:

    For index.php (place right after opening <?php):
    PHP:
    session_start();
    $agree $_SESSION['agree'];
    if(
    $agree != 'yes'){ header('Location: http://yoursite.com/agree.html'); }
    For agree.php:
    PHP:
    <?php
    session_start
    ();
    $_SESSION['agree'] = 'yes';
    header('Location: http://yoursite.com');
    ?>
     
  4. jbtalk2me

    jbtalk2me Registered Member

    Joined:
    Jan 9, 2009
    Messages:
    54
    Likes Received:
    479
    The first thing you need to do is create a page (static page) in wordpress and make it your default page.

    Then add a button for agree / disagree. Use the PHP code above to set the session variable agree and redirect to the appropriate page. The real test would be age verification. If your putting free content (pics) out there CYA on the kids getting to them. Strong warnings and solid terms of use will suffice.