beachboy82 2007-11-02 16:36
Hi, I hope you can help me, I tried to solve this problem for days, but without any success! My website changes its colors by daytime, at night the text is white and at day its green. This is done by this php-script: <link rel=stylesheet type="text/css" href="<?php if (date("H") <= 8) { echo "style_night.css"; } elseif (date("H") <= 19) { echo "style_day.css"; } else { echo "style_night.css"; } ?>"> I want to have also 2 styleseehts in my shop, 1 for daytime and 1 for nighttime, but I can't run this script in the page.tpl file because it doesn't parse php-scripts. Can you tell me how I can integrate this script into my shop, so I can have 1 stylesheet for the day and 1 stylesheets for the night? Thx a lot!
» Quick.Cart v2.x merci 2007-11-05 08:57
beachboy82 - open file index.php and after code:
ob_start ( 'changeCharset' );
add the following:
if( date ( "H" ) <= 8 ){ $config [ 'template' ] = 'style_night.css' ; } elseif( date ( "H" ) <= 19 ){ $config [ 'template' ] = 'style_day.css' ; } else{ $config [ 'template' ] = 'style_night.css' ; }
check if you have in template/page.tpl around 26 line following code (if you don't have, add it)
< style type = "text/css" >@ import "$config[dir_tpl]$config[template]" ;</ style >