www.webdeveloper.com
Results 1 to 9 of 9

Thread: I was wondering if theres a script like this..

  1. #1
    Join Date
    Dec 2008
    Posts
    4

    I was wondering if theres a script like this..

    Well, I just got a website running..
    and uhm, I have several templates I like to use..

    What I am trying to do is this: I upload few website templates, and display a dropdown menu where users can pick which template to choose from. (like vBulletin forum style picker)

    I can do the above, BUT see, the above is very simple...all you got to do is link the template folder...but what I need is if there was a code that saves the user selection template, and saves them to there cookies, so whenever they visit my website, the one they chosed template will be there default one unless they change it, or delete there cookies

    It's like the vBulletin style selector, but instead of saving the style default to there user account the the vBulletin site, I want it to save it on the person's cookie..

  2. #2
    Join Date
    Dec 2008
    Posts
    4

    I was wondering if theres a script like this..

    Well, I just got a website running..
    and uhm, I have several templates I like to use..

    What I am trying to do is this: I upload few website templates, and display a dropdown menu where users can pick which template to choose from. (like vBulletin forum style picker)

    I can do the above, BUT see, the above is very simple...all you got to do is link the template folder...but what I need is if there was a code that saves the user selection template, and saves them to there cookies, so whenever they visit my website, the one they chosed template will be there default one unless they change it, or delete there cookies

    It's like the vBulletin style selector, but instead of saving the style default to there user account the the vBulletin site, I want it to save it on the person's cookie..

  3. #3
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    You need to do some server-side scripting/programming. What server-side scripting language(s) do you have available?

  4. #4
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,278
    If your styles and templates are all defined by CSS, as they should be, then this a perfect job for JavaScript. I've been banned by Webdeveloper.com and forbidden to help people with JavaScript so hie yourself to that forum. Somebody will come along soon to help you.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  5. #5
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    setcookie("UserTemplate", $userSelection);

    echo ($_COOKIE["UserTemplate");
    54 68 65 42 65 61 72 4D 61 79

  6. #6
    Join Date
    Dec 2008
    Posts
    4
    Quote Originally Posted by TheBearMay View Post
    setcookie("UserTemplate", $userSelection);

    echo ($_COOKIE["UserTemplate");

    Ok, um, where do I put that, and how do I define it?

    Can u please be more specific?
    I'm no expert....lol

  7. #7
    Join Date
    Jan 2007
    Location
    Wisconsin
    Posts
    2,120
    If your styles and templates are all defined by CSS, as they should be, then this a perfect job for JavaScript.
    Oh yeah ... I guess you don't need a server-side scripting language. Though, I would still recommend doing this server-side.

    I've been banned by Webdeveloper.com and forbidden to help people with JavaScript so hie yourself to that forum.
    Why were you banned/forbidden?

  8. #8
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Quote Originally Posted by Gamerz View Post
    Ok, um, where do I put that, and how do I define it?

    Can u please be more specific?
    I'm no expert....lol
    Since you posted in the PHP section, I gave you PHP.
    The first line will create the cookie, the second will display it (although I'd expect that using the value to set the style sheet would be more useful).
    54 68 65 42 65 61 72 4D 61 79

  9. #9
    Join Date
    Dec 2008
    Posts
    4
    Quote Originally Posted by TheBearMay View Post
    Since you posted in the PHP section, I gave you PHP.
    The first line will create the cookie, the second will display it (although I'd expect that using the value to set the style sheet would be more useful).
    Can you go on AIM?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles