Jump to content

Archived

This topic is now archived and is closed to further replies.

ItsWesYo

PHP Themes

Recommended Posts

I was wondering on how you would make different themes for your site.

Example: A person happens to see your site and wants to view it in a different color.

Is there a way I can do that using cookies or something?

Share this post


Link to post
Share on other sites
I have seen this done many ways, the best way is to have 2 CSS and a link
Design A / Design B
on click, you can either store in cookies
or record IP (Can be heavy on server)
or use the GET method
mywebsite.com/index.php?design=b

Share this post


Link to post
Share on other sites
You make as many CSS files as you want styles. Make a select box on your screen, user selects the style and a JavaScript program loads the CSS file to use. That is basically it. I use it for selecting font sizes fot the visually impaired users.

Ronald  ;D

Share this post


Link to post
Share on other sites
Actually I am using the FREE Style Sheet Switch v1.0 package from dynamic drive. The link to the package is

[url=http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm]http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm[/url]

It uses cookies to save the choice of the user. I have implemented it some time ago and it works fine.
If you still need help, drop me a message.

Ronald  ;D

Share this post


Link to post
Share on other sites
or you can save the choice in the database and load it on runtime too
[code]<link src="/css/design<?php echo $designNo ?>.css">[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.