Results 1 to 4 of 4

Thread: themes

  1. #1
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default themes

    hi, i have question about site themes.
    i have css built site which is looking black. Now i had made other style, and i want to create style choosing option in my browser.
    you want black theme? you go to options, choose black theme and that theme apllies to your account, until you change it again. is there php script for that or some other way... (sorry for my bad language). Thanks a lot

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You need to have user accounts. Or you can use PHP sessions.

    Either way, you will store a variable (in the database, in the $_SESSION data, etc.) and that variable will be something like $theme = 'black'.

    Based on that value, you can just load a different stylesheet on your page. (....stylesheet src="<?php echo $theme; ?>.css"...)

    If you want to customize the html on the page as well, that is more difficult, but you can do it the same way-- load the layout html based on the session variable. But that means a lot of coding to make the same content for different layouts.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    but how to rewrite $theme variable to my db because i have to save choosen name(black) in ppl account place. is there php command for rewriting? like updating user info in webpage. Thanks

  4. #4
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    noone knows?

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
  •