Welcome Guest, Not a member yet? Register   Sign In
database driven CSS?
#3

[eluser]Bramme[/eluser]
You can do this with a .htaccess file. You could implement the php queries in your .css file and then tell apache (through the .htaccess file) that it needs to handle the css file as php (and thus processes the queries).

I don't know the code for it, so you'll have to google that.

Of you could make a simple .htaccess redirect:
make a css.php file in your css folder that queries the db and builds the css file and then redirect using .htaccess. Adding an id to the url is easy with this:

Code:
RewriteEngine on
RewriteRule /css/styles.css?css=(.*) /css/css.php?css=$1 [L]


Messages In This Thread
database driven CSS? - by El Forum - 07-16-2008, 11:08 AM
database driven CSS? - by El Forum - 07-16-2008, 11:18 AM
database driven CSS? - by El Forum - 07-17-2008, 05:45 AM
database driven CSS? - by El Forum - 07-17-2008, 06:22 AM
database driven CSS? - by El Forum - 07-17-2008, 06:24 AM
database driven CSS? - by El Forum - 07-17-2008, 06:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB