force css reload on change

This commit is contained in:
following 2013-02-27 03:46:30 +01:00
parent f9e2dfa9fd
commit 2f54c60359
4 changed files with 11 additions and 5 deletions

View File

@ -62,7 +62,7 @@
<meta http-equiv="gallerimg" content="no" />
<meta http-equiv="cache-control" content="no-cache" />
<link rel="SHORTCUT ICON" href="favicon.ico">
<link rel="stylesheet" type="text/css" media="screen,projection" href="resource2/{style}/css/style_screen.css">
<link rel="stylesheet" type="text/css" media="screen,projection" href="resource2/{style}/css/style_screen.css?ft={screen_css_time}">
<script type="text/javascript">
<!--
<?php
@ -92,7 +92,7 @@
}
//-->
</script>
<link rel="stylesheet" type="text/css" media="print" href="resource2/{style}/css/style_print.css">
<link rel="stylesheet" type="text/css" media="print" href="resource2/{style}/css/style_print.css?ft={print_css_time}">
<script type="text/javascript" src="resource2/{style}/js/enlargeit.js"></script>
{htmlheaders}
</head>

View File

@ -432,7 +432,7 @@ function __autoload($class_name)
function tpl_BuildTemplate($dbdisconnect=true)
{
//template handling vars
global $stylepath, $tplname, $vars, $langpath, $locale, $opt, $oc_nodeid;
global $style, $stylepath, $tplname, $vars, $langpath, $locale, $opt, $oc_nodeid;
//language specific expression
global $error_pagenotexist;
//only for debbuging
@ -440,6 +440,9 @@ function __autoload($class_name)
// country dropdown
global $tpl_usercountries;
tpl_set_var('screen_css_time',filemtime($opt['rootpath'] . "resource2/" . $style . "/css/style_screen.css"));
tpl_set_var('print_css_time',filemtime($opt['rootpath'] . "resource2/" . $style . "/css/style_print.css"));
if (isset($bScriptExecution))
{
$bScriptExecution->Stop();

View File

@ -237,6 +237,9 @@ class OcSmarty extends Smarty
$this->bench->stop();
$this->assign('sys_runtime', $this->bench->diff());
$this->assign('screen_css_time',filemtime($opt['rootpath'] . "resource2/" . $opt['template']['style'] . "/css/style_screen.css"));
$this->assign('print_css_time',filemtime($opt['rootpath'] . "resource2/" . $opt['template']['style'] . "/css/style_print.css"));
// check if the template is compiled
// if not, check if translation works correct
$_smarty_compile_path = $this->_get_compile_path($this->name);

View File

@ -18,8 +18,8 @@
<meta http-equiv="gallerimg" content="no" />
<meta http-equiv="cache-control" content="no-cache" />
<link rel="SHORTCUT ICON" href="favicon.ico">
<link rel="stylesheet" type="text/css" media="screen,projection" href="resource2/{$opt.template.style}/css/style_screen.css">
<link rel="stylesheet" type="text/css" media="print" href="resource2/{$opt.template.style}/css/style_print.css">
<link rel="stylesheet" type="text/css" media="screen,projection" href="resource2/{$opt.template.style}/css/style_screen.css?ft={$screen_css_time}">
<link rel="stylesheet" type="text/css" media="print" href="resource2/{$opt.template.style}/css/style_print.css?ft={$print_css_time}">
{literal}
<script type="text/javascript">
<!--