Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: 1.5.20 statistic details  (Read 20002 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: 15764
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: 15764
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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • 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.

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • 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: 15764
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: 15764
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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • 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: 15764
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: 15764
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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • 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.035 seconds with 20 queries.