Hi,
I know this is a userside (probably js and css) job but i dont have the js code for this. Is it ok to use server side php code for this purpose.
I need to show a smaller version of the image if its mobile and the css for this script is minified and uses php functions to decide the css values, i dont want to mess with all that core code stuff.
I am making some small image changes to the mantis bug tracker script. So i just added this in their config file.
//check for android
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
if(strpos($ua,'android') !== false && strpos($ua,'mobile') !== false)
{
// smaller mobile size
$g_logo_image = 'images/mobile_logo.png';
}else{
//full size web version
$g_logo_image = 'images/full_logo.png';
}
Thanks