Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: 1.5.20 statistic details  (Read 8307 times)

0 Members and 1 Guest are viewing this topic.

durangod

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
1.5.20 statistic details
« 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...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15171
Re: 1.5.20 statistic details
« Reply #1 on: May 02, 2013, 03:50:35 PM »

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

durangod

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: 1.5.20 statistic details
« Reply #2 on: May 02, 2013, 11:36:35 PM »

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

durangod

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: 1.5.20 statistic details
« Reply #3 on: May 02, 2013, 11:39:45 PM »

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

durangod

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: 1.5.20 statistic details
« Reply #4 on: May 02, 2013, 11:58:04 PM »

and this appears to be fine

in include/functions.inc.php

in the function

Code: [Select]
function cpg_determine_client()
{

for windows 7 it shows

Code: [Select]
} elseif (preg_match('#Windows NT 6\.1#i', $server_agent)) {
        $os = 'Windows 7';

windows 7 is  Windows NT 6.1  so that should match..
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15171
Re: 1.5.20 statistic details
« Reply #5 on: May 03, 2013, 09:18:30 AM »

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

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: 1.5.20 statistic details
« Reply #6 on: May 03, 2013, 11:30:33 AM »

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.

Code: [Select]
  $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

Code: [Select]
$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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: 1.5.20 statistic details
« Reply #7 on: May 03, 2013, 12:21:10 PM »

I think we also need to add for windows 8

Code: [Select]
  } 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...
Logged
It is a mistake to think you can solve any major problems just with potatoes.

durangod

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: Re: 1.5.20 statistic details
« Reply #8 on: May 03, 2013, 12:26:02 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15171
Re: 1.5.20 statistic details
« Reply #9 on: May 03, 2013, 12:43:13 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)
« Last Edit: May 03, 2013, 01:32:05 PM by Αndré »
Logged

durangod

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 42
Re: 1.5.20 statistic details
« Reply #10 on: May 03, 2013, 02:53:48 PM »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15171
Re: 1.5.20 statistic details
« Reply #11 on: May 03, 2013, 03:04:45 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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: 1.5.20 statistic details
« Reply #12 on: May 03, 2013, 03:27:56 PM »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15171
Re: 1.5.20 statistic details
« Reply #13 on: May 03, 2013, 03:52:20 PM »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15171
Re: 1.5.20 statistic details
« Reply #14 on: May 06, 2013, 05:24:26 PM »

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

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: 1.5.20 statistic details
« Reply #15 on: May 06, 2013, 06:56:50 PM »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.074 seconds with 20 queries.