I am about to start the module on my CMS where I create a CSS file through the control panel. The question is, should I create it and write to a file, or should I do it from a database and create a CSS file for each user using mod rewrite? Can someone give me some ideas.
I'd go with files, having a styles directory, and a field in the user table that gets called each page load anyway, and sets the appropriate path That or cookies
I should have maybe clarified more. I will be loading all the settings and styles for the CSS file from a table in a mysql database. Atlest they are all stored there.
Maybe you can use this: your style.css do you call style.php You can (re-)write you .php file (see php.net) and then you only need a .htaccess file with: RewriteEngine On RewriteRule ^style.css$ style.php
word press seems to do it by just loading the contents of the css file, throwing it into a box you can edit. When you save, it over-writes the original .css file. Seems to be the way to go.
Yeah, thats just editing. I quite like the way VBulletin does it. I think Im going ot do it that way. Does anyone know a way to check to see which classes and ids are actually used. My static CSS file has arond 200 classes, I just kept adding and not deleting.... I want to prune them all quickly by checking my whole site to see if they are in use.. any idea?
To check if the classes are in use... Try the firebug extension in firefox. Trying to code something to prune it would most likely take longer than manually looking them up with firebug.