SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    Quality not quantity. bo5ton's Avatar
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    654
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Advice needed for landing page.

    Hey Everybody, hoping someone can help with an idea I have.

    Basically I'm starting a new site soon and I'm looking to have a "Landing Page" type thing, but it won't be your typical landing page. For this I will be using Wordpress.

    Here's what I want to happen:

    User navigates to the site, an image appears where the user has to make a choice, depending on the choice, a particular wordpress theme will load. Once the choice has been made, the site will remember the user's choice and load that theme each time they return to the site (but they will also be able to choose a different theme once they're on the site)

    Here's how I think it will happen:

    User navigates to the site, whether through direct or referral.
    Check if the user has previously visited the site by using cookies (Javascript or PHP I'm not sure).
    If the user hasn't been before -> load image (through Javscript or PHP, I would like it to look like a lightbox kind of thing) -> user prompted to choose -> presses either of the images -> load site and corresponding theme choice.
    If the user has been before -> check previous theme choice through cookies -> load site and previous corresponding theme choice.

    The site will have the exact same content(posts, categories etc) except for the theme.

    I know landing pages can be annoying for some but I think this idea could work really well.

    Can anyone recommend the best way to attack this? What is the best technology to use to get the best results. Javascript or PHP(because I'm using wordpress) or something else?

    Thanks.

  2. #2
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by bo5ton View Post

    Can anyone recommend the best way to attack this? What is the best technology to use to get the best results. Javascript or PHP(because I'm using wordpress) or something else?
    Bottom line: if a functionality can be done server side, do it server side because you then don't have to worry about javascript disabled browsers. So I would use php to check for and then write/read cookies.

  3. #3
    Quality not quantity. bo5ton's Avatar
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    654
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Max Height View Post
    Bottom line: if a functionality can be done server side, do it server side because you then don't have to worry about javascript disabled browsers. So I would use php to check for and then write/read cookies.
    Excellent. I shall do that then.

    As for my idea of using a 'lightbox' type function for allowing the user to make a choice, what might one recommend for this? I'd really like it to kind of 'jump-out' at the user, make it exciting.

    Or should it be a true dedicated landing page?

    I feel that if it's a 'jump-out' thing, users would feel more involved and won't feel like they're having to wait for a page to load. (Even though they will once they've chosen an image).

  4. #4
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Personally I'm not a huge fan of "light boxes", but that's just me

    To me they make me feel like I am leaving, to some extent, the page I am on to view some other content.

    I would look at some other alternative "graphic design" ways to highlight the options for the user.

  5. #5
    Quality not quantity. bo5ton's Avatar
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    654
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Max Height View Post
    To me they make me feel like I am leaving, to some extent, the page I am on to view some other content.
    Yeah that's a good point, I'm not a huge fan either, having to click back to the page to see another image, or having to click through every image right or left.

    I guess the only thing different this time is I'd hope it to be onload of the page, so it would be the absolute first thing you see, before any other content. And would only happen once per unique visit.

  6. #6
    Quality not quantity. bo5ton's Avatar
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    654
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Max Height View Post
    So I would use php to check for and then write/read cookies.
    Having a look around, writing and reading for cookies using php's setCookie seems pretty straightforward.

    I was thinking it might be good to actually check for cookies first, using PHP (in case Javascript is turned off) - but apparently this can only happen with a page refresh.

    I then thought that if cookies aren't enabled, how can php detect it the next time the page is loaded if it can't set a cookie either (because they're turned off).

    I'd like to get these issues out of the way before I begin creating the site. I'm sure I will run into more problems later.

    Anyone else have thought regarding this?

  7. #7
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    1) If you're going to use cookies and the user has cookies disabled then it doesn't matter if you use javascript or php to handle cookies. You're going to need a Plan B whether you handle cookies with javascript or php.

    2) If you write a cookie using php, it won't be accessable until the next visit to the page. Therefore, on subsequent visits to the page use php to first check if the cookie exists and if it does then do whatever is supposed to be done according to the cookie's value.

  8. #8
    Quality not quantity. bo5ton's Avatar
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    654
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Max Height View Post
    1) If you're going to use cookies and the user has cookies disabled then it doesn't matter if you use javascript or php to handle cookies. You're going to need a Plan B whether you handle cookies with javascript or php.

    2) If you write a cookie using php, it won't be accessable until the next visit to the page. Therefore, on subsequent visits to the page use php to first check if the cookie exists and if it does then do whatever is supposed to be done according to the cookie's value.
    Excellent. Thanks for your replies Max Height. Here's how I plan to attack it:
    • Load landing page
    • Check if cookie exists using php
    • If cookie exists: check which cookie exists and then load the wordpress theme according to the choice they made on their first visit.
    • If cookie doesn't exist: assume it is the user's first visit and (maybe) load random theme.
    • Once site is loaded, offer the user a choice of which theme they want.


    What do you think? Any other opinions on the matter?

    p.s. sorry this is such a late reply, I've been away for a couple of weeks.

  9. #9
    SitePoint Member
    Join Date
    Jan 2012
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes your idea will work or search a tool which store the user ipaddress nor name, bcz may be user use another name & spamming


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •