Hello Tom again,
i want to achieve the chrome browser to take a different css file than the others. I know, normaly there are just if-conditionals for IE (maybe i’m wrong), but i found a php script which also lists chrome for some conditions:
[PHP]<?php
function get_user_browser()
{
$u_agent = $_SERVER[‘HTTP_USER_AGENT’];
$ub = ”;
if(preg_match(‘/MSIE/i’,$u_agent))
{
$ub = “ie”;
}
elseif(preg_match(‘/Firefox/i’,$u_agent))
{
$ub = “firefox”;
}
elseif(preg_match(‘/Safari/i’,$u_agent))
{
$ub = “safari”;
}
elseif(preg_match(‘/Chrome/i’,$u_agent))
{
$ub = “chrome”;
}
elseif(preg_match(‘/Flock/i’,$u_agent))
{
$ub = “flock”;
}
elseif(preg_match(‘/Opera/i’,$u_agent))
{
$ub = “opera”;
}
return $ub;
}
?>[/PHP]
Or is there a different way already implemented in the framework, especially the new “magic” one, to achive that?
For this special script i tried to copy into index.php but i earned just a white screen.
best regards
Markus