forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: durangod on May 01, 2013, 06:20:51 pm
-
Hi i was looking at my stats and i noticed that win7 (32/64), and win8 are not listed in the OS portion as well as IE9 or IE10, chrome, and opera not listed in the browser portion. Is this something that will be released on the next update or is this something we add ourselves thru admin panel.
Thanks...
-
As far as I know nobody added support for those operating systems and browsers (yet). I assume you have to edit the code if you want to support them.
-
Well it does appear so far that they intended to have the values, they are in the arrays in the include/stats.inc.php
-
correction, win 7 is listed but i guess ie9 and ie10 are just covered under the generic ie array element
-
and this appears to be fine
in include/functions.inc.php
in the function
function cpg_determine_client()
{
for windows 7 it shows
} elseif (preg_match('#Windows NT 6\.1#i', $server_agent)) {
$os = 'Windows 7';
windows 7 is Windows NT 6.1 so that should match..
-
i noticed that win7 (32/64), and win8 are not listed in the OS portion as well as IE9 or IE10, chrome, and opera not listed in the browser portion
As I don't use detailed statistics in my galleries, I don't have data to test. What exactly is displayed for those versions of Windows and browsers? A screenshot might also help.
-
We simply need to adjust the code below. I think we should drop recognition of the older IE versions (3, 4, 5 and 5.5) and add IE9 and 10.
$browser = 'Unknown';
if (preg_match('#MSIE#i', $server_agent)) {
if (preg_match('#MSIE 8\.0#i', $server_agent)) {
$browser = 'IE8';
} elseif (preg_match('#MSIE 7\.0#i', $server_agent)) {
$browser = 'IE7';
} elseif (preg_match('#MSIE 6\.0#i', $server_agent)) {
$browser = 'IE6';
} elseif (preg_match('#MSIE 5\.5#i', $server_agent)) {
$browser = 'IE5.5';
} elseif (preg_match('#MSIE 5\.0#i', $server_agent)) {
$browser = 'IE5.0';
} elseif (preg_match('#MSIE 4\.0#i', $server_agent)) {
$browser = 'IE4';
} elseif (preg_match('#MSIE 3\.0#i', $server_agent)) {
$browser = 'IE3';
} else {
$browser = 'IE';
}
So instead if we have
$browser = 'Unknown';
if (preg_match('#MSIE#i', $server_agent)) {
if (preg_match('#MSIE 10\.0#i', $server_agent)) {
$browser = 'IE10';
} elseif (preg_match('#MSIE 9\.0#i', $server_agent)) {
$browser = 'IE9';
} elseif (preg_match('#MSIE 8\.0#i', $server_agent)) {
$browser = 'IE8';
} elseif (preg_match('#MSIE 7\.0#i', $server_agent)) {
$browser = 'IE7';
} elseif (preg_match('#MSIE 6\.0#i', $server_agent)) {
$browser = 'IE6';
} else {
$browser = 'IE';
}
Seems to work for me.
-
I think we also need to add for windows 8
} elseif (preg_match('#Windows NT 6\.2#i', $server_agent)) {
$os = 'Windows 8';
Fortunately we don't detect FF versions or we would be changing the code hourly...
-
Fortunately we don't detect FF versions or we would be changing the code hourly...
LMAO OMG soooo true... very funny :)
Thanks for the help all... great job
-
i noticed that win7 (32/64) [is] not listed in the OS portion
As you already said it's listed in the function. I just faked my user agent and the Coppermine stats also logged me as Windows 7 user. So we just need to add Windows 8 and the newer versions of IE.
Edit: we also need corresponding icons (either download them somewhere or create them ourselves)
-
Wont the windows icons just default to a standard windows icon if one is not assigned?
-
Wont the windows icons just default to a standard windows icon if one is not assigned?
No. Instead, the string "Windows 8" will be displayed.
However, I just added Windows 8 support to statistic details page in SVN revision 8565. Will add support for the newer Internet Explorer versions later. Or do we want to drop the browser version for IE? As far as I can see we don't store it for any other browser.
-
People seem to like the IE versions. I know a lot of web devs use it to decide whether to continue supporting a particular version or not.
-
Fine by me. As I never use IE, I'll have to find out how each version's icon looks like before I can search icons we can use :D
-
Added support for Internet Explorer 9 & 10 in SVN revision 8566. I haven't added new icons, but used the IE8 icon.
-
Excellent job Andre. I did find the official icons but they are on a limited licence so am happy to stick with the current one you have used.