1.5.20 statistic details 1.5.20 statistic details
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

1.5.20 statistic details

Started by durangod, May 01, 2013, 06:20:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

durangod

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...

Αndré

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.

durangod

Well it does appear so far that they intended to have the values, they are in the arrays in the include/stats.inc.php   

durangod

correction, win 7 is listed but i guess ie9 and ie10 are just covered under the generic ie array element

durangod

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..

Αndré

Quote from: durangod on May 01, 2013, 06:20:51 PM
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.

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

phill104

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...
It is a mistake to think you can solve any major problems just with potatoes.

durangod

Quote from: Phill Luckhurst on May 03, 2013, 12:21:10 PM
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

Αndré

#9
Quote from: durangod on May 01, 2013, 06:20:51 PM
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)

durangod

Wont the windows icons just default to a standard windows icon if one is not assigned?

Αndré

Quote from: durangod on May 03, 2013, 02:53:48 PM
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.

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

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

Αndré

Added support for Internet Explorer 9 & 10 in SVN revision 8566. I haven't added new icons, but used the IE8 icon.

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.