Im trying to create a class for ccs elements. somthing like
PHP Code:
<?PHP class style{ var $tag; var $id; var $class; var $attributes=array(); var $parent; }
Then when the user on my CMS sets the size of his template page to say 760px; then an instance will be created or something. Actually it had better check one doesnt exist already with same id or class or it will have to overite the exisiting instance.
__________________
You can not say you know how to do something, until you can teach it to someone else.
Last edited by timgolding; 03-10-2007 at 12:52 AM..
Whenever in the admin tool the administrator makes a change, instead of just saving to database/xml/file, you also generate a static CSS file.
This is much more efficient than having a PHP file act as a CSS file (where it has to generate the CSS for every request based on the database/xml/file), using header().
This is how some CMS systems work, instead of acting as a dynamic site, the admin tool will generate a static HTML file. It is much lighter on the server.
Ok, I got the impression that he was just going to have the code in the file(without any database queries or anything) with an if/switch to select the right one for the current user. In which case the added load on the server is really negligible.
What I inted is that the classes will directly resemble the css selectors that they represent that way when the user changes a value (for instance changes the page width to 800px) a class that has the info to point to the that attribute for css in question. That way I could make an engine that echoes the css at the end.
__________________
You can not say you know how to do something, until you can teach it to someone else.