Welcome Guest, Not a member yet? Register   Sign In
How to update/append the User-Agents array -
#1

[eluser]stormbytes[/eluser]
I'm on Mac OSX using Google Chrome v.6.0.xxx -

When using the user-agent helper, here are the results I get:

Code:
Browser Type: Safari

Version: 534.3

Mobile: False

Platform: Mac OS X

I read the UG and it said to update the UA array (list) in the config folder. I looked at it, but I don't know what (syntax) I should add.

Insights = much appreciated! Smile
#2

[eluser]Dennis Rasmussen[/eluser]
Is it the same bug as the first comment of http://php.net/manual/en/function.get-browser.php ?
#3

[eluser]stormbytes[/eluser]
@Dennis Rasmussen - so... I take it not much to do about that until it's fixed or the next version/update of CI?
#4

[eluser]Dennis Rasmussen[/eluser]
Could you post the content of your UA file? Use the [.code] tag (without .)
#5

[eluser]stormbytes[/eluser]
I cut out the Mobile phone entries because it made my post too large -

[code]
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| This file contains four arrays of user agent data. It is used by the
| User Agent Class to help identify browser, platform, robot, and
| mobile device data. The array keys are used to identify the device
| and the array values are used to set the actual name of the item.
|
*/

$platforms = array (
'windows nt 6.0' => 'Windows Longhorn',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.0' => 'Windows 2000',
'windows nt 5.1' => 'Windows XP',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows' => 'Unknown Windows OS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS'
);


// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse'
);
#6

[eluser]Dennis Rasmussen[/eluser]
Code:
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
              ‘Chrome’          => ‘Chrome’,
              ‘Opera’          => ‘Opera’,
              ‘MSIE’          => ‘Internet Explorer’,
              ‘Internet Explorer’  => ‘Internet Explorer’,
              ‘Shiira’        => ‘Shiira’,
              ‘Firefox’        => ‘Firefox’,
              ‘Chimera’        => ‘Chimera’,
              ‘Phoenix’        => ‘Phoenix’,
              ‘Firebird’        => ‘Firebird’,
              ‘Camino’        => ‘Camino’,
              ‘Netscape’        => ‘Netscape’,
              ‘OmniWeb’        => ‘OmniWeb’,
              ‘Safari’        => ‘Safari’,
              ‘Mozilla’        => ‘Mozilla’,
              ‘Konqueror’        => ‘Konqueror’,
              ‘icab’          => ‘iCab’,
              ‘Lynx’          => ‘Lynx’,
              ‘Links’          => ‘Links’,
              ‘hotjava’        => ‘HotJava’,
              ‘amaya’          => ‘Amaya’,
              ‘IBrowse’        => ‘IBrowse’
          );

There you go Smile
#7

[eluser]stormbytes[/eluser]
[quote author="Dennis Rasmussen" date="1286109026"]
Code:
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
              ‘Chrome’          => ‘Chrome’,
              ‘Opera’          => ‘Opera’,
              ‘MSIE’          => ‘Internet Explorer’,
              ‘Internet Explorer’  => ‘Internet Explorer’,
              ‘Shiira’        => ‘Shiira’,
              ‘Firefox’        => ‘Firefox’,
              ‘Chimera’        => ‘Chimera’,
              ‘Phoenix’        => ‘Phoenix’,
              ‘Firebird’        => ‘Firebird’,
              ‘Camino’        => ‘Camino’,
              ‘Netscape’        => ‘Netscape’,
              ‘OmniWeb’        => ‘OmniWeb’,
              ‘Safari’        => ‘Safari’,
              ‘Mozilla’        => ‘Mozilla’,
              ‘Konqueror’        => ‘Konqueror’,
              ‘icab’          => ‘iCab’,
              ‘Lynx’          => ‘Lynx’,
              ‘Links’          => ‘Links’,
              ‘hotjava’        => ‘HotJava’,
              ‘amaya’          => ‘Amaya’,
              ‘IBrowse’        => ‘IBrowse’
          );

There you go Smile[/quote]

Woah!!! Coolness....

I'm inviting you over for some of my organic, veggie, Lasagna! Smile
#8

[eluser]Dennis Rasmussen[/eluser]
You're welcome.
And that sounds great.




Theme © iAndrew 2016 - Forum software by © MyBB