[horde] broken css on Netscape 4x and 7x
François Helly
francois.helly at wanadoo.fr
Fri Jan 31 06:48:39 PST 2003
>Hi
>
>Using Horde 3.0 cvs
>Upgrading from cvs tonight (last upgrade 01/06/2003)
>the css file seems not to be loaded properly by Netscape 7x Mac
>Netscape 4x Mac, Mozilla (mdk9), Galeon (mdk9)
>Only browse texts under white background`
>
>Is there sthg to do to fix it?
>
>I tried to switch the $conf['css']['cached'] : no changes
>
>thks
>
seems some had same pb
Here is a proposal to fix this pb
First, set the default_charset to "" in the php.ini
Second :
it seems some browser not to be abble to decode the css file loaded
from the horde css.php script,
if the charset isn't send in the http header field "content-type".
So I tried changes in the css.php script
if (@file_exists(HORDE_BASE . '/config/nls.php')) {
require HORDE_BASE . '/config/nls.php';
$charset = $nls['defaults']['charset'];
} elseif (@file_exists(HORDE_BASE . '/config/nls.php.dist')) {
require HORDE_BASE . '/config/nls.php.dist';
$charset = $nls['defaults']['charset'];
} else {
$charset = ini_get('default_charset');
if (empty($charset)) {
/* I don't really know if there's always unicode in the
accept-charset field of all browser.
* But the charset has to be send or the css file can't be
decode by any browser
*/
$charset = 'utf-8';
}
}
if ($send_headers) {
if ($conf['css']['cached']) {
$mod_gmt = gmdate('D, d M Y H:i:s', $mtime) . ' GMT';
header('Last-Modified: ' . $mod_gmt);
header('Cache-Control: public, max-age=86400');
} else {
header('Expires: -1');
header('Pragma: no-cache');
header('Cache-Control: no-store, no-cache, must-revalidate,
post-check=0, pre-check=0');
}
// header('Content-Type: text/css;);
header('Content-Type: text/css;charset='. $charset);
}
And know I have a world in brightly colors
PS: I can't evaluate if these changes are really pertinent for
horde's core developer,
don't be too hard if they aren't _ Thks a lot
--
------------------------
françois helly
designer
17, rue de Nuits
69004 LYON - France
tél./fax 33 [0]4 78 28 73 30
portable 06 16 17 78 84
e-mail: francois.helly at wanadoo.fr
------------------------
More information about the horde
mailing list