Plugin Directory

Changeset 1415915


Ignore:
Timestamp:
05/12/2016 08:50:00 PM (10 years ago)
Author:
kyleabaker
Message:

v1.0.12

  • Added option to adjust how version numbers are shown: Full (previous appearance, ex. 'Opera 10.52'), Simple (ex. 'Opera 10'), off (ex. 'Opera')
  • Cleaned up web browser version parsing (simplified pretty dramatically)
  • Cleaned up os/device version parsing and architecture parsing (x64)
Location:
wp-useragent
Files:
12 added
5 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • wp-useragent/trunk/readme.txt

    r1415001 r1415915  
    8484
    8585== Changelog ==
     86
     87= v1.0.12 =
     88* Added option to adjust how version numbers are shown: Full (previous appearance, ex. 'Opera 10.52'), Simple (ex. 'Opera 10'), off (ex. 'Opera')
     89* Cleaned up web browser version parsing (simplified pretty dramatically)
     90* Cleaned up os/device version parsing and architecture parsing (x64)
     91
    8692
    8793= v1.0.11 =
     
    662668== Upgrade Notice ==
    663669
     670= v1.0.12 =
     671* Added option to adjust how version numbers are shown: Full (previous appearance, ex. 'Opera 10.52'), Simple (ex. 'Opera 10'), off (ex. 'Opera')
     672* Cleaned up web browser version parsing (simplified pretty dramatically)
     673* Cleaned up os/device version parsing and architecture parsing (x64)
     674
     675
    664676= v1.0.11 =
    665677* Added text domain to enable user contributed language translations (popular request: all options and text for this plugin should now be translatable)!
     
    669681* Added frequently asked questions/answers to readme
    670682* Added screenshot assets
    671 
    672 
    673 = v1.0.10 =
    674 * Fix issue with custom output layout ([Support Forum](https://wordpress.org/support/topic/new-div-and-custom-output))
    675 * Updated Windows icons with higher resolution and more accurate replacements
    676 
    677 
    678 = v1.0.9 =
    679 * Fix Windows Phone 8.1 detection ([Support Forum](https://wordpress.org/support/topic/windows-phone-81-is-being-detected-as-iphone-ios-703?replies=1))
    680 * Fixed Compatibility for the wpDiscuz plugin - WordPress Comments ([Support Thread](https://wordpress.org/support/topic/compatibility-for-the-wpdiscuz-plugin-wordpress-comments?replies=1))
    681 * WP-UserAgent output is now wrapped by a div with classname "wp-useragent". This should make it much easier for those of you wishing to apply your own CSS to adjust the appearance on your site.
    682 * Improved settings page with cleaner layout and improved comment preview section.
    683 * Simplified some option descriptions.
    684 * Reset default options button now available.
    685 * Quick links at the top of the page for Plugin Homepage, Support, Changelog and Donate.
    686 * Removed get_currentuserinfo() call which was deprecated in Wordpress 4.5+
    687 * Refactored codebase to simplify maintaince of this plugin, general cleanup and reduced duplicate code.
    688 * DEPRECATED custom output function 'useragent_output_custom()'. Please use 'wpua_custom_output()' instead.
    689 * Added extra layer of security for escaping user input
    690 * Updated database schema and migrate settings automatically
    691 * Updated plugin options to disable autoloading (removes unnecessary memory usage)
    692 * Added database cleanup on uninstall
  • wp-useragent/trunk/uninstall.php

    r1414133 r1415915  
    3131delete_option('wpua_text_on');
    3232delete_option('wpua_text_via');
     33delete_option('wpua_show_version');
    3334delete_option('wpua_text_links');
    3435delete_option('wpua_show_full_ua');
     
    4647delete_site_option('wpua_text_on');
    4748delete_site_option('wpua_text_via');
     49delete_site_option('wpua_show_version');
    4850delete_site_option('wpua_text_links');
    4951delete_site_option('wpua_show_full_ua');
  • wp-useragent/trunk/wp-useragent-detect-device.php

    r1414133 r1415915  
    2323function wpua_detect_device()
    2424{
    25     global $useragent;
     25    global $useragent, $wpua_show_version;
     26
     27    $version = null;
    2628
    2729    // Apple
     
    3335        if (preg_match('/CPU\ OS\ ([._0-9a-zA-Z]+)/i', $useragent, $regmatch))
    3436        {
    35             $title .= ' iOS '.str_replace('_', '.', $regmatch[1]);
     37            $version = 'iOS '.str_replace('_', '.', $regmatch[1]);
    3638        }
    3739
     
    4547        if (preg_match('/iPhone\ OS\ ([._0-9a-zA-Z]+)/i', $useragent, $regmatch))
    4648        {
    47             $title .= ' iOS '.str_replace('_', '.', $regmatch[1]);
     49            $version = 'iOS '.str_replace('_', '.', $regmatch[1]);
    4850        }
    4951
     
    5759        if (preg_match('/iPhone\ OS\ ([._0-9a-zA-Z]+)/i', $useragent, $regmatch))
    5860        {
    59             $title .= ' iOS '.str_replace('_', '.', $regmatch[1]);
     61            $version = 'iOS '.str_replace('_', '.', $regmatch[1]);
    6062        }
    6163
     
    7173        if (preg_match('/[^M]SIE-([.0-9a-zA-Z]+)\//i', $useragent, $regmatch))
    7274        {
    73             $title .= ' '.$regmatch[1];
     75            $version = $regmatch[1];
    7476        }
    7577
     
    8587        if (preg_match('/blackberry([.0-9a-zA-Z]+)\//i', $useragent, $regmatch))
    8688        {
    87             $title .= ' '.$regmatch[1];
     89            $version = $regmatch[1];
    8890        }
    8991
     
    187189        elseif (preg_match('/HTC[\ |_|-]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    188190        {
    189             $title .= ' '.$regmatch[1];
     191            $title .= ' '.$regmatch[1]; // Matche other HTC product names (possibly versions?)
    190192        }
    191193        elseif (preg_match('/HTC([._0-9a-zA-Z]+)/i', $useragent, $regmatch))
     
    205207        if (preg_match('/Kindle\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    206208        {
    207             $title .= ' '.$regmatch[1];
     209            $version = $regmatch[1];
    208210        }
    209211
     
    219221        if (preg_match('/LG[E]?[\ |-|\/]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    220222        {
    221             $title .= ' '.$regmatch[1];
     223            $version = $regmatch[1];
    222224        }
    223225
     
    231233    {
    232234        $link = 'http://www.microsoft.com/windowsphone/';
    233         $title = 'Windows Phone 7';
     235        $title = 'Windows Phone';
     236        $version = '7';
    234237        $code = 'wp7';
    235238    }
     
    239242    {
    240243        $link = 'http://www.microsoft.com/windowsphone/';
    241         $title = 'Windows Phone 8.1';
     244        $title = 'Windows Phone';
     245        $version = '8.1';
    242246        $code = 'wp7';
    243247    }
     
    247251    {
    248252        $link = 'http://www.microsoft.com/windowsphone/';
    249         $title = 'Windows Phone 8';
     253        $title = 'Windows Phone';
     254        $version = '8';
    250255        $code = 'wp7';
    251256    }
     
    254259    {
    255260        $link = 'http://www.microsoft.com/windowsphone/';
    256         $title = 'Windows Phone 10';
     261        $title = 'Windows Phone';
     262        $version = '10';
    257263        $code = 'wp10';
    258264    }
     
    298304        if (preg_match('/MOTO([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    299305        {
    300             $title .= ' '.$regmatch[1];
     306            $version = $regmatch[1];
    301307        }
    302308        if (preg_match('/MOT-([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    303309        {
    304             $title .= ' '.$regmatch[1];
     310            $version = $regmatch[1];
    305311        }
    306312
     
    363369        $title = 'Nokia';
    364370        if (preg_match('/Nokia(E|N)?([0-9]+)/i', $useragent, $regmatch))
    365             $title .= ' '.$regmatch[1].$regmatch[2];
     371            $title .= ' '.$regmatch[1].$regmatch[2]; // Model name
    366372        $code = 'nokia';
    367373    }
     
    470476    {
    471477        $link = 'http://en.wikipedia.org/wiki/SonyEricsson';
    472         $title = 'SonyEricsson';
     478        $title = 'Sony Ericsson';
    473479
    474480        if (preg_match('/SonyEricsson([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
     
    515521    }
    516522
     523    // Append version to title (as long as show version isn't 'off')
     524    if (isset($version) && $wpua_show_version !== 'false')
     525    {
     526        $title .= " $version";
     527    }
     528
    517529    return wpua_get_icon_text($link, $title, $code, '/device/');
    518530}
  • wp-useragent/trunk/wp-useragent-detect-os.php

    r1414133 r1415915  
    2323function wpua_detect_os()
    2424{
    25     global $useragent;
     25    global $useragent, $wpua_show_version;
     26
     27    $version = null;
    2628
    2729    if (preg_match('/AmigaOS/i', $useragent))
     
    3234        if (preg_match('/AmigaOS\ ([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    3335        {
    34             $title .= ' '.$regmatch[1];
     36            $version = $regmatch[1];
    3537        }
    3638
    3739        $code = 'amigaos';
    38 
    39         if (preg_match('/x86_64/i', $useragent))
    40         {
    41             $title .= ' x64';
    42         }
    4340    }
    4441    elseif (preg_match('/Android/i', $useragent))
     
    5148        {
    5249            $version = $regmatch[1];
    53             $title .= ' '.$version;
    54         }
    55 
    56         if (preg_match('/x86_64/i', $useragent))
    57         {
    58             $title .= ' x64';
    5950        }
    6051    }
     
    6455        $title = 'Arch Linux';
    6556        $code = 'archlinux';
    66 
    67         if (preg_match('/x86_64/i', $useragent))
    68         {
    69             $title .= ' x64';
    70         }
    7157    }
    7258    elseif (preg_match('/BeOS/i', $useragent))
     
    7561        $title = 'BeOS';
    7662        $code = 'beos';
    77 
    78         if (preg_match('/x86_64/i', $useragent))
    79         {
    80             $title .= ' x64';
    81         }
    8263    }
    8364    elseif (preg_match('/CentOS/i', $useragent))
     
    8869        if (preg_match('/.el([.0-9a-zA-Z]+).centos/i', $useragent, $regmatch))
    8970        {
    90             $title .= ' '.$regmatch[1];
     71            $version = $regmatch[1];
    9172        }
    9273
    9374        $code = 'centos';
    94 
    95         if (preg_match('/x86_64/i', $useragent))
    96         {
    97             $title .= ' x64';
    98         }
    9975    }
    10076    elseif (preg_match('/Chakra/i', $useragent))
     
    10379        $title = 'Chakra Linux';
    10480        $code = 'chakra';
    105 
    106         if (preg_match('/x86_64/i', $useragent))
    107         {
    108             $title .= ' x64';
    109         }
    11081    }
    11182    elseif (preg_match('/CrOS/i', $useragent))
     
    11485        $title = 'Google Chrome OS';
    11586        $code = 'chromeos';
    116 
    117         if (preg_match('/x86_64/i', $useragent))
    118         {
    119             $title .= ' x64';
    120         }
    12187    }
    12288    elseif (preg_match('/Crunchbang/i', $useragent))
     
    12591        $title = 'Crunchbang';
    12692        $code = 'crunchbang';
    127 
    128         if (preg_match('/x86_64/i', $useragent))
    129         {
    130             $title .= ' x64';
    131         }
    13293    }
    13394    elseif (preg_match('/Debian/i', $useragent))
     
    13697        $title = 'Debian GNU/Linux';
    13798        $code = 'debian';
    138 
    139         if (preg_match('/x86_64/i', $useragent))
    140         {
    141             $title .= ' x64';
    142         }
    14399    }
    144100    elseif (preg_match('/DragonFly/i', $useragent))
     
    147103        $title = 'DragonFly BSD';
    148104        $code = 'dragonflybsd';
    149 
    150         if (preg_match('/x86_64/i', $useragent))
    151         {
    152             $title .= ' x64';
    153         }
    154105    }
    155106    elseif (preg_match('/Edubuntu/i', $useragent))
     
    160111        if (preg_match('/Edubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    161112        {
    162             $version .= ' '.$regmatch[1];
     113            $version = $regmatch[1];
    163114        }
    164115
     
    170121        {
    171122            $code = 'edubuntu-2';
    172         }
    173 
    174         if (strlen($version) > 1)
    175         {
    176             $title .= $version;
    177         }
    178 
    179         if (preg_match('/x86_64/i', $useragent))
    180         {
    181             $title .= ' x64';
    182123        }
    183124    }
     
    189130        if (preg_match('/.fc([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    190131        {
    191             $title .= ' '.$regmatch[1];
     132            $version = $regmatch[1];
    192133        }
    193134
    194135        $code = 'fedora';
    195 
    196         if (preg_match('/x86_64/i', $useragent))
    197         {
    198             $title .= ' x64';
    199         }
    200136    }
    201137    elseif (preg_match('/Foresight\ Linux/i', $useragent))
     
    206142        if (preg_match('/Foresight\ Linux\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    207143        {
    208             $title .= ' '.$regmatch[1];
     144            $version = $regmatch[1];
    209145        }
    210146
    211147        $code = 'foresight';
    212 
    213         if (preg_match('/x86_64/i', $useragent))
    214         {
    215             $title .= ' x64';
    216         }
    217148    }
    218149    elseif (preg_match('/FreeBSD/i', $useragent))
     
    221152        $title = 'FreeBSD';
    222153        $code = 'freebsd';
    223 
    224         if (preg_match('/x86_64/i', $useragent))
    225         {
    226             $title .= ' x64';
    227         }
    228154    }
    229155    elseif (preg_match('/Gentoo/i', $useragent))
     
    232158        $title = 'Gentoo';
    233159        $code = 'gentoo';
    234 
    235         if (preg_match('/x86_64/i', $useragent))
    236         {
    237             $title .= ' x64';
    238         }
    239160    }
    240161    elseif (preg_match('/Inferno/i', $useragent))
     
    243164        $title = 'Inferno';
    244165        $code = 'inferno';
    245 
    246         if (preg_match('/x86_64/i', $useragent))
    247         {
    248             $title .= ' x64';
    249         }
    250166    }
    251167    elseif (preg_match('/IRIX/i', $useragent))
     
    256172        if (preg_match('/IRIX(64)?\ ([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    257173        {
    258             if ($regmatch[1])
    259             {
    260                 $title .= ' x'.$regmatch[1];
    261             }
    262174            if ($regmatch[2])
    263175            {
    264                 $title .= ' '.$regmatch[2];
     176                $version = $regmatch[2];
    265177            }
     178            if ($regmatch[1] && $wpua_show_version === 'full')
     179            {
     180                // Non-standard 64-bit detection
     181                // If version isn't null append 64 bit, otherwise set it to x64
     182                $version = (is_null($version)) ? 'x64' : "$version x64";
     183            }
    266184        }
    267185
    268186        $code = 'irix';
    269 
    270         if (preg_match('/x86_64/i', $useragent))
    271         {
    272             $title .= ' x64';
    273         }
    274187    }
    275188    elseif (preg_match('/Kanotix/i', $useragent))
     
    278191        $title = 'Kanotix';
    279192        $code = 'kanotix';
    280 
    281         if (preg_match('/x86_64/i', $useragent))
    282         {
    283             $title .= ' x64';
    284         }
    285193    }
    286194    elseif (preg_match('/Knoppix/i', $useragent))
     
    289197        $title = 'Knoppix';
    290198        $code = 'knoppix';
    291 
    292         if (preg_match('/x86_64/i', $useragent))
    293         {
    294             $title .= ' x64';
    295         }
    296199    }
    297200    elseif (preg_match('/Kubuntu/i', $useragent))
     
    302205        if (preg_match('/Kubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    303206        {
    304             $version .= ' '.$regmatch[1];
     207            $version = $regmatch[1];
    305208        }
    306209
     
    312215        {
    313216            $code = 'kubuntu-2';
    314         }
    315 
    316         if (strlen($version) > 1)
    317         {
    318             $title .= $version;
    319         }
    320 
    321         if (preg_match('/x86_64/i', $useragent))
    322         {
    323             $title .= ' x64';
    324217        }
    325218    }
     
    329222        $title = 'LindowsOS';
    330223        $code = 'lindowsos';
    331 
    332         if (preg_match('/x86_64/i', $useragent))
    333         {
    334             $title .= ' x64';
    335         }
    336224    }
    337225    elseif (preg_match('/Linspire/i', $useragent))
     
    340228        $title = 'Linspire';
    341229        $code = 'lindowsos';
    342 
    343         if (preg_match('/x86_64/i', $useragent))
    344         {
    345             $title .= ' x64';
    346         }
    347230    }
    348231    elseif (preg_match('/Linux\ Mint/i', $useragent))
     
    353236        if (preg_match('/Linux\ Mint\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    354237        {
    355             $title .= ' '.$regmatch[1];
     238            $version = $regmatch[1];
    356239        }
    357240
    358241        $code = 'linuxmint';
    359 
    360         if (preg_match('/x86_64/i', $useragent))
    361         {
    362             $title .= ' x64';
    363         }
    364242    }
    365243    elseif (preg_match('/Lubuntu/i', $useragent))
     
    370248        if (preg_match('/Lubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    371249        {
    372             $version .= ' '.$regmatch[1];
     250            $version = $regmatch[1];
    373251        }
    374252
     
    380258        {
    381259            $code = 'lubuntu-2';
    382         }
    383 
    384         if (strlen($version) > 1)
    385         {
    386             $title .= $version;
    387         }
    388 
    389         if (preg_match('/x86_64/i', $useragent))
    390         {
    391             $title .= ' x64';
    392260        }
    393261    }
     
    395263        || preg_match('/Darwin/i', $useragent))
    396264    {
     265        $title = 'Mac';
    397266        $link = 'http://www.apple.com/macosx/';
    398267
    399         if (preg_match('/Mac OS X/i', $useragent))
    400         {
    401             $title = substr($useragent, strpos(strtolower($useragent), strtolower('Mac OS X')));
    402             $title = substr($title, 0, strpos($title, ')'));
    403 
    404             if (strpos($title, ';'))
     268        if (preg_match('/Mac OS X/i', $useragent)
     269            || preg_match('/Mac OSX/i', $useragent))
     270        {
     271            if (preg_match('/Mac OS X/i', $useragent))
    405272            {
    406                 $title = substr($title, 0, strpos($title, ';'));
     273                $version = substr($useragent, strpos(strtolower($useragent), strtolower('OS X'))+4);
     274                $code = 'mac-3';
    407275            }
    408 
    409             $title = str_replace('_', '.', $title);
    410             $code = 'mac-3';
    411         }
    412         elseif (preg_match('/Mac OSX/i', $useragent))
    413         {
    414             $title = substr($useragent, strpos(strtolower($useragent), strtolower('Mac OS X')));
    415             $title = substr($title, 0, strpos($title, ')'));
    416 
    417             if (strpos($title, ';'))
     276            else
    418277            {
    419                 $title = substr($title, 0, strpos($title, ';'));
     278                $version = substr($useragent, strpos(strtolower($useragent), strtolower('OSX'))+3);
     279                $code = 'mac-2';
    420280            }
    421281
    422             $title = str_replace('_', '.', $title);
    423             $code = 'mac-2';
     282            // Parse OS X version number
     283            $version = substr($version, 0, strpos($version, ')'));
     284            if (strpos($version, ';') > -1)
     285            {
     286                $version = substr($version, 0, strpos($version, ';'));
     287            }
     288            $version = str_replace('_', '.', $version);
     289
     290            // Build version string: full, simple (ignore off)
     291            if ($wpua_show_version === 'simple' && preg_match('/([0-9]+\.[0-9]+)/i', $version, $regmatch))
     292            {
     293                // Return only the major.minor, ex. 10.11.4 -> 10.11
     294                $version = $regmatch[1];
     295            }
     296            $version = (empty($version)) ? 'OS X' : "OS X $version";
    424297        }
    425298        elseif (preg_match('/Darwin/i', $useragent))
    426299        {
    427             $title = 'Mac OS Darwin';
     300            $version = 'OS Darwin';
    428301            $code = 'mac-1';
    429302        }
     
    447320        if (preg_match('/mdv([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    448321        {
    449             $title .= ' '.$regmatch[1];
     322            $version = $regmatch[1];
    450323        }
    451324
    452325        $code = 'mandriva';
    453 
    454         if (preg_match('/x86_64/i', $useragent))
    455         {
    456             $title .= ' x64';
    457         }
    458326    }
    459327    elseif (preg_match('/moonOS/i', $useragent))
     
    464332        if (preg_match('/moonOS\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    465333        {
    466             $title .= ' '.$regmatch[1];
     334            $version = $regmatch[1];
    467335        }
    468336
    469337        $code = 'moonos';
    470 
    471         if (preg_match('/x86_64/i', $useragent))
    472         {
    473             $title .= ' x64';
    474         }
    475338    }
    476339    elseif (preg_match('/MorphOS/i', $useragent))
     
    479342        $title = 'MorphOS';
    480343        $code = 'morphos';
    481 
    482         if (preg_match('/x86_64/i', $useragent))
    483         {
    484             $title .= ' x64';
    485         }
    486344    }
    487345    elseif (preg_match('/NetBSD/i', $useragent))
     
    490348        $title = 'NetBSD';
    491349        $code = 'netbsd';
    492 
    493         if (preg_match('/x86_64/i', $useragent))
    494         {
    495             $title .= ' x64';
    496         }
    497350    }
    498351    elseif (preg_match('/Nova/i', $useragent))
     
    503356        if (preg_match('/Nova[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    504357        {
    505             $version .= ' '.$regmatch[1];
    506         }
    507 
    508         if (strlen($version) > 1)
    509         {
    510             $title .= $version;
     358            $version = $regmatch[1];
    511359        }
    512360
    513361        $code = 'nova';
    514 
    515         if (preg_match('/x86_64/i', $useragent))
    516         {
    517             $title .= ' x64';
    518         }
    519362    }
    520363    elseif (preg_match('/OpenBSD/i', $useragent))
     
    523366        $title = 'OpenBSD';
    524367        $code = 'openbsd';
    525 
    526         if (preg_match('/x86_64/i', $useragent))
    527         {
    528             $title .= ' x64';
    529         }
    530368    }
    531369    elseif (preg_match('/Oracle/i', $useragent))
     
    536374        if (preg_match('/.el([._0-9a-zA-Z]+)/i', $useragent, $regmatch))
    537375        {
    538             $title .= ' Enterprise Linux '.str_replace('_', '.', $regmatch[1]);
     376            $title .= ' Enterprise Linux';
     377            $version = str_replace('_', '.', $regmatch[1]);
    539378        }
    540379        else
     
    544383
    545384        $code = 'oracle';
    546 
    547         if (preg_match('/x86_64/i', $useragent))
    548         {
    549             $title .= ' x64';
    550         }
    551385    }
    552386    elseif (preg_match('/Pardus/i', $useragent))
     
    555389        $title = 'Pardus';
    556390        $code = 'pardus';
    557 
    558         if (preg_match('/x86_64/i', $useragent))
    559         {
    560             $title .= ' x64';
    561         }
    562391    }
    563392    elseif (preg_match('/PCLinuxOS/i', $useragent))
     
    568397        if (preg_match('/PCLinuxOS\/[.\-0-9a-zA-Z]+pclos([.\-0-9a-zA-Z]+)/i', $useragent, $regmatch))
    569398        {
    570             $title .= ' '.str_replace('_', '.', $regmatch[1]);
     399            $version = str_replace('_', '.', $regmatch[1]);
    571400        }
    572401
    573402        $code = 'pclinuxos';
    574 
    575         if (preg_match('/x86_64/i', $useragent))
    576         {
    577             $title .= ' x64';
    578         }
    579403    }
    580404    elseif (preg_match('/Red\ Hat/i', $useragent)
     
    586410        if (preg_match('/.el([._0-9a-zA-Z]+)/i', $useragent, $regmatch))
    587411        {
    588             $title .= ' Enterprise Linux '.str_replace('_', '.', $regmatch[1]);
     412            $title .= ' Enterprise Linux';
     413            $version = str_replace('_', '.', $regmatch[1]);
    589414        }
    590415
    591416        $code = 'red-hat';
    592 
    593         if (preg_match('/x86_64/i', $useragent))
    594         {
    595             $title .= ' x64';
    596         }
    597417    }
    598418    elseif (preg_match('/Rosa/i', $useragent))
     
    601421        $title = 'Rosa Linux';
    602422        $code = 'rosa';
    603 
    604         if (preg_match('/x86_64/i', $useragent))
    605         {
    606             $title .= ' x64';
    607         }
    608423    }
    609424    elseif (preg_match('/Sabayon/i', $useragent))
     
    612427        $title = 'Sabayon Linux';
    613428        $code = 'sabayon';
    614 
    615         if (preg_match('/x86_64/i', $useragent))
    616         {
    617             $title .= ' x64';
    618         }
    619429    }
    620430    elseif (preg_match('/Slackware/i', $useragent))
     
    623433        $title = 'Slackware';
    624434        $code = 'slackware';
    625 
    626         if (preg_match('/x86_64/i', $useragent))
    627         {
    628             $title .= ' x64';
    629         }
    630435    }
    631436    elseif (preg_match('/Solaris/i', $useragent))
     
    646451        $title = 'openSUSE';
    647452        $code = 'suse';
    648 
    649         if (preg_match('/x86_64/i', $useragent))
    650         {
    651             $title .= ' x64';
    652         }
    653453    }
    654454    elseif (preg_match('/Symb[ian]?[OS]?/i', $useragent))
     
    659459        if (preg_match('/Symb[ian]?[OS]?\/([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    660460        {
    661             $title .= ' '.$regmatch[1];
     461            $version = $regmatch[1];
    662462        }
    663463
    664464        $code = 'symbianos';
    665 
    666         if (preg_match('/x86_64/i', $useragent))
    667         {
    668             $title .= ' x64';
    669         }
    670465    }
    671466    elseif (preg_match('/Unix/i', $useragent))
     
    674469        $title = 'Unix';
    675470        $code = 'unix';
    676 
    677         if (preg_match('/x86_64/i', $useragent))
    678         {
    679             $title .= ' x64';
    680         }
    681471    }
    682472    elseif (preg_match('/VectorLinux/i', $useragent))
     
    685475        $title = 'VectorLinux';
    686476        $code = 'vectorlinux';
    687 
    688         if (preg_match('/x86_64/i', $useragent))
    689         {
    690             $title .= ' x64';
    691         }
    692477    }
    693478    elseif (preg_match('/Venenux/i', $useragent))
     
    696481        $title = 'Venenux GNU Linux';
    697482        $code = 'venenux';
    698 
    699         if (preg_match('/x86_64/i', $useragent))
    700         {
    701             $title .= ' x64';
    702         }
    703483    }
    704484    elseif (preg_match('/webOS/i', $useragent))
     
    712492        || preg_match('/Win32/i', $useragent))
    713493    {
     494        $title = 'Windows';
    714495        $link = 'http://www.microsoft.com/windows/';
    715496
    716         if (preg_match('/Windows NT 10.0; Win64; x64/i', $useragent)
    717             || preg_match('/Windows NT 10.0; WOW64/i', $useragent)
    718             || preg_match('/Windows NT 6.4; Win64; x64/i', $useragent)
    719             || preg_match('/Windows NT 6.4; WOW64/i', $useragent))
    720         {
    721             $title = 'Windows 10 x64 Edition';
     497        if (preg_match('/Windows NT 10.0/i', $useragent)
     498            || preg_match('/Windows NT 6.4/i', $useragent))
     499        {
     500            $version = '10';
    722501            $code = 'win-6';
    723502        }
    724         elseif (preg_match('/Windows NT 10.0/i', $useragent)
    725             || preg_match('/Windows NT 6.4/i', $useragent))
    726         {
    727             $title = 'Windows 10';
    728             $code = 'win-6';
    729         }
    730         elseif (preg_match('/Windows NT 6.3; Win64; x64/i', $useragent)
    731             || preg_match('/Windows NT 6.3; WOW64/i', $useragent))
    732         {
    733             $title = 'Windows 8.1 x64 Edition';
     503        elseif (preg_match('/Windows NT 6.3/i', $useragent))
     504        {
     505            $version = '8.1';
    734506            $code = 'win-5';
    735507        }
    736         elseif (preg_match('/Windows NT 6.3/i', $useragent))
    737         {
    738             $title = 'Windows 8.1';
     508        elseif (preg_match('/Windows NT 6.2/i', $useragent))
     509        {
     510            $version = '8';
    739511            $code = 'win-5';
    740512        }
    741         elseif (preg_match('/Windows NT 6.2; Win64; x64/i', $useragent)
    742             || preg_match('/Windows NT 6.2; WOW64/i', $useragent))
    743         {
    744             $title = 'Windows 8 x64 Edition';
    745             $code = 'win-5';
    746         }
    747         elseif (preg_match('/Windows NT 6.2/i', $useragent))
    748         {
    749             $title = 'Windows 8';
    750             $code = 'win-5';
    751         }
    752         elseif (preg_match('/Windows NT 6.1; Win64; x64/i', $useragent)
    753             || preg_match('/Windows NT 6.1; WOW64/i', $useragent))
    754         {
    755             $title = 'Windows 7 x64 Edition';
     513        elseif (preg_match('/Windows NT 6.1/i', $useragent))
     514        {
     515            $version = '7';
    756516            $code = 'win-4';
    757517        }
    758         elseif (preg_match('/Windows NT 6.1/i', $useragent))
    759         {
    760             $title = 'Windows 7';
    761             $code = 'win-4';
    762         }
    763518        elseif (preg_match('/Windows NT 6.0/i', $useragent))
    764519        {
    765             $title = 'Windows Vista';
     520            $version = 'Vista';
    766521            $code = 'win-3';
    767522        }
    768523        elseif (preg_match('/Windows NT 5.2 x64/i', $useragent))
    769524        {
    770             $title = 'Windows XP x64 Edition';
     525            $version = 'XP'; //x64 Edition very similar to Win 2003
    771526            $code = 'win-2';
    772527        }
    773         elseif (preg_match('/Windows NT 5.2; Win64; x64/i', $useragent))
    774         {
    775             $title = 'Windows Server 2003 x64 Edition';
    776             $code = 'win-2';
    777         }
    778528        elseif (preg_match('/Windows NT 5.2/i', $useragent))
    779529        {
    780             $title = 'Windows Server 2003';
     530            $version = 'Server 2003';
    781531            $code = 'win-2';
    782532        }
     
    784534            || preg_match('/Windows XP/i', $useragent))
    785535        {
    786             $title = 'Windows XP';
     536            $version = 'XP';
    787537            $code = 'win-2';
    788538        }
    789539        elseif (preg_match('/Windows NT 5.01/i', $useragent))
    790540        {
    791             $title = 'Windows 2000, Service Pack 1 (SP1)';
     541            $version = '2000, Service Pack 1 (SP1)';
    792542            $code = 'win-1';
    793543        }
    794544        elseif (preg_match('/Windows NT 5.0/i', $useragent)
     545            || preg_match('/Windows NT5/i', $useragent)
    795546            || preg_match('/Windows 2000/i', $useragent))
    796547        {
    797             $title = 'Windows 2000';
     548            $version = '2000';
    798549            $code = 'win-1';
    799550        }
     
    801552            || preg_match('/WinNT4.0/i', $useragent))
    802553        {
    803             $title = 'Microsoft Windows NT 4.0';
     554            $version = 'NT 4.0';
    804555            $code = 'win-1';
    805556        }
     
    807558            || preg_match('/WinNT3.51/i', $useragent))
    808559        {
    809             $title = 'Microsoft Windows NT 3.11';
     560            $version = 'NT 3.11';
     561            $code = 'win-1';
     562        }
     563        elseif (preg_match('/Windows NT/i', $useragent)
     564            || preg_match('/WinNT/i', $useragent))
     565        {
     566            $version = 'NT';
    810567            $code = 'win-1';
    811568        }
     
    814571            || preg_match('/Win16/i', $useragent))
    815572        {
    816             $title = 'Microsoft Windows 3.11';
     573            $version = '3.11';
    817574            $code = 'win-1';
    818575        }
    819576        elseif (preg_match('/Windows 3.1/i', $useragent))
    820577        {
    821             $title = 'Microsoft Windows 3.1';
     578            $version = '3.1';
    822579            $code = 'win-1';
    823580        }
     
    826583            || preg_match('/Windows ME/i', $useragent))
    827584        {
    828             $title = 'Windows Millennium Edition (Windows Me)';
     585            $version = 'Millennium Edition (Windows Me)';
    829586            $code = 'win-1';
    830587        }
    831588        elseif (preg_match('/Win98/i', $useragent))
    832589        {
    833             $title = 'Windows 98 SE';
     590            $version = '98 SE';
    834591            $code = 'win-1';
    835592        }
     
    837594            || preg_match('/Windows\ 4.10/i', $useragent))
    838595        {
    839             $title = 'Windows 98';
     596            $version = '98';
    840597            $code = 'win-1';
    841598        }
     
    843600            || preg_match('/Win95/i', $useragent))
    844601        {
    845             $title = 'Windows 95';
     602            $version = '95';
    846603            $code = 'win-1';
    847604        }
    848605        elseif (preg_match('/Windows CE/i', $useragent))
    849606        {
    850             $title = 'Windows CE';
     607            $version = 'CE';
    851608            $code = 'win-2';
    852609        }
    853610        elseif (preg_match('/WM5/i', $useragent))
    854611        {
    855             $title = 'Windows Mobile 5';
     612            $version = 'Mobile 5';
    856613            $code = 'win-phone';
    857614        }
    858615        elseif (preg_match('/WindowsMobile/i', $useragent))
    859616        {
    860             $title = 'Windows Mobile';
     617            $version = 'Mobile';
    861618            $code = 'win-phone';
    862619        }
    863620        else
    864621        {
    865             $title = 'Windows';
    866622            $code = 'win-2';
    867623        }
     
    872628        $title = 'Xandros';
    873629        $code = 'xandros';
    874 
    875         if (preg_match('/x86_64/i', $useragent))
    876         {
    877             $title .= ' x64';
    878         }
    879630    }
    880631    elseif (preg_match('/Xubuntu/i', $useragent))
     
    885636        if (preg_match('/Xubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    886637        {
    887             $version .= ' '.$regmatch[1];
     638            $version = $regmatch[1];
    888639        }
    889640
     
    895646        {
    896647            $code = 'xubuntu-2';
    897         }
    898 
    899         if (strlen($version) > 1)
    900         {
    901             $title .= $version;
    902         }
    903 
    904         if (preg_match('/x86_64/i', $useragent))
    905         {
    906             $title .= ' x64';
    907648        }
    908649    }
     
    912653        $title = 'Zenwalk GNU Linux';
    913654        $code = 'zenwalk';
    914 
    915         if (preg_match('/x86_64/i', $useragent))
    916         {
    917             $title .= ' x64';
    918         }
    919655    }
    920656
     
    927663        if (preg_match('/Ubuntu[\/|\ ]([.0-9]+[.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    928664        {
    929             $version .= ' '.$regmatch[1];
     665            $version = $regmatch[1];
    930666        }
    931667
     
    937673        {
    938674            $code = 'ubuntu-2';
    939         }
    940 
    941         if (strlen($version) > 1)
    942         {
    943             $title .= $version;
    944         }
    945 
    946         if (preg_match('/x86_64/i', $useragent))
    947         {
    948             $title .= ' x64';
    949675        }
    950676    }
     
    954680        $title = 'GNU/Linux';
    955681        $code = 'linux';
    956 
    957         if (preg_match('/x86_64/i', $useragent))
    958         {
    959             $title .= ' x64';
    960         }
    961682    }
    962683    elseif (preg_match('/J2ME\/MIDP/i', $useragent))
     
    973694    }
    974695
     696    // Check x64 architecture
     697    if (preg_match('/x86_64/i', $useragent) && $wpua_show_version === 'full')
     698    {
     699        // If version isn't null append 64 bit, otherwise set it to x64
     700        $version = (is_null($version)) ? 'x64' : "$version x64";
     701    }
     702    elseif ( $wpua_show_version === 'full'
     703        && (preg_match('/Windows/i', $useragent) // is Windows?
     704        || preg_match('/WinNT/i', $useragent)
     705        || preg_match('/Win32/i', $useragent))
     706        && (preg_match('/Win64/i', $useragent) // is x64?
     707        || preg_match('/x64/i', $useragent)
     708        || preg_match('/WOW64/i', $useragent)) )
     709    {
     710        $version .= ' x64 Edition';
     711    }
     712
     713    // Append version to title (as long as show version isn't 'off')
     714    if (isset($version) && $wpua_show_version !== 'false')
     715    {
     716        $title .= " $version";
     717    }
     718
    975719    return wpua_get_icon_text($link, $title, $code, '/os/');
    976720}
  • wp-useragent/trunk/wp-useragent-detect-trackback.php

    r1414133 r1415915  
    2323function wpua_detect_trackback()
    2424{
    25     global $useragent;
     25    global $useragent, $wpua_show_version;
    2626
    27     $version = '';
     27    $version = null;
    2828
    2929    if (preg_match('/Drupal/i', $useragent))
     
    130130    }
    131131
    132     // Append version to title string before processing
    133     $title .= " $version";
     132    // Append version to title (as long as show version isn't 'off')
     133    if (isset($version) && $wpua_show_version === 'full')
     134    {
     135        $title .= " $version";
     136    }
    134137
    135138    return wpua_get_icon_text($link, $title, $code, '/trackback/');
  • wp-useragent/trunk/wp-useragent-detect-webbrowser-version.php

    r1414133 r1415915  
    2121
    2222// Detect Web Browser versions
    23 function wpua_detect_browser_version($title)
     23function wpua_detect_browser_version($version_ptr)
    2424{
    25     global $useragent;
     25    global $useragent, $wpua_show_version;
    2626
    27     // Fix for Opera's UA string changes in v10.00+ (and others)
    28     $start = $title;
    29     if ( (strtolower($title) === strtolower('Opera')
    30             || strtolower($title) === strtolower('Opera Next')
    31             || strtolower($title) === strtolower('Opera Labs'))
    32         && preg_match('/Version/i', $useragent))
     27    // If show versions option is disabled, return immediately.
     28    if ($wpua_show_version === 'false') return '';
     29
     30    // Grab the browser version if its present
     31    preg_match('/'.$version_ptr.'[\ |\/|\:]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch);
     32    $version = (is_null($regmatch[1])) ? '' : $regmatch[1] ;
     33
     34    // Only show simple version? If so, only return the major (ex. 10.52 -> 10)
     35    if ($wpua_show_version === 'simple' && preg_match('/^([0-9]+)/i', $version, $regmatch))
    3336    {
    34         $start = 'Version';
    35     }
    36     elseif ( (strtolower($title) === strtolower('Opera')
    37             || strtolower($title) === strtolower('Opera Next')
    38             || strtolower($title) === strtolower('Opera Developer'))
    39         && preg_match('/OPR/i', $useragent))
    40     {
    41         $start = 'OPR';
    42     }
    43     elseif (strtolower($title) === strtolower('Opera Mobi')
    44         && preg_match('/Version/i', $useragent))
    45     {
    46         $start = 'Version';
    47     }
    48     elseif (strtolower($title) === strtolower('Safari')
    49         && preg_match('/Version/i', $useragent))
    50     {
    51         $start = 'Version';
    52     }
    53     elseif (strtolower($title) === strtolower('Pre')
    54         && preg_match('/Version/i', $useragent))
    55     {
    56         $start = 'Version';
    57     }
    58     elseif (strtolower($title) === strtolower('Android Webkit'))
    59     {
    60         $start = 'Version';
    61     }
    62     elseif (strtolower($title) === strtolower('Links'))
    63     {
    64         $start = 'Links \\(';
    65     }
    66     elseif (strtolower($title) === strtolower('UC Browser'))
    67     {
    68         $start = 'UC Browse';
    69     }
    70     elseif (strtolower($title) === strtolower('TenFourFox'))
    71     {
    72         $start = ' rv';
    73     }
    74     elseif (strtolower($title) === strtolower('Classilla'))
    75     {
    76         $start = ' rv';
    77     }
    78     elseif (strtolower($title) === strtolower('SmartTV'))
    79     {
    80         $start = 'WebBrowser';
    81     }
    82     elseif (strtolower($title) === strtolower('MSIE') && preg_match('/\ rv:([.0-9a-zA-Z]+)/i', $useragent))
    83     {
    84         // We have IE11 or newer
    85         $start = ' rv';
     37        $version = $regmatch[1];
    8638    }
    8739
    88     // Grab the browser version if its present
    89     preg_match('/'.$start.'[\ |\/|\:]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch);
    90     $version = $regmatch[1];
    91 
    92     // Return browser Title and Version, but first..some titles need to be changed
    93     if (strtolower($title) === 'msie'
    94         && strtolower($version) === '7.0'
    95         && preg_match('/Trident\/4.0/i', $useragent))
    96     {
    97         return ' 8.0 (Compatibility Mode)'; // Fix for IE8 quirky UA string with Compatibility Mode enabled
    98     }
    99     elseif (strtolower($title) === 'msie')
    100     {
    101         return " $version";
    102     }
    103     elseif (strtolower($title) === 'NetFrontLifeBrowser')
    104     {
    105         return "NetFront Life $version";
    106     }
    107     elseif (strtolower($title) === 'ninesky-android-mobile')
    108     {
    109         return "Ninesky $version";
    110     }
    111     elseif (strtolower($title) === 'coc_coc_browser')
    112     {
    113         return "Coc Coc $version";
    114     }
    115     elseif (strtolower($title) === 'gsa')
    116     {
    117         return "Google Search App $version";
    118     }
    119     elseif (strtolower($title) === 'multi-browser')
    120     {
    121         return "Multi-Browser XP $version";
    122     }
    123     elseif (strtolower($title) === 'nf-browser')
    124     {
    125         return "NetFront $version";
    126     }
    127     elseif (strtolower($title) === 'semc-browser')
    128     {
    129         return "SEMC Browser $version";
    130     }
    131     elseif (strtolower($title) === 'ucweb')
    132     {
    133         return "UC Browser $version";
    134     }
    135     elseif (strtolower($title) === 'up.browser'
    136         || strtolower($title) === 'up.link')
    137     {
    138         return "Openwave Mobile Browser $version";
    139     }
    140     elseif (strtolower($title) === 'chromeframe')
    141     {
    142         return "Google Chrome Frame $version";
    143     }
    144     elseif (strtolower($title) === 'mozilladeveloperpreview')
    145     {
    146         return "Mozilla Developer Preview $version";
    147     }
    148     elseif (strtolower($title) === 'multi-browser')
    149     {
    150         return "Multi-Browser XP $version";
    151     }
    152     elseif (strtolower($title) === 'opera mobi')
    153     {
    154         return "Opera Mobile $version";
    155     }
    156     elseif (strtolower($title) === 'osb-browser')
    157     {
    158         return "Gtk+ WebCore $version";
    159     }
    160     elseif (strtolower($title) === 'tablet browser')
    161     {
    162         return "MicroB $version";
    163     }
    164     elseif (strtolower($title) === 'tencenttraveler')
    165     {
    166         return "TT Explorer $version";
    167     }
    168     elseif (strtolower($title) === 'crmo')
    169     {
    170         return "Chrome Mobile $version";
    171     }
    172     elseif (strtolower($title) === 'smarttv')
    173     {
    174         return "Maple Browser $version";
    175     }
    176     elseif (strtolower($title) === 'wp-android'
    177         || strtolower($title) === 'wp-iphone')
    178     {
    179         //TODO check into Android version being returned
    180         return "Wordpress App $version";
    181     }
    182     elseif (strtolower($title) === 'atomicbrowser')
    183     {
    184         return "Atomic Web Browser $version";
    185     }
    186     elseif (strtolower($title) === 'barcapro')
    187     {
    188         return "Barca Pro $version";
    189     }
    190     elseif (strtolower($title) === 'dplus')
    191     {
    192         return "D+ $version";
    193     }
    194     elseif (strtolower($title) === 'nichrome\/self')
    195     {
    196         return "Rambler browser $version";
    197     }
    198     elseif (strtolower($title) === 'opera labs')
    199     {
    200         preg_match('/Edition\ Labs([\ ._0-9a-zA-Z]+);/i', $useragent, $regmatch);
    201         return $title.$regmatch[1]." $version";
    202     }
    203     elseif (strtolower($title) === 'escape'
    204         || strtolower($title) === 'espial')
    205     {
    206         return $version;
    207     }
    208     else
    209     {
    210         return "$title $version";
    211     }
     40    // Return simple browser version
     41    return $version;
    21242}
    21343
  • wp-useragent/trunk/wp-useragent-detect-webbrowser.php

    r1414133 r1415915  
    2323function wpua_detect_webbrowser()
    2424{
    25     global $useragent;
     25    global $useragent, $wpua_show_version;
     26
     27    $version = null;
    2628
    2729    if (preg_match('/360se/i', $useragent))
     
    2931        $link = 'http://se.360.cn/';
    3032        $title = '360Safe Explorer';
     33        $version = '';
    3134        $code = '360se';
    3235    }
     
    3538        $link = 'http://www.aborange.de/products/freeware/abolimba-multibrowser.php';
    3639        $title = 'Abolimba';
     40        $version = '';
    3741        $code = 'abolimba';
    3842    }
     
    4044    {
    4145        $link = 'http://www.acoobrowser.com/';
    42         $title = 'Acoo '.wpua_detect_browser_version('Browser');
     46        $title = 'Acoo Browser';
     47        $version = wpua_detect_browser_version('Browser');
    4348        $code = 'acoobrowser';
    4449    }
     
    4651    {
    4752        $link = 'http://sourceforge.net/projects/alienforce/';
    48         $title = wpua_detect_browser_version('Alienforce');
     53        $title = 'Alienforce';
    4954        $code = 'alienforce';
    5055    }
     
    5257    {
    5358        $link = 'http://www.w3.org/Amaya/';
    54         $title = wpua_detect_browser_version('Amaya');
     59        $title = 'Amaya';
    5560        $code = 'amaya';
    5661    }
     
    5863    {
    5964        $link = 'http://aweb.sunsite.dk/';
    60         $title = 'Amiga '.wpua_detect_browser_version('AWeb');
     65        $title = 'Amiga AWeb';
     66        $version = wpua_detect_browser_version('AWeb');
    6167        $code = 'amiga-aweb';
    6268    }
     
    6571        $link = 'http://amigo.mail.ru/';
    6672        $title = 'Amigo';
     73        $version = '';
    6774        $code = 'amigo';
    6875    }
     
    7077    {
    7178        $link = 'http://downloads.channel.aol.com/browser';
    72         $title = 'America Online '.wpua_detect_browser_version('Browser');
     79        $title = 'America Online Browser';
     80        $version = wpua_detect_browser_version('Browser');
    7381        $code = 'aol';
    7482    }
     
    7684    {
    7785        $link = 'http://v3.vapor.com/voyager/';
    78         $title = 'Amiga '.wpua_detect_browser_version('Voyager');
     86        $title = 'Amiga Voyager';
     87        $version = wpua_detect_browser_version('Voyager');
    7988        $code = 'amigavoyager';
    8089    }
     
    8291    {
    8392        $link = 'http://en.wikipedia.org/wiki/Fresco_(web_browser)';
    84         $title = 'ANT '.wpua_detect_browser_version('Fresco');
     93        $title = 'ANT Fresco';
     94        $version = wpua_detect_browser_version('Fresco');
    8595        $code = 'antfresco';
    8696    }
     
    8898    {
    8999        $link = 'http://downloads.channel.aol.com/browser';
    90         $title = wpua_detect_browser_version('AOL');
     100        $title = 'AOL';
    91101        $code = 'aol';
    92102    }
     
    94104    {
    95105        $link = 'http://code.google.com/p/arora/';
    96         $title = wpua_detect_browser_version('Arora');
     106        $title = 'Arora';
    97107        $code = 'arora';
    98108    }
     
    100110    {
    101111        $link = 'http://www.atomicwebbrowser.com/';
    102         $title = wpua_detect_browser_version('AtomicBrowser');
     112        $title = 'Atomic Web Browser';
     113        $version = wpua_detect_browser_version('AtomicBrowser');
    103114        $code = 'atomicwebbrowser';
    104115    }
     
    106117    {
    107118        $link = 'http://www.avantbrowser.com/';
    108         $title = 'Avant '.wpua_detect_browser_version('Browser');
     119        $title = 'Avant Browser';
     120        $version = wpua_detect_browser_version('Browser');
    109121        $code = 'avantbrowser';
    110122    }
     
    112124    {
    113125        $link = 'http://www.whitehatsec.com/aviator/';
    114         $title = wpua_detect_browser_version('Aviator');
     126        $title = 'Aviator';
    115127        $code = 'aviator';
    116128    }
     
    118130    {
    119131        $link = 'http://liulanqi.baidu.com/';
    120         $title = 'Baidu '.wpua_detect_browser_version('Browser');
     132        $title = 'Baidu Browser';
     133        $version = wpua_detect_browser_version('Browser');
    121134        $code = 'baidubrowser';
    122135    }
     
    124137    {
    125138        $link = 'http://en.browser.baidu.com/';
    126         $title = 'Baidu '.wpua_detect_browser_version('Spark');
     139        $title = 'Baidu Spark';
     140        $version = wpua_detect_browser_version('Spark');
    127141        $code = 'baiduspark';
    128142    }
     
    130144    {
    131145        $link = 'http://www.pocosystems.com/home/index.php?option=content&task=category&sectionid=2&id=9&Itemid=27';
    132         $title = wpua_detect_browser_version('BarcaPro');
     146        $title = 'Barca Pro';
     147        $version = wpua_detect_browser_version('BarcaPro');
    133148        $code = 'barca';
    134149    }
     
    136151    {
    137152        $link = 'http://www.pocosystems.com/home/index.php?option=content&task=category&sectionid=2&id=9&Itemid=27';
    138         $title = wpua_detect_browser_version('Barca');
     153        $title = 'Barca';
    139154        $code = 'barca';
    140155    }
     
    142157    {
    143158        $link = 'http://www.beamrise.com/';
    144         $title = wpua_detect_browser_version('Beamrise');
     159        $title = 'Beamrise';
    145160        $code = 'beamrise';
    146161    }
     
    148163    {
    149164        $link = 'http://www.beonex.com/';
    150         $title = wpua_detect_browser_version('Beonex');
     165        $title = 'Beonex';
    151166        $code = 'beonex';
    152167    }
     
    154169    {
    155170        $link = 'http://www.blackberry.com/';
    156         $title = wpua_detect_browser_version('BlackBerry');
     171        $title = 'BlackBerry';
    157172        $code = 'blackberry';
    158173    }
     
    160175    {
    161176        $link = 'http://www.blackbirdbrowser.com/';
    162         $title = wpua_detect_browser_version('Blackbird');
     177        $title = 'Blackbird';
    163178        $code = 'blackbird';
    164179    }
     
    166181    {
    167182        $link = 'http://www.netgate.sk/blackhawk/help/welcome-to-blackhawk-web-browser.html';
    168         $title = wpua_detect_browser_version('BlackHawk');
     183        $title = 'BlackHawk';
    169184        $code = 'blackhawk';
    170185    }
     
    172187    {
    173188        $link = 'http://en.wikipedia.org/wiki/Blazer_(web_browser)';
    174         $title = wpua_detect_browser_version('Blazer');
     189        $title = 'Blazer';
    175190        $code = 'blazer';
    176191    }
     
    178193    {
    179194        $link = 'http://www.boltbrowser.com/';
    180         $title = wpua_detect_browser_version('Bolt');
     195        $title = 'Bolt';
    181196        $code = 'bolt';
    182197    }
     
    184199    {
    185200        $link = 'http://www.mozilla.org/projects/minefield/';
    186         $title = wpua_detect_browser_version('BonEcho');
     201        $title = 'BonEcho';
    187202        $code = 'firefoxdevpre';
    188203    }
     
    191206        $link = 'http://pdqi.com/browsex/';
    192207        $title = 'BrowseX';
     208        $version = '';
    193209        $code = 'browsex';
    194210    }
     
    196212    {
    197213        $link = 'http://www.browzar.com/';
    198         $title = wpua_detect_browser_version('Browzar');
     214        $title = 'Browzar';
    199215        $code = 'browzar';
    200216    }
     
    202218    {
    203219        $link = 'http://code.google.com/p/quirkysoft/';
    204         $title = wpua_detect_browser_version('Bunjalloo');
     220        $title = 'Bunjalloo';
    205221        $code = 'bunjalloo';
    206222    }
     
    208224    {
    209225        $link = 'http://www.caminobrowser.org/';
    210         $title = wpua_detect_browser_version('Camino');
     226        $title = 'Camino';
    211227        $code = 'camino';
    212228    }
     
    214230    {
    215231        $link = 'http://www.caymanbrowser.com/';
    216         $title = 'Cayman '.wpua_detect_browser_version('Browser');
     232        $title = 'Cayman Browser';
     233        $version = wpua_detect_browser_version('Browser');
    217234        $code = 'caymanbrowser';
    218235    }
     
    220237    {
    221238        $link = 'http://en.wikipedia.org/wiki/Charon_(web_browser)';
    222         $title = wpua_detect_browser_version('Charon');
     239        $title = 'Charon';
    223240        $code = 'null';
    224241    }
     
    226243    {
    227244        $link = 'http://downloads.channel.aol.com/browser';
    228         $title = wpua_detect_browser_version('Cheshire');
     245        $title = 'Cheshire';
    229246        $code = 'aol';
    230247    }
     
    232249    {
    233250        $link = 'http://www.chimera.org/';
    234         $title = wpua_detect_browser_version('Chimera');
     251        $title = 'Chimera';
    235252        $code = 'null';
    236253    }
     
    238255    {
    239256        $link = 'http://code.google.com/chrome/chromeframe/';
    240         $title = wpua_detect_browser_version('chromeframe');
     257        $title = 'Google Chrome Frame';
     258        $version = wpua_detect_browser_version('chromeframe');
    241259        $code = 'google';
    242260    }
     
    244262    {
    245263        $link = 'http://www.chromeplus.org/';
    246         $title = wpua_detect_browser_version('ChromePlus');
     264        $title = 'ChromePlus';
    247265        $code = 'chromeplus';
    248266    }
     
    250268    {
    251269        $link = 'http://www.srware.net/';
    252         $title = 'SRWare '.wpua_detect_browser_version('Iron');
     270        $title = 'SRWare Iron';
     271        $version = wpua_detect_browser_version('Iron');
    253272        $code = 'srwareiron';
    254273    }
     
    256275    {
    257276        $link = 'http://www.chromium.org/';
    258         $title = wpua_detect_browser_version('Chromium');
     277        $title = 'Chromium';
    259278        $code = 'chromium';
    260279    }
     
    262281    {
    263282        $link = 'http://en.wikipedia.org/wiki/Classilla';
    264         $title = wpua_detect_browser_version('Classilla');
     283        $title = 'Classilla';
     284        $version = wpua_detect_browser_version(' rv');
    265285        $code = 'classilla';
    266286    }
     
    268288    {
    269289        $link = 'http://coastbyopera.com/';
    270         $title = wpua_detect_browser_version('Coast');
     290        $title = 'Coast';
    271291        $code = 'coast';
    272292    }
     
    274294    {
    275295        $link = 'http://coccoc.vn/';
    276         $title = wpua_detect_browser_version('coc_coc_browser');
     296        $title = 'Coc Coc';
     297        $version = wpua_detect_browser_version('coc_coc_browser');
    277298        $code = 'coccoc';
    278299    }
     
    280301    {
    281302        $link = 'http://www.columbus-browser.com/';
    282         $title = wpua_detect_browser_version('Columbus');
     303        $title = 'Columbus';
    283304        $code = 'columbus';
    284305    }
     
    286307    {
    287308        $link = 'http://www.cometbird.com/';
    288         $title = wpua_detect_browser_version('CometBird');
     309        $title = 'CometBird';
    289310        $code = 'cometbird';
    290311    }
     
    292313    {
    293314        $link = 'http://www.comodo.com/home/internet-security/browser.php';
    294         $title = 'Comodo '.wpua_detect_browser_version('Dragon');
     315        $title = 'Comodo Dragon';
     316        $version = wpua_detect_browser_version('Dragon');
    295317        $code = 'comodo-dragon';
    296318    }
     
    298320    {
    299321        $link = 'http://www.conkeror.org/';
    300         $title = wpua_detect_browser_version('Conkeror');
     322        $title = 'Conkeror';
    301323        $code = 'conkeror';
    302324    }
     
    304326    {
    305327        $link = 'http://www.coolnovo.com/';
    306         $title = wpua_detect_browser_version('CoolNovo');
     328        $title = 'CoolNovo';
    307329        $code = 'coolnovo';
    308330    }
     
    310332    {
    311333        $link = 'http://en.wikipedia.org/wiki/C%E1%BB%9D_R%C3%B4m%2B_(browser)';
    312         $title = wpua_detect_browser_version('CoRom');
     334        $title = 'CoRom';
    313335        $code = 'corom';
    314336    }
     
    316338    {
    317339        $link = 'http://www.crazybrowser.com/';
    318         $title = 'Crazy '.wpua_detect_browser_version('Browser');
     340        $title = 'Crazy Browser';
     341        $version = wpua_detect_browser_version('Browser');
    319342        $code = 'crazybrowser';
    320343    }
     
    322345    {
    323346        $link = 'http://www.google.com/chrome';
    324         $title = wpua_detect_browser_version('CrMo');
     347        $title = 'Chrome Mobile';
     348        $version = wpua_detect_browser_version('CrMo');
    325349        $code = 'chrome';
    326350    }
     
    328352    {
    329353        $link = 'http://www.cruzapp.com/';
    330         $title = wpua_detect_browser_version('Cruz');
     354        $title = 'Cruz';
    331355        $code = 'cruz';
    332356    }
     
    334358    {
    335359        $link = 'http://www.cyberdog.org/about/cyberdog/cyberbrowse.html';
    336         $title = wpua_detect_browser_version('Cyberdog');
     360        $title = 'Cyberdog';
    337361        $code = 'cyberdog';
    338362    }
     363    elseif (preg_match('/Deepnet\ Explorer/i', $useragent))
     364    {
     365        $link = 'http://www.deepnetexplorer.com/';
     366        $title = 'Deepnet Explorer';
     367        $code = 'deepnetexplorer';
     368    }
     369    elseif (preg_match('/Demeter/i', $useragent))
     370    {
     371        $link = 'http://www.hurrikenux.com/Demeter/';
     372        $title = 'Demeter';
     373        $code = 'demeter';
     374    }
     375    elseif (preg_match('/DeskBrowse/i', $useragent))
     376    {
     377        $link = 'http://www.deskbrowse.org/';
     378        $title = 'DeskBrowse';
     379        $code = 'deskbrowse';
     380    }
     381    elseif (preg_match('/Dillo/i', $useragent))
     382    {
     383        $link = 'http://www.dillo.org/';
     384        $title = 'Dillo';
     385        $code = 'dillo';
     386    }
     387    elseif (preg_match('/DoCoMo/i', $useragent))
     388    {
     389        $link = 'http://www.nttdocomo.com/';
     390        $title = 'DoCoMo';
     391        $code = 'null';
     392    }
     393    elseif (preg_match('/DocZilla/i', $useragent))
     394    {
     395        $link = 'http://www.doczilla.com/';
     396        $title = 'DocZilla';
     397        $code = 'doczilla';
     398    }
     399    elseif (preg_match('/Dolfin/i', $useragent))
     400    {
     401        $link = 'http://www.samsungmobile.com/';
     402        $title = 'Dolfin';
     403        $code = 'samsung';
     404    }
     405    elseif (preg_match('/Dooble/i', $useragent))
     406    {
     407        $link = 'http://dooble.sourceforge.net/';
     408        $title = 'Dooble';
     409        $code = 'dooble';
     410    }
     411    elseif (preg_match('/Doris/i', $useragent))
     412    {
     413        $link = 'http://www.anygraaf.fi/browser/indexe.htm';
     414        $title = 'Doris';
     415        $code = 'doris';
     416    }
     417    elseif (preg_match('/Dorothy/i', $useragent))
     418    {
     419        $link = 'http://www.dorothybrowser.com/';
     420        $title = 'Dorothy';
     421        $code = 'dorothybrowser';
     422    }
    339423    elseif (preg_match('/DPlus/i', $useragent))
    340424    {
    341425        $link = 'http://dplus-browser.sourceforge.net/';
    342         $title = wpua_detect_browser_version('DPlus');
     426        $version = wpua_detect_browser_version('DPlus');
     427        $title = 'D+';
    343428        $code = 'dillo';
    344429    }
    345     elseif (preg_match('/Deepnet\ Explorer/i', $useragent))
    346     {
    347         $link = 'http://www.deepnetexplorer.com/';
    348         $title = wpua_detect_browser_version('Deepnet Explorer');
    349         $code = 'deepnetexplorer';
    350     }
    351     elseif (preg_match('/Demeter/i', $useragent))
    352     {
    353         $link = 'http://www.hurrikenux.com/Demeter/';
    354         $title = wpua_detect_browser_version('Demeter');
    355         $code = 'demeter';
    356     }
    357     elseif (preg_match('/DeskBrowse/i', $useragent))
    358     {
    359         $link = 'http://www.deskbrowse.org/';
    360         $title = wpua_detect_browser_version('DeskBrowse');
    361         $code = 'deskbrowse';
    362     }
    363     elseif (preg_match('/Dillo/i', $useragent))
    364     {
    365         $link = 'http://www.dillo.org/';
    366         $title = wpua_detect_browser_version('Dillo');
    367         $code = 'dillo';
    368     }
    369     elseif (preg_match('/DoCoMo/i', $useragent))
    370     {
    371         $link = 'http://www.nttdocomo.com/';
    372         $title = wpua_detect_browser_version('DoCoMo');
     430    elseif (preg_match('/Edbrowse/i', $useragent))
     431    {
     432        $link = 'http://edbrowse.sourceforge.net/';
     433        $title = 'Edbrowse';
     434        $code = 'edbrowse';
     435    }
     436    elseif (preg_match('/Element\ Browser/i', $useragent))
     437    {
     438        $link = 'http://www.elementsoftware.co.uk/software/elementbrowser/';
     439        $title = 'Element Browser';
     440        $version = wpua_detect_browser_version('Browser');
     441        $code = 'elementbrowser';
     442    }
     443    elseif (preg_match('/Elinks/i', $useragent))
     444    {
     445        $link = 'http://elinks.or.cz/';
     446        $title = 'Elinks';
     447        $code = 'elinks';
     448    }
     449    elseif (preg_match('/Enigma\ Browser/i', $useragent))
     450    {
     451        $link = 'http://en.wikipedia.org/wiki/Enigma_Browser';
     452        $title = 'Enigma Browser';
     453        $version = wpua_detect_browser_version('Browser');
     454        $code = 'enigmabrowser';
     455    }
     456    elseif (preg_match('/EnigmaFox/i', $useragent))
     457    {
     458        $link = '#';
     459        $title = 'EnigmaFox';
    373460        $code = 'null';
    374461    }
    375     elseif (preg_match('/DocZilla/i', $useragent))
    376     {
    377         $link = 'http://www.doczilla.com/';
    378         $title = wpua_detect_browser_version('DocZilla');
    379         $code = 'doczilla';
    380     }
    381     elseif (preg_match('/Dolfin/i', $useragent))
    382     {
    383         $link = 'http://www.samsungmobile.com/';
    384         $title = wpua_detect_browser_version('Dolfin');
    385         $code = 'samsung';
    386     }
    387     elseif (preg_match('/Dooble/i', $useragent))
    388     {
    389         $link = 'http://dooble.sourceforge.net/';
    390         $title = wpua_detect_browser_version('Dooble');
    391         $code = 'dooble';
    392     }
    393     elseif (preg_match('/Doris/i', $useragent))
    394     {
    395         $link = 'http://www.anygraaf.fi/browser/indexe.htm';
    396         $title = wpua_detect_browser_version('Doris');
    397         $code = 'doris';
    398     }
    399     elseif (preg_match('/Dorothy/i', $useragent))
    400     {
    401         $link = 'http://www.dorothybrowser.com/';
    402         $title = wpua_detect_browser_version('Dorothy');
    403         $code = 'dorothybrowser';
    404     }
    405     elseif (preg_match('/DPlus/i', $useragent))
    406     {
    407         $link = 'http://dplus-browser.sourceforge.net/';
    408         $title = wpua_detect_browser_version('DPlus');
    409         $code = 'dillo';
    410     }
    411     elseif (preg_match('/Edbrowse/i', $useragent))
    412     {
    413         $link = 'http://edbrowse.sourceforge.net/';
    414         $title = wpua_detect_browser_version('Edbrowse');
    415         $code = 'edbrowse';
    416     }
    417     elseif (preg_match('/Element\ Browser/i', $useragent))
    418     {
    419         $link = 'http://www.elementsoftware.co.uk/software/elementbrowser/';
    420         $title = 'Element '.wpua_detect_browser_version('Browser');
    421         $code = 'elementbrowser';
    422     }
    423     elseif (preg_match('/Elinks/i', $useragent))
    424     {
    425         $link = 'http://elinks.or.cz/';
    426         $title = wpua_detect_browser_version('Elinks');
    427         $code = 'elinks';
    428     }
    429     elseif (preg_match('/Enigma\ Browser/i', $useragent))
    430     {
    431         $link = 'http://en.wikipedia.org/wiki/Enigma_Browser';
    432         $title = 'Enigma '.wpua_detect_browser_version('Browser');
    433         $code = 'enigmabrowser';
    434     }
    435     elseif (preg_match('/EnigmaFox/i', $useragent))
    436     {
    437         $link = '#';
    438         $title = wpua_detect_browser_version('EnigmaFox');
    439         $code = 'null';
    440     }
    441462    elseif (preg_match('/Epic/i', $useragent))
    442463    {
    443464        $link = 'http://www.epicbrowser.com/';
    444         $title = wpua_detect_browser_version('Epic');
     465        $title = 'Epic';
    445466        $code = 'epicbrowser';
    446467    }
     
    448469    {
    449470        $link = 'http://gnome.org/projects/epiphany/';
    450         $title = wpua_detect_browser_version('Epiphany');
     471        $title = 'Epiphany';
    451472        $code = 'epiphany';
    452473    }
     
    454475    {
    455476        $link = 'http://www.espial.com/products/evo_browser/';
    456         $title = 'Espial TV Browser '.wpua_detect_browser_version('Escape');
     477        $title = 'Espial TV Browser';
    457478        $code = 'espialtvbrowser';
    458479    }
     
    460481    {
    461482        $link = 'http://www.espial.com/products/evo_browser/';
    462         $title = 'Espial TV Browser '.wpua_detect_browser_version('Espial');
     483        $title = 'Espial TV Browser';
    463484        $code = 'espialtvbrowser';
    464485    }
     
    466487    {
    467488        $link = 'https://wiki.mozilla.org/Fennec';
    468         $title = wpua_detect_browser_version('Fennec');
     489        $title = 'Fennec';
    469490        $code = 'fennec';
    470491    }
     
    472493    {
    473494        $link = 'http://seb.mozdev.org/firebird/';
    474         $title = wpua_detect_browser_version('Firebird');
     495        $title = 'Firebird';
    475496        $code = 'firebird';
    476497    }
     
    478499    {
    479500        $link = 'http://www.arsslensoft.tk/?q=node/7';
    480         $title = wpua_detect_browser_version('Fireweb Navigator');
     501        $title = 'Fireweb Navigator';
    481502        $code = 'firewebnavigator';
    482503    }
     
    484505    {
    485506        $link = 'http://www.flock.com/';
    486         $title = wpua_detect_browser_version('Flock');
     507        $title = 'Flock';
    487508        $code = 'flock';
    488509    }
     
    490511    {
    491512        $link = 'http://www.fluidapp.com/';
    492         $title = wpua_detect_browser_version('Fluid');
     513        $title = 'Fluid';
    493514        $code = 'fluid';
    494515    }
     
    497518    {
    498519        $link = 'http://www.traos.org/';
    499         $title = wpua_detect_browser_version('Galaxy');
     520        $title = 'Galaxy';
    500521        $code = 'galaxy';
    501522    }
     
    503524    {
    504525        $link = 'http://galeon.sourceforge.net/';
    505         $title = wpua_detect_browser_version('Galeon');
     526        $title = 'Galeon';
    506527        $code = 'galeon';
    507528    }
     
    509530    {
    510531        $link = 'http://www.globalmojo.com/';
    511         $title = wpua_detect_browser_version('GlobalMojo');
     532        $title = 'GlobalMojo';
    512533        $code = 'globalmojo';
    513534    }
     
    515536    {
    516537        $link = 'http://www.gobrowser.cn/';
    517         $title = 'GO '.wpua_detect_browser_version('Browser');
     538        $title = 'GO Browser';
     539        $version = wpua_detect_browser_version('Browser');
    518540        $code = 'gobrowser';
    519541    }
     
    522544        $link = 'http://google.com/gwt/n';
    523545        $title = 'Google Wireless Transcoder';
     546        $version = '';
    524547        $code = 'google';
    525548    }
     
    527550    {
    528551        $link = 'http://gosurfbrowser.com/?ln=en';
    529         $title = wpua_detect_browser_version('GoSurf');
     552        $title = 'GoSurf';
    530553        $code = 'gosurf';
    531554    }
     
    533556    {
    534557        $link = 'http://www.mozilla.org/';
    535         $title = wpua_detect_browser_version('GranParadiso');
     558        $title = 'GranParadiso';
    536559        $code = 'firefoxdevpre';
    537560    }
     
    539562    {
    540563        $link = 'http://www.morequick.com/';
    541         $title = wpua_detect_browser_version('GreenBrowser');
     564        $title = 'GreenBrowser';
    542565        $code = 'greenbrowser';
    543566    }
     
    546569    {
    547570        $link = 'http://en.wikipedia.org/wiki/Google_Search#Mobile_app';
    548         $title = wpua_detect_browser_version('GSA');
     571        $title = 'Google Search App';
     572        $version = wpua_detect_browser_version('GSA');
    549573        $code = 'google';
    550574    }
     
    552576    {
    553577        $link = 'http://www.alloutsoftware.com/';
    554         $title = wpua_detect_browser_version('Hana');
     578        $title = 'Hana';
    555579        $code = 'hana';
    556580    }
     
    558582    {
    559583        $link = 'http://java.sun.com/products/archive/hotjava/';
    560         $title = wpua_detect_browser_version('HotJava');
     584        $title = 'HotJava';
    561585        $code = 'hotjava';
    562586    }
     
    564588    {
    565589        $link = 'http://tkhtml.tcl.tk/hv3.html';
    566         $title = wpua_detect_browser_version('Hv3');
     590        $title = 'Hv3';
    567591        $code = 'hv3';
    568592    }
     
    571595        $link = 'http://www.hydrabrowser.com/';
    572596        $title = 'Hydra Browser';
     597        $version = '';
    573598        $code = 'hydrabrowser';
    574599    }
     
    576601    {
    577602        $link = 'http://www.torchmobile.com/';
    578         $title = wpua_detect_browser_version('Iris');
     603        $title = 'Iris';
    579604        $code = 'iris';
    580605    }
     
    582607    {
    583608        $link = 'http://www.networking.ibm.com/WebExplorer/';
    584         $title = 'IBM '.wpua_detect_browser_version('WebExplorer');
     609        $title = 'IBM WebExplorer';
     610        $version = wpua_detect_browser_version('WebExplorer');
    585611        $code = 'ibmwebexplorer';
    586612    }
     
    588614    {
    589615        $link = 'http://www.ibrowse-dev.net/';
    590         $title = wpua_detect_browser_version('IBrowse');
     616        $title = 'IBrowse';
    591617        $code = 'ibrowse';
    592618    }
     
    594620    {
    595621        $link = 'http://www.icab.de/';
    596         $title = wpua_detect_browser_version('iCab');
     622        $title = 'iCab';
    597623        $code = 'icab';
    598624    }
     
    600626    {
    601627        $link = 'http://www.icesoft.com/products/icebrowser.html';
    602         $title = wpua_detect_browser_version('Ice Browser');
     628        $title = 'Ice Browser';
    603629        $code = 'icebrowser';
    604630    }
     
    606632    {
    607633        $link = 'http://packages.debian.org/iceape';
    608         $title = wpua_detect_browser_version('Iceape');
     634        $title = 'Iceape';
    609635        $code = 'iceape';
    610636    }
     
    612638    {
    613639        $link = 'http://gnuzilla.gnu.org/';
    614         $title = 'GNU '.wpua_detect_browser_version('IceCat');
     640        $title = 'GNU IceCat';
     641        $version = wpua_detect_browser_version('IceCat');
    615642        $code = 'icecat';
    616643    }
     
    618645    {
    619646        $link = 'http://www.comodo.com/home/browsers-toolbars/icedragon-browser.php';
    620         $title = wpua_detect_browser_version('IceDragon');
     647        $title = 'IceDragon';
    621648        $code = 'icedragon';
    622649    }
     
    624651    {
    625652        $link = 'http://www.geticeweasel.org/';
    626         $title = wpua_detect_browser_version('IceWeasel');
     653        $title = 'IceWeasel';
    627654        $code = 'iceweasel';
    628655    }
     
    630657    {
    631658        $link = 'http://www.microsoft.com/windowsmobile/en-us/downloads/microsoft/internet-explorer-mobile.mspx';
    632         $title = wpua_detect_browser_version('IEMobile');
     659        $title = 'IEMobile';
    633660        $code = 'msie-mobile';
    634661    }
     
    636663    {
    637664        $link = 'http://alexanderjbeston.wordpress.com/';
    638         $title = 'iNet '.wpua_detect_browser_version('Browser');
     665        $title = 'iNet Browser';
     666        $version = wpua_detect_browser_version('Browser');
    639667        $code = 'null';
    640668    }
     
    642670    {
    643671        $link = 'http://en.wikipedia.org/wiki/IRider';
    644         $title = wpua_detect_browser_version('iRider');
     672        $title = 'iRider';
    645673        $code = 'irider';
    646674    }
     
    648676    {
    649677        $link = 'http://www.srware.net/en/software_srware_iron.php';
    650         $title = wpua_detect_browser_version('Iron');
     678        $title = 'Iron';
    651679        $code = 'iron';
    652680    }
     
    654682    {
    655683        $link = 'http://inetsurfboard.sourceforge.net/';
    656         $title = wpua_detect_browser_version('InternetSurfboard');
     684        $title = 'InternetSurfboard';
    657685        $code = 'internetsurfboard';
    658686    }
     
    660688    {
    661689        $link = 'http://www.samsungmobile.com/';
    662         $title = wpua_detect_browser_version('Jasmine');
     690        $title = 'Jasmine';
    663691        $code = 'samsung';
    664692    }
     
    666694    {
    667695        $link = 'http://kmeleon.sourceforge.net/';
    668         $title = wpua_detect_browser_version('K-Meleon');
     696        $title = 'K-Meleon';
    669697        $code = 'kmeleon';
    670698    }
     
    672700    {
    673701        $link = 'http://k-ninja-samurai.en.softonic.com/';
    674         $title = wpua_detect_browser_version('K-Ninja');
     702        $title = 'K-Ninja';
    675703        $code = 'kninja';
    676704    }
     
    678706    {
    679707        $link = 'http://ufoxlab.googlepages.com/cooperation';
    680         $title = wpua_detect_browser_version('Kapiko');
     708        $title = 'Kapiko';
    681709        $code = 'kapiko';
    682710    }
     
    684712    {
    685713        $link = 'http://kazehakase.sourceforge.jp/';
    686         $title = wpua_detect_browser_version('Kazehakase');
     714        $title = 'Kazehakase';
    687715        $code = 'kazehakase';
    688716    }
     
    690718    {
    691719        $link = 'http://www.kinza.jp/';
    692         $title = wpua_detect_browser_version('Kinza');
     720        $title = 'Kinza';
    693721        $code = 'kinza';
    694722    }
     
    696724    {
    697725        $link = 'http://www.kirix.com/';
    698         $title = 'Kirix '.wpua_detect_browser_version('Strata');
     726        $title = 'Kirix Strata';
     727        $version = wpua_detect_browser_version('Strata');
    699728        $code = 'kirix-strata';
    700729    }
     
    702731    {
    703732        $link = 'http://www.kkman.com.tw/';
    704         $title = wpua_detect_browser_version('KKman');
     733        $title = 'KKman';
    705734        $code = 'kkman';
    706735    }
     
    708737    {
    709738        $link = 'http://kontact.kde.org/kmail/';
    710         $title = wpua_detect_browser_version('KMail');
     739        $title = 'KMail';
    711740        $code = 'kmail';
    712741    }
     
    714743    {
    715744        $link = 'http://en.wikipedia.org/wiki/K-Meleon';
    716         $title = wpua_detect_browser_version('KMLite');
     745        $title = 'KMLite';
    717746        $code = 'kmeleon';
    718747    }
     
    720749    {
    721750        $link = 'http://konqueror.kde.org/';
    722         $title = wpua_detect_browser_version('Konqueror');
     751        $title = 'Konqueror';
    723752        $code = 'konqueror';
    724753    }
     
    726755    {
    727756        $link = 'http://kylo.tv/';
    728         $title = wpua_detect_browser_version('Kylo');
     757        $title = 'Kylo';
    729758        $code = 'kylo';
    730759    }
     
    732761    {
    733762        $link = 'http://wiki.freespire.org/index.php/Web_Browser';
    734         $title = wpua_detect_browser_version('LBrowser');
     763        $title = 'LBrowser';
    735764        $code = 'lbrowser';
    736765    }
     
    738767    {
    739768        $link = 'http://developer.lgappstv.com/TV_HELP/index.jsp?topic=%2Flge.tvsdk.developing.book%2Fhtml%2FDeveloping+Web+App%2FDeveloping+Web+App%2FWeb+Engine.htm';
    740         $title = 'LG Web '.wpua_detect_browser_version('Browser');
     769        $title = 'LG Web Browser';
     770        $version = wpua_detect_browser_version('Browser');
    741771        $code = 'lgbrowser';
    742772    }
     
    745775        $link = 'http://leechcraft.org/';
    746776        $title = 'LeechCraft';
     777        $version = '';
    747778        $code = 'null';
    748779    }
     
    751782    {
    752783        $link = 'http://links.sourceforge.net/';
    753         $title = wpua_detect_browser_version('Links');
     784        $version = wpua_detect_browser_version('Links \\(');
     785        $title = 'Links';
    754786        $code = 'links';
    755787    }
     
    757789    {
    758790        $link = 'http://www.lobobrowser.org/';
    759         $title = wpua_detect_browser_version('Lobo');
     791        $title = 'Lobo';
    760792        $code = 'lobo';
    761793    }
     
    763795    {
    764796        $link = 'http://www.lolifox.com/';
    765         $title = wpua_detect_browser_version('lolifox');
     797        $title = 'lolifox';
    766798        $code = 'lolifox';
    767799    }
     
    769801    {
    770802        $link = 'http://news.softpedia.com/news/Firefox-Codenamed-Lorentz-Drops-in-March-2010-130855.shtml';
    771         $title = wpua_detect_browser_version('Lorentz');
     803        $title = 'Lorentz';
    772804        $code = 'firefoxdevpre';
    773805    }
     
    776808        $link = 'http://luakit.org/';
    777809        $title = 'luakit';
     810        $version = '';
    778811        $code = 'luakit';
    779812    }
     
    781814    {
    782815        $link = 'http://www.lunascape.tv';
    783         $title = wpua_detect_browser_version('Lunascape');
     816        $title = 'Lunascape';
    784817        $code = 'lunascape';
    785818    }
     
    787820    {
    788821        $link = 'http://lynx.browser.org/';
    789         $title = wpua_detect_browser_version('Lynx');
     822        $title = 'Lynx';
    790823        $code = 'lynx';
    791824    }
     
    793826    {
    794827        $link = 'http://en.wikipedia.org/wiki/Madfox';
    795         $title = wpua_detect_browser_version('Madfox');
     828        $title = 'Madfox';
    796829        $code = 'madfox';
    797830    }
     
    799832    {
    800833        $link = 'http://maemo.nokia.com/features/maemo-browser/';
    801         $title = wpua_detect_browser_version('Maemo Browser');
     834        $title = 'Maemo Browser';
    802835        $code = 'maemo';
    803836    }
     
    805838    {
    806839        $link = 'http://www.maxthon.com/';
    807         $title = wpua_detect_browser_version('Maxthon');
     840        $title = 'Maxthon';
    808841        $code = 'maxthon';
    809842    }
     
    811844    {
    812845        $link = 'http://www.motorola.com/content.jsp?globalObjectId=1827-4343';
    813         $title = wpua_detect_browser_version('MIB');
     846        $title = 'MIB';
    814847        $code = 'mib';
    815848    }
     
    817850    {
    818851        $link = 'http://browser.garage.maemo.org/';
    819         $title = wpua_detect_browser_version('Tablet browser');
     852        $title = 'MicroB';
     853        $version = wpua_detect_browser_version('Tablet browser');
    820854        $code = 'microb';
    821855    }
     
    823857    {
    824858        $link = 'http://www.twotoasts.de/index.php?/pages/midori_summary.html';
    825         $title = wpua_detect_browser_version('Midori');
     859        $title = 'Midori';
    826860        $code = 'midori';
    827861    }
     
    829863    {
    830864        $link = 'http://www.mozilla.org/projects/minefield/';
    831         $title = wpua_detect_browser_version('Minefield');
     865        $title = 'Minefield';
    832866        $code = 'minefield';
    833867    }
     
    835869    {
    836870        $link = 'http://dmkho.tripod.com/';
    837         $title = wpua_detect_browser_version('MiniBrowser');
     871        $title = 'MiniBrowser';
    838872        $code = 'minibrowser';
    839873    }
     
    841875    {
    842876        $link = 'http://www-archive.mozilla.org/projects/minimo/';
    843         $title = wpua_detect_browser_version('Minimo');
     877        $title = 'Minimo';
    844878        $code = 'minimo';
    845879    }
     
    847881    {
    848882        $link = 'http://en.wikipedia.org/wiki/Mosaic_(web_browser)';
    849         $title = wpua_detect_browser_version('Mosaic');
     883        $title = 'Mosaic';
    850884        $code = 'mosaic';
    851885    }
     
    853887    {
    854888        $link = 'http://www.mozilla.org/projects/devpreview/releasenotes/';
    855         $title = wpua_detect_browser_version('MozillaDeveloperPreview');
     889        $title = 'Mozilla Developer Preview';
     890        $version = wpua_detect_browser_version('MozillaDeveloperPreview');
    856891        $code = 'firefoxdevpre';
    857892    }
     
    860895        $link = 'http://browser.qq.com/';
    861896        $title = 'QQbrowser';
     897        $version = '';
    862898        $code = 'qqbrowser';
    863899    }
     
    865901    {
    866902        $link = 'http://www.multibrowser.de/';
    867         $title = wpua_detect_browser_version('Multi-Browser');
     903        $title = 'Multi-Browser XP';
     904        $version = wpua_detect_browser_version('Multi-Browser');
    868905        $code = 'multi-browserxp';
    869906    }
     
    871908    {
    872909        $link = 'http://multizilla.mozdev.org/';
    873         $title = wpua_detect_browser_version('MultiZilla');
     910        $title = 'MultiZilla';
    874911        $code = 'mozilla';
    875912    }
     
    877914    {
    878915        $link = 'http://usa.maxthon.com/mxnitro/';
    879         $title = wpua_detect_browser_version('MxNitro');
     916        $title = 'MxNitro';
    880917        $code = 'mxnitro';
    881918    }
     
    884921    {
    885922        $link = 'http://myinternetbrowser.webove-stranky.org/';
    886         $title = wpua_detect_browser_version('myibrow');
     923        $title = 'myibrow';
    887924        $code = 'my-internet-browser';
    888925    }
     
    890927    {
    891928        $link = 'http://www.myie2.com/';
    892         $title = wpua_detect_browser_version('MyIE2');
     929        $title = 'MyIE2';
    893930        $code = 'myie2';
    894931    }
     
    896933    {
    897934        $link = 'https://wiki.mozilla.org/Firefox/Namoroka';
    898         $title = wpua_detect_browser_version('Namoroka');
     935        $title = 'Namoroka';
    899936        $code = 'firefoxdevpre';
    900937    }
     
    902939    {
    903940        $link = 'http://netscape.aol.com/';
    904         $title = 'Netscape '.wpua_detect_browser_version('Navigator');
     941        $title = 'Netscape Navigator';
     942        $version = wpua_detect_browser_version('Navigator');
    905943        $code = 'netscape';
    906944    }
     
    908946    {
    909947        $link = 'http://www.netgem.com/';
    910         $title = wpua_detect_browser_version('NetBox');
     948        $title = 'NetBox';
    911949        $code = 'netbox';
    912950    }
     
    914952    {
    915953        $link = 'http://www.netcaptor.com/';
    916         $title = wpua_detect_browser_version('NetCaptor');
     954        $title = 'NetCaptor';
    917955        $code = 'netcaptor';
    918956    }
     
    920958    {
    921959        $link = 'http://gl.access-company.com/files/legacy/products/nflife/app_browser2.html';
    922         $title = wpua_detect_browser_version('NetFrontLifeBrowser');
     960        $title = 'NetFront Life';
     961        $version = wpua_detect_browser_version('NetFrontLifeBrowser');
    923962        $code = 'netfrontlife';
    924963    }
     
    926965    {
    927966        $link = 'http://www.access-company.com/';
    928         $title = wpua_detect_browser_version('NetFront');
     967        $title = 'NetFront';
    929968        $code = 'netfront';
    930969    }
     
    932971    {
    933972        $link = 'http://www.newsgator.com/individuals/netnewswire/';
    934         $title = wpua_detect_browser_version('NetNewsWire');
     973        $title = 'NetNewsWire';
    935974        $code = 'netnewswire';
    936975    }
     
    938977    {
    939978        $link = 'http://en.wikipedia.org/wiki/NetPositive';
    940         $title = wpua_detect_browser_version('NetPositive');
     979        $title = 'NetPositive';
    941980        $code = 'netpositive';
    942981    }
     
    944983    {
    945984        $link = 'http://netscape.aol.com/';
    946         $title = wpua_detect_browser_version('Netscape');
     985        $title = 'Netscape';
    947986        $code = 'netscape';
    948987    }
     
    950989    {
    951990        $link = 'http://www.netsurf-browser.org/';
    952         $title = wpua_detect_browser_version('NetSurf');
     991        $title = 'NetSurf';
    953992        $code = 'netsurf';
    954993    }
     
    956995    {
    957996        $link = 'http://www.access-company.com/';
    958         $title = wpua_detect_browser_version('NF-Browser');
     997        $title = 'NetFront';
     998        $version = wpua_detect_browser_version('NF-Browser');
    959999        $code = 'netfront';
    9601000    }
     
    9621002    {
    9631003        $link = 'http://ninesky.com/';
    964         $title = wpua_detect_browser_version('Ninesky-android-mobile');
     1004        $title = 'Ninesky';
     1005        $version = wpua_detect_browser_version('Ninesky-android-mobile');
    9651006        $code = 'ninesky';
    9661007    }
     
    9691010        $link = 'http://en.wikipedia.org/wiki/Internet_Browser_(Nintendo_3DS)';
    9701011        $title = 'Nintendo 3DS';
     1012        $version = '';
    9711013        $code = 'nintendo3dsbrowser';
    9721014    }
     
    9741016    {
    9751017        $link = 'http://www.netsurf-browser.org/';
    976         $title = 'Nintendo '.wpua_detect_browser_version('Browser');
     1018        $title = 'Nintendo Browser';
     1019        $version = wpua_detect_browser_version('Browser');
    9771020        $code = 'nintendobrowser';
    9781021    }
     
    9801023    {
    9811024        $link = 'http://browser.nokia.com/';
    982         $title = 'Nokia '.wpua_detect_browser_version('Browser');
     1025        $title = 'Nokia Browser';
     1026        $version = wpua_detect_browser_version('Browser');
    9831027        $code = 'nokia';
    9841028    }
     
    9861030    {
    9871031        $link = 'http://www.novarra.com/';
    988         $title = 'Novarra '.wpua_detect_browser_version('Vision');
     1032        $title = 'Novarra Vision';
     1033        $version = wpua_detect_browser_version('Vision');
    9891034        $code = 'novarra';
    9901035    }
     
    9921037    {
    9931038        $link = 'http://en.wikipedia.org/wiki/Obigo_Browser';
    994         $title = wpua_detect_browser_version('Obigo');
     1039        $title = 'Obigo';
    9951040        $code = 'obigo';
    9961041    }
     
    9991044        $link = 'http://www.offbyone.com/';
    10001045        $title = 'Off By One';
     1046        $version = '';
    10011047        $code = 'offbyone';
    10021048    }
     
    10041050    {
    10051051        $link = 'http://www.omnigroup.com/applications/omniweb/';
    1006         $title = wpua_detect_browser_version('OmniWeb');
     1052        $title = 'OmniWeb';
    10071053        $code = 'omniweb';
    10081054    }
     
    10101056    {
    10111057        $link = 'http://one-browser.com/';
    1012         $title = wpua_detect_browser_version('OneBrowser');
     1058        $title = 'OneBrowser';
    10131059        $code = 'onebrowser';
    10141060    }
     
    10161062    {
    10171063        $link = 'http://www.opera.com/mini/';
    1018         $title = wpua_detect_browser_version('Opera Mini');
     1064        $title = 'Opera Mini';
    10191065        $code = 'opera-2';
    10201066    }
     
    10221068    {
    10231069        $link = 'http://www.opera.com/mobile/';
    1024         $title = wpua_detect_browser_version('Opera Mobi');
     1070        if (preg_match('/Version/i', $useragent))
     1071        {
     1072            $version = wpua_detect_browser_version('Version');
     1073        }
     1074        else
     1075        {
     1076            $version = wpua_detect_browser_version('Opera Mobi');
     1077        }
     1078        $title = 'Opera Mobile';
    10251079        $code = 'opera-2';
    10261080    }
    1027     elseif (preg_match('/Opera Labs/i', $useragent)
    1028         || (preg_match('/Opera/i', $useragent)
    1029             && preg_match('/Edition Labs/i', $useragent)))
    1030     {
    1031         $link = 'http://labs.opera.com/';
    1032         $title = wpua_detect_browser_version('Opera Labs');
    1033         $code = 'opera-next';
    1034     }
    1035     elseif (preg_match('/Opera Next/i', $useragent)
    1036         || (preg_match('/Opera/i', $useragent)
    1037             && preg_match('/Edition Next/i', $useragent)))
    1038     {
    1039         $link = 'http://www.opera.com/support/kb/view/991/';
    1040         $title = wpua_detect_browser_version('Opera Next');
    1041         $code = 'opera-next';
    1042     }
    1043     elseif (preg_match('/Opera/i', $useragent))
     1081    elseif (preg_match('/Opera/i', $useragent)
     1082        || preg_match('/OPR/i', $useragent))
    10441083    {
    10451084        $link = 'http://www.opera.com/';
    1046         $title = wpua_detect_browser_version('Opera');
     1085        $title = 'Opera';
    10471086        $code = 'opera-1';
     1087
     1088        // How is version stored on this Opera ua?
    10481089        if (preg_match('/Version/i', $useragent))
     1090        {
    10491091            $code = 'opera-2';
    1050     }
    1051     elseif (preg_match('/OPR/i', $useragent))
    1052     {
    1053         $link = 'http://www.opera.com/';
    1054         if (preg_match('/(Edition Next)/i', $useragent))
    1055         {
    1056             $title = wpua_detect_browser_version('Opera Next');
    1057             $code = 'opera-next';
    1058         }
    1059         elseif (preg_match('/(Edition Developer)/i', $useragent))
    1060         {
    1061             $title = wpua_detect_browser_version('Opera Developer');
    1062             $code = 'opera-developer';
     1092            $version = wpua_detect_browser_version('Version');
     1093        }
     1094        elseif (preg_match('/OPR/i', $useragent))
     1095        {
     1096            $code = 'opera-2';
     1097            $version = wpua_detect_browser_version('OPR');
    10631098        }
    10641099        else
    10651100        {
    1066             $title = wpua_detect_browser_version('Opera');
    1067             $code = 'opera-1';
     1101            // Use Opera as fallback since full title may change (Next, Developer, etc.)
     1102            $version = wpua_detect_browser_version('Opera');
     1103        }
     1104
     1105        // Is this one with a known alternate icon?
     1106        if (preg_match('/Opera Labs/i', $useragent)
     1107            || preg_match('/Edition Labs/i', $useragent))
     1108        {
     1109            $code = 'opera-2-next';
     1110        }
     1111        elseif (preg_match('/Opera Next/i', $useragent)
     1112            || preg_match('/Edition Next/i', $useragent))
     1113        {
     1114            $code = 'opera-2-next';
     1115        }
     1116        elseif (preg_match('/Opera Developer/i', $useragent)
     1117            || preg_match('/Edition Developer/i', $useragent))
     1118        {
     1119            $code = 'opera-2-developer';
     1120        }
     1121
     1122        // Parse full edition name, ex: Opera/9.80 (X11; Linux x86_64; U; Edition Labs Camera and Pages; Ubuntu/11.10; en) Presto/2.9.220 Version/12.00
     1123        if (preg_match('/Edition ([\ ._0-9a-zA-Z]+)/i', $useragent, $regmatch))
     1124        {
     1125            $title .= ' '.$regmatch[1];
     1126        }
     1127        elseif (preg_match('/Opera ([\ ._0-9a-zA-Z]+)/i', $useragent, $regmatch))
     1128        {
     1129            $title .= ' '.$regmatch[1];
     1130        }
     1131
     1132        // Use the newest icon?
     1133        if (isset($version) && intval($version) > 13)
     1134        {
     1135            $code = 'opera-3';
    10681136        }
    10691137    }
     
    10711139    {
    10721140        $link = 'http://www.orcabrowser.com/';
    1073         $title = wpua_detect_browser_version('Orca');
     1141        $title = 'Orca';
    10741142        $code = 'orca';
    10751143    }
     
    10771145    {
    10781146        $link = 'http://en.wikipedia.org/wiki/Oregano_(web_browser)';
    1079         $title = wpua_detect_browser_version('Oregano');
     1147        $title = 'Oregano';
    10801148        $code = 'oregano';
    10811149    }
     
    10841152        $link = 'http://www.sand-labs.org/owb';
    10851153        $title = 'Oregano Web Browser';
     1154        $version = '';
    10861155        $code = 'owb';
    10871156    }
     
    10891158    {
    10901159        $link = 'http://gtk-webcore.sourceforge.net/';
    1091         $title = wpua_detect_browser_version('osb-browser');
     1160        $version = wpua_detect_browser_version('osb-browser');
     1161        $title = 'Gtk+ WebCore';
    10921162        $code = 'null';
    10931163    }
     
    10951165    {
    10961166        $link = 'http://otter-browser.org/';
    1097         $title = wpua_detect_browser_version('Otter');
     1167        $title = 'Otter';
    10981168        $code = 'otter';
    10991169    }
     
    11011171    {
    11021172        $link = 'http://www.palm.com/us/products/phones/pre/index.html';
    1103         $title = 'Palm '.wpua_detect_browser_version('Pre');
     1173        if (preg_match('/Version/i', $useragent))
     1174        {
     1175            $version = wpua_detect_browser_version('Version');
     1176        }
     1177        else
     1178        {
     1179            $version = wpua_detect_browser_version('Pre');
     1180        }
     1181        $title = 'Palm';
    11041182        $code = 'palmpre';
    11051183    }
     
    11071185    {
    11081186        $link = 'http://www.hpwebos.com/us/support/handbooks/tungstent/webbrowser_hb.pdf';
    1109         $title = 'Palm '.wpua_detect_browser_version('WebPro');
     1187        $title = 'Palm WebPro';
     1188        $version = wpua_detect_browser_version('WebPro');
    11101189        $code = 'palmwebpro';
    11111190    }
     
    11131192    {
    11141193        $link = 'http://www.palemoon.org/';
    1115         $title = 'Pale '.wpua_detect_browser_version('Moon');
     1194        $title = 'Pale Moon';
     1195        $version = wpua_detect_browser_version('Moon');
    11161196        $code = 'palemoon';
    11171197    }
     
    11191199    {
    11201200        $link = 'http://madgroup.x10.mx/patriott1.php';
    1121         $title = 'Patriott '.wpua_detect_browser_version('Browser');
     1201        $title = 'Patriott Browser';
     1202        $version = wpua_detect_browser_version('Browser');
    11221203        $code = 'patriott';
    11231204    }
     
    11251206    {
    11261207        $link = 'http://www.perk.com/';
    1127         $title = wpua_detect_browser_version('Perk');
     1208        $title = 'Perk';
    11281209        $code = 'perk';
    11291210    }
     
    11321213        $link = 'http://www.phaseout.net/';
    11331214        $title = 'Phaseout';
     1215        $version = '';
    11341216        $code = 'phaseout';
    11351217    }
     
    11371219    {
    11381220        $link = 'http://www.mozilla.org/projects/phoenix/phoenix-release-notes.html';
    1139         $title = wpua_detect_browser_version('Phoenix');
     1221        $title = 'Phoenix';
    11401222        $code = 'phoenix';
    11411223    }
     
    11441226        $link = 'http://us.playstation.com/';
    11451227        $title = 'PS4 Web Browser';
     1228        $version = '';
    11461229        $code = 'webkit';
    11471230    }
     
    11491232    {
    11501233        $link = 'http://www.podkicker.com/';
    1151         $title = wpua_detect_browser_version('Podkicker');
     1234        $title = 'Podkicker';
    11521235        $code = 'podkicker';
    11531236    }
     
    11551238    {
    11561239        $link = 'http://www.podkicker.com/';
    1157         $title = wpua_detect_browser_version('Podkicker Pro');
     1240        $title = 'Podkicker Pro';
    11581241        $code = 'podkicker';
    11591242    }
     
    11611244    {
    11621245        $link = 'http://en.wikipedia.org/wiki/AT%26T_Pogo';
    1163         $title = wpua_detect_browser_version('Pogo');
     1246        $title = 'Pogo';
    11641247        $code = 'pogo';
    11651248    }
     
    11671250    {
    11681251        $link = 'http://www.infraware.co.kr/eng/01_product/product02.asp';
    1169         $title = wpua_detect_browser_version('Polaris');
     1252        $title = 'Polaris';
    11701253        $code = 'polaris';
    11711254    }
     
    11731256    {
    11741257        $link = 'http://polarityweb.webs.com/';
    1175         $title = wpua_detect_browser_version('Polarity');
     1258        $title = 'Polarity';
    11761259        $code = 'polarity';
    11771260    }
     
    11791262    {
    11801263        $link = 'http://prism.mozillalabs.com/';
    1181         $title = wpua_detect_browser_version('Prism');
     1264        $title = 'Prism';
    11821265        $code = 'prism';
    11831266    }
     
    11851268    {
    11861269        $link = 'http://www.puffinbrowser.com/';
    1187         $title = wpua_detect_browser_version('Puffin');
     1270        $title = 'Puffin';
    11881271        $code = 'puffin';
    11891272    }
     
    11911274    {
    11921275        $link = 'http://www.qtweb.net/';
    1193         $title = 'QtWeb Internet '.wpua_detect_browser_version('Browser');
     1276        $title = 'QtWeb Internet Browser';
     1277        $version = wpua_detect_browser_version('Browser');
    11941278        $code = 'qtwebinternetbrowser';
    11951279    }
     
    11971281    {
    11981282        $link = 'http://www.qupzilla.com/';
    1199         $title = wpua_detect_browser_version('QupZilla');
     1283        $title = 'QupZilla';
    12001284        $code = 'qupzilla';
    12011285    }
     
    12031287    {
    12041288        $link = 'http://soft.rambler.ru/browser/';
    1205         $title = wpua_detect_browser_version('Nichrome\/self');
     1289        $version = wpua_detect_browser_version('Nichrome\/self');
     1290        $title = 'Rambler browser';
    12061291        $code = 'ramblerbrowser';
    12071292    }
     
    12101295        $link = 'http://rekonq.sourceforge.net/';
    12111296        $title = 'rekonq';
     1297        $version = '';
    12121298        $code = 'rekonq';
    12131299    }
     
    12151301    {
    12161302        $link = 'http://retawq.sourceforge.net/';
    1217         $title = wpua_detect_browser_version('retawq');
     1303        $title = 'retawq';
    12181304        $code = 'terminal';
    12191305    }
     
    12211307    {
    12221308        $link = 'http://www.runecats.com/roccat.html';
    1223         $title = wpua_detect_browser_version('Roccat');
     1309        $title = 'Roccat';
    12241310        $code = 'roccatbrowser';
    12251311    }
     
    12271313    {
    12281314        $link = 'http://www.rockmelt.com/';
    1229         $title = wpua_detect_browser_version('RockMelt');
     1315        $title = 'RockMelt';
    12301316        $code = 'rockmelt';
    12311317    }
     
    12331319    {
    12341320        $link = 'http://sourceforge.net/projects/ryouko/';
    1235         $title = wpua_detect_browser_version('Ryouko');
     1321        $title = 'Ryouko';
    12361322        $code = 'ryouko';
    12371323    }
     
    12401326        $link = 'http://www.saayaa.com/';
    12411327        $title = 'SaaYaa Explorer';
     1328        $version = '';
    12421329        $code = 'saayaa';
    12431330    }
     
    12451332    {
    12461333        $link = 'http://www.seamonkey-project.org/';
    1247         $title = wpua_detect_browser_version('SeaMonkey');
     1334        $title = 'SeaMonkey';
    12481335        $code = 'seamonkey';
    12491336    }
     
    12511338    {
    12521339        $link = 'http://www.sonyericsson.com/';
    1253         $title = wpua_detect_browser_version('SEMC-Browser');
     1340        $title = 'SEMC Browser';
     1341        $version = wpua_detect_browser_version('SEMC-Browser');
    12541342        $code = 'semcbrowser';
    12551343    }
     
    12571345    {
    12581346        $link = 'http://www.sonyericsson.com/';
    1259         $title = wpua_detect_browser_version('SEMC-java');
     1347        $title = 'SEMC-java';
    12601348        $code = 'semcbrowser';
    12611349    }
     
    12641352    {
    12651353        $link = 'http://en.wikipedia.org/wiki/Web_Browser_for_S60';
    1266         $title = 'Nokia '.wpua_detect_browser_version('Series60');
     1354        $title = 'Nokia Series60';
     1355        $version = wpua_detect_browser_version('Series60');
    12671356        $code = 's60';
    12681357    }
     
    12711360    {
    12721361        $link = 'http://en.wikipedia.org/wiki/Web_Browser_for_S60';
    1273         $title = 'Nokia '.wpua_detect_browser_version('S60');
     1362        $title = 'Nokia S60';
     1363        $version = wpua_detect_browser_version('S60');
    12741364        $code = 's60';
    12751365    }
     
    12791369        $link = 'http://ie.sogou.com/';
    12801370        $title = 'Sogou Explorer';
     1371        $version = '';
    12811372        $code = 'sogou';
    12821373    }
     
    12841375    {
    12851376        $link = 'http://www.seznam.cz/prohlizec';
    1286         $title = 'Seznam.'.wpua_detect_browser_version('cz');
     1377        $title = 'Seznam.cz';
     1378        $version = wpua_detect_browser_version('cz');
    12871379        $code = 'seznam-cz';
    12881380    }
     
    12901382    {
    12911383        $link = 'http://www.shiira.jp/en.php';
    1292         $title = wpua_detect_browser_version('Shiira');
     1384        $title = 'Shiira';
    12931385        $code = 'shiira';
    12941386    }
     
    12961388    {
    12971389        $link = 'http://www.mozilla.org/';
    1298         $title = wpua_detect_browser_version('Shiretoko');
     1390        $title = 'Shiretoko';
    12991391        $code = 'firefoxdevpre';
    13001392    }
     
    13031395    {
    13041396        $link = 'http://en.wikipedia.org/wiki/Amazon_Silk';
    1305         $title = 'Amazon '.wpua_detect_browser_version('Silk');
     1397        $title = 'Amazon Silk';
     1398        $version = wpua_detect_browser_version('Silk');
    13061399        $code = 'silk';
    13071400    }
     
    13091402    {
    13101403        $link = 'http://www.sitekiosk.com/SiteKiosk/Default.aspx';
    1311         $title = wpua_detect_browser_version('SiteKiosk');
     1404        $title = 'SiteKiosk';
    13121405        $code = 'sitekiosk';
    13131406    }
     
    13151408    {
    13161409        $link = 'http://www.muhri.net/skipstone/';
    1317         $title = wpua_detect_browser_version('SkipStone');
     1410        $title = 'SkipStone';
    13181411        $code = 'skipstone';
    13191412    }
     
    13211414    {
    13221415        $link = 'http://www.skyfire.com/';
    1323         $title = wpua_detect_browser_version('Skyfire');
     1416        $title = 'Skyfire';
    13241417        $code = 'skyfire';
    13251418    }
     
    13271420    {
    13281421        $link = 'http://www.fenrir-inc.com/other/sleipnir/';
    1329         $title = wpua_detect_browser_version('Sleipnir');
     1422        $title = 'Sleipnir';
    13301423        $code = 'sleipnir';
    13311424    }
     
    13331426    {
    13341427        $link = 'http://slimboat.com/';
    1335         $title = wpua_detect_browser_version('SlimBoat');
     1428        $title = 'SlimBoat';
    13361429        $code = 'slimboat';
    13371430    }
     
    13391432    {
    13401433        $link = 'http://www.flashpeak.com/sbrowser/';
    1341         $title = wpua_detect_browser_version('SlimBrowser');
     1434        $title = 'SlimBrowser';
    13421435        $code = 'slimbrowser';
    13431436    }
     
    13451438    {
    13461439        $link = 'http://www.freethetvchallenge.com/details/faq';
    1347         $title = wpua_detect_browser_version('SmartTV');
     1440        $title = 'Maple Browser';
     1441        $version = wpua_detect_browser_version('WebBrowser');
    13481442        $code = 'maplebrowser';
    13491443    }
     
    13511445    {
    13521446        $link = 'http://www.getsongbird.com/';
    1353         $title = wpua_detect_browser_version('Songbird');
     1447        $title = 'Songbird';
    13541448        $code = 'songbird';
    13551449    }
     
    13571451    {
    13581452        $link = 'http://www.stainlessapp.com/';
    1359         $title = wpua_detect_browser_version('Stainless');
     1453        $title = 'Stainless';
    13601454        $code = 'stainless';
    13611455    }
     
    13631457    {
    13641458        $link = 'http://itunes.apple.com/us/app/substream/id389906706?mt=8';
    1365         $title = wpua_detect_browser_version('SubStream');
     1459        $title = 'SubStream';
    13661460        $code = 'substream';
    13671461    }
     
    13691463    {
    13701464        $link = 'http://www.flock.com/';
    1371         $title = 'Flock '.wpua_detect_browser_version('Sulfur');
     1465        $title = 'Flock Sulfur';
     1466        $version = wpua_detect_browser_version('Sulfur');
    13721467        $code = 'flock';
    13731468    }
     
    13751470    {
    13761471        $link = 'http://digola.com/sundance.html';
    1377         $title = wpua_detect_browser_version('Sundance');
     1472        $title = 'Sundance';
    13781473        $code = 'sundance';
    13791474    }
     
    13811476    {
    13821477        $link = 'http://www.sundialbrowser.com/';
    1383         $title = wpua_detect_browser_version('Sundial');
     1478        $title = 'Sundial';
    13841479        $code = 'sundial';
    13851480    }
     
    13871482    {
    13881483        $link = 'http://www.sunrisebrowser.com/';
    1389         $title = wpua_detect_browser_version('Sunrise');
     1484        $title = 'Sunrise';
    13901485        $code = 'sunrise';
    13911486    }
     
    13931488    {
    13941489        $link = 'http://superbird.me/';
    1395         $title = wpua_detect_browser_version('Superbird');
     1490        $title = 'Superbird';
    13961491        $code = 'superbird';
    13971492    }
     
    13991494    {
    14001495        $link = 'http://surf.suckless.org/';
    1401         $title = wpua_detect_browser_version('Surf');
     1496        $title = 'Surf';
    14021497        $code = 'surf';
    14031498    }
     
    14051500    {
    14061501        $link = 'http://www.getswiftfox.com/';
    1407         $title = wpua_detect_browser_version('Swiftfox');
     1502        $title = 'Swiftfox';
    14081503        $code = 'swiftfox';
    14091504    }
     
    14111506    {
    14121507        $link = 'http://swiftweasel.tuxfamily.org/';
    1413         $title = wpua_detect_browser_version('Swiftweasel');
     1508        $title = 'Swiftweasel';
    14141509        $code = 'swiftweasel';
    14151510    }
     
    14171512    {
    14181513        $link = 'http://dombla.net/sylera/';
    1419         $title = wpua_detect_browser_version('Sylera');
     1514        $title = 'Sylera';
    14201515        $code = 'null';
    14211516    }
     
    14241519        $link = 'http://wiki.maemo.org/Tear';
    14251520        $title = 'Tear';
     1521        $version = '';
    14261522        $code = 'tear';
    14271523    }
     
    14291525    {
    14301526        $link = 'http://www.teashark.com/';
    1431         $title = wpua_detect_browser_version('TeaShark');
     1527        $title = 'TeaShark';
    14321528        $code = 'teashark';
    14331529    }
     
    14351531    {
    14361532        $link = 'http://en.wikipedia.org/wiki/Obigo_Browser/';
    1437         $title = wpua_detect_browser_version(' Teleca');
     1533        $title = ' Teleca';
    14381534        $code = 'obigo';
    14391535    }
    1440     elseif (preg_match('/TencentTraveler/i', $useragent))
    1441     {
    1442         $link = 'http://www.tencent.com/en-us/index.shtml';
    1443         $title = 'Tencent '.wpua_detect_browser_version('Traveler');
    1444         $code = 'tencenttraveler';
    1445     }
    14461536    elseif (preg_match('/TenFourFox/i', $useragent))
    14471537    {
    14481538        $link = 'http://en.wikipedia.org/wiki/TenFourFox';
    1449         $title = wpua_detect_browser_version('TenFourFox');
     1539        $title = 'TenFourFox';
     1540        $version = wpua_detect_browser_version(' rv');
    14501541        $code = 'tenfourfox';
    14511542    }
     
    14541545        $link = 'http://www.teslamotors.com/';
    14551546        $title = 'Tesla Car Browser';
     1547        $version = '';
    14561548        $code = 'teslacarbrowser';
    14571549    }
     
    14601552        $link = 'http://www.ioage.com/';
    14611553        $title = 'TheWorld Browser';
     1554        $version = '';
    14621555        $code = 'theworld';
    14631556    }
     
    14651558    {
    14661559        $link = 'http://www.mozilla.com/thunderbird/';
    1467         $title = wpua_detect_browser_version('Thunderbird');
     1560        $title = 'Thunderbird';
    14681561        $code = 'thunderbird';
    14691562    }
     
    14711564    {
    14721565        $link = 'https://www.tizen.org/';
    1473         $title = wpua_detect_browser_version('Tizen');
     1566        $title = 'Tizen';
    14741567        $code = 'tizen';
    14751568    }
     
    14771570    {
    14781571        $link = 'http://www.tjusig.cz/';
    1479         $title = wpua_detect_browser_version('Tjusig');
     1572        $title = 'Tjusig';
    14801573        $code = 'tjusig';
    14811574    }
     
    14831576    {
    14841577        $link = 'http://tt.qq.com/';
    1485         $title = wpua_detect_browser_version('TencentTraveler');
     1578        $title = 'TT Explorer';
     1579        $version = wpua_detect_browser_version('TencentTraveler');
    14861580        $code = 'tt-explorer';
    14871581    }
     
    14891583    {
    14901584        $link = 'http://www.ubrowser.com/';
    1491         $title = wpua_detect_browser_version('uBrowser');
     1585        $title = 'uBrowser';
    14921586        $code = 'ubrowser';
    14931587    }
     
    14971591        $link = 'https://launchpad.net/webbrowser-app';
    14981592        $title = 'Ubuntu Web Browser';
     1593        $version = '';
    14991594        $code = 'ubuntuwebbrowser';
    15001595    }
     
    15021597    {
    15031598        $link = 'http://www.uc.cn/English/index.shtml';
    1504         $title = wpua_detect_browser_version('UC Browser');
     1599        $title = 'UC Browser';
     1600        $version = wpua_detect_browser_version('UC Browse');
    15051601        $code = 'ucbrowser';
    15061602    }
     
    15081604    {
    15091605        $link = 'http://www.ucweb.com/English/product.shtml';
    1510         $title = wpua_detect_browser_version('UCWEB');
     1606        $title = 'UC Browser';
     1607        $version = wpua_detect_browser_version('UCWEB');
    15111608        $code = 'ucweb';
    15121609    }
     
    15141611    {
    15151612        $link = 'http://www.ultrabrowser.com/';
    1516         $title = wpua_detect_browser_version('UltraBrowser');
     1613        $title = 'UltraBrowser';
    15171614        $code = 'ultrabrowser';
    15181615    }
     
    15201617    {
    15211618        $link = 'http://www.openwave.com/';
    1522         $title = wpua_detect_browser_version('UP.Browser');
     1619        $title = 'Openwave Mobile Browser';
     1620        $version = wpua_detect_browser_version('UP.Browser');
    15231621        $code = 'openwave';
    15241622    }
     
    15261624    {
    15271625        $link = 'http://www.openwave.com/';
    1528         $title = wpua_detect_browser_version('UP.Link');
     1626        $title = 'Openwave Mobile Browser';
     1627        $version = wpua_detect_browser_version('UP.Link');
    15291628        $code = 'openwave';
    15301629    }
     
    15321631    {
    15331632        $link = 'http://www.usejump.com/';
    1534         $title = wpua_detect_browser_version('Usejump');
     1633        $title = 'Usejump';
    15351634        $code = 'usejump';
    15361635    }
     
    15381637    {
    15391638        $link = 'http://en.wikipedia.org/wiki/UZard_Web';
    1540         $title = wpua_detect_browser_version('uZardWeb');
     1639        $title = 'uZardWeb';
    15411640        $code = 'uzardweb';
    15421641    }
     
    15441643    {
    15451644        $link = 'http://en.wikipedia.org/wiki/UZard_Web';
    1546         $title = wpua_detect_browser_version('uZard');
     1645        $title = 'uZard';
    15471646        $code = 'uzardweb';
    15481647    }
     
    15561655    {
    15571656        $link = 'http://vivaldi.com/';
    1558         $title = wpua_detect_browser_version('Vivaldi');
     1657        $title = 'Vivaldi';
    15591658        $code = 'vivaldi';
    15601659    }
     
    15621661    {
    15631662        $link = 'http://www.vimprobable.org/';
    1564         $title = wpua_detect_browser_version('Vimprobable');
     1663        $title = 'Vimprobable';
    15651664        $code = 'null';
    15661665    }
     
    15681667    {
    15691668        $link = 'http://zzo38computer.cjb.net/vonkeror/';
    1570         $title = wpua_detect_browser_version('Vonkeror');
     1669        $title = 'Vonkeror';
    15711670        $code = 'null';
    15721671    }
     
    15741673    {
    15751674        $link = 'http://w3m.sourceforge.net/';
    1576         $title = wpua_detect_browser_version('W3M');
     1675        $title = 'W3M';
    15771676        $code = 'w3m';
    15781677    }
     
    15811680    {
    15821681        $link = 'http://en.wikipedia.org/wiki/WebPositive';
    1583         $title = wpua_detect_browser_version('WebPositive');
     1682        $title = 'WebPositive';
    15841683        $code = 'webpositive';
    15851684    }
     
    15891688    {
    15901689        $link = 'http://developer.android.com/reference/android/webkit/package-summary.html';
    1591         $title = wpua_detect_browser_version('Android Webkit');
     1690        $title = 'Android Webkit';
     1691        $version = wpua_detect_browser_version('Version');
    15921692        $code = 'android-webkit';
    15931693    }
     
    15951695    {
    15961696        $link = 'http://www.waterfoxproject.org/';
    1597         $title = wpua_detect_browser_version('Waterfox');
     1697        $title = 'Waterfox';
    15981698        $code = 'waterfox';
    15991699    }
     
    16011701    {
    16021702        $link = 'http://webexplorerbrasil.com/';
    1603         $title = 'Web '.wpua_detect_browser_version('Explorer');
     1703        $title = 'Web Explorer';
     1704        $version = wpua_detect_browser_version('Explorer');
    16041705        $code = 'webexplorer';
    16051706    }
     
    16071708    {
    16081709        $link = 'http://webian.org/shell/';
    1609         $title = 'Webian '.wpua_detect_browser_version('Shell');
     1710        $title = 'Webian Shell';
     1711        $version = wpua_detect_browser_version('Shell');
    16101712        $code = 'webianshell';
    16111713    }
     
    16141716        $link = 'http://webrender.99k.org/';
    16151717        $title = 'Webrender';
     1718        $version = '';
    16161719        $code = 'webrender';
    16171720    }
     
    16191722    {
    16201723        $link = 'http://weltweitimnetz.de/software/Browser.en.page';
    1621         $title = 'Weltweitimnetz '.wpua_detect_browser_version('Browser');
     1724        $title = 'Weltweitimnetz Browser';
     1725        $version = wpua_detect_browser_version('Browser');
    16221726        $code = 'weltweitimnetzbrowser';
    16231727    }
     
    16261730        $link = 'http://www.app4mac.com/store/index.php?target=products&product_id=9';
    16271731        $title = 'wKiosk';
     1732        $version = '';
    16281733        $code = 'wkiosk';
    16291734    }
     
    16311736    {
    16321737        $link = 'http://www.w3.org/People/Berners-Lee/WorldWideWeb.html';
    1633         $title = wpua_detect_browser_version('WorldWideWeb');
     1738        $title = 'WorldWideWeb';
    16341739        $code = 'worldwideweb';
    16351740    }
     
    16381743    {
    16391744        $link = 'http://www.hp.com/';
    1640         $title = 'w'.wpua_detect_browser_version('OSBrowser');
     1745        $title = 'wOSBrowser';
     1746        $version = wpua_detect_browser_version('OSBrowser');
    16411747        $code = 'webos';
    16421748    }
     
    16441750    {
    16451751        $link = 'http://android.wordpress.org/';
    1646         $title = wpua_detect_browser_version('wp-android');
     1752        $version = wpua_detect_browser_version('wp-android'); //TODO check into Android version being returned
     1753        $title = 'Wordpress App';
    16471754        $code = 'wordpress';
    16481755    }
     
    16501757    {
    16511758        $link = 'http://blackberry.wordpress.org/';
    1652         $title = wpua_detect_browser_version('wp-blackberry');
     1759        $title = 'wp-blackberry';
    16531760        $code = 'wordpress';
    16541761    }
     
    16561763    {
    16571764        $link = 'http://ios.wordpress.org/';
    1658         $title = wpua_detect_browser_version('wp-iphone');
     1765        $title = 'Wordpress App';
     1766        $version = wpua_detect_browser_version('wp-iphone');
    16591767        $code = 'wordpress';
    16601768    }
     
    16621770    {
    16631771        $link = 'http://nokia.wordpress.org/';
    1664         $title = wpua_detect_browser_version('wp-nokia');
     1772        $title = 'wp-nokia';
    16651773        $code = 'wordpress';
    16661774    }
     
    16681776    {
    16691777        $link = 'http://webos.wordpress.org/';
    1670         $title = wpua_detect_browser_version('wp-webos');
     1778        $title = 'wp-webos';
    16711779        $code = 'wordpress';
    16721780    }
     
    16741782    {
    16751783        $link = 'http://windowsphone.wordpress.org/';
    1676         $title = wpua_detect_browser_version('wp-windowsphone');
     1784        $title = 'wp-windowsphone';
    16771785        $code = 'wordpress';
    16781786    }
     
    16801788    {
    16811789        $link = 'http://www.wyzo.com/';
    1682         $title = wpua_detect_browser_version('Wyzo');
     1790        $title = 'Wyzo';
    16831791        $code = 'Wyzo';
    16841792    }
     
    16861794    {
    16871795        $link = 'http://www.xsmiles.org/';
    1688         $title = wpua_detect_browser_version('X-Smiles');
     1796        $title = 'X-Smiles';
    16891797        $code = 'x-smiles';
    16901798    }
     
    16921800    {
    16931801        $link = '#';
    1694         $title = wpua_detect_browser_version('Xiino');
     1802        $title = 'Xiino';
    16951803        $code = 'null';
    16961804    }
     
    16981806    {
    16991807        $link = 'http://browser.yandex.com/';
    1700         $title = 'Yandex '.wpua_detect_browser_version('Browser');
     1808        $title = 'Yandex Browser';
     1809        $version = wpua_detect_browser_version('Browser');
    17011810        $code = 'yandex';
    17021811    }
     
    17041813    {
    17051814        $link = 'http://weblink.justyrc.com/';
    1706         $title = 'YRC '.wpua_detect_browser_version('Weblink');
     1815        $title = 'YRC Weblink';
     1816        $version = wpua_detect_browser_version('Weblink');
    17071817        $code = 'yrcweblink';
    17081818    }
     
    17101820    {
    17111821        $link = 'http://sites.google.com/site/zeromusparadoxe01/zbrowser';
    1712         $title = wpua_detect_browser_version('zBrowser');
     1822        $title = 'zBrowser';
    17131823        $code = 'zbrowser';
    17141824    }
     
    17161826    {
    17171827        $link = 'http://www.zipzaphome.com/';
    1718         $title = wpua_detect_browser_version('ZipZap');
     1828        $title = 'ZipZap';
    17191829        $code = 'zipzap';
    17201830    }
     
    17241834    {
    17251835        $link = 'http://abrowse.sourceforge.net/';
    1726         $title = wpua_detect_browser_version('ABrowse');
     1836        $title = 'ABrowse';
    17271837        $code = 'abrowse';
    17281838    }
     
    17321842    {
    17331843        $link = 'http://en.wikipedia.org/wiki/Microsoft_Edge';
    1734         $title = 'Microsoft '.wpua_detect_browser_version('Edge');
     1844        $title = 'Microsoft Edge';
     1845        $version = wpua_detect_browser_version('Edge');
    17351846        $code = 'msedge12';
    17361847    }
     
    17381849    {
    17391850        $link = 'http://google.com/chrome/';
    1740         $title = 'Google '.wpua_detect_browser_version('Chrome');
     1851        $title = 'Google Chrome';
     1852        $version = wpua_detect_browser_version('Chrome');
    17411853        $code = 'chrome';
    17421854    }
     
    17491861        if (preg_match('/Version/i', $useragent))
    17501862        {
    1751             $title = wpua_detect_browser_version('Safari');
     1863            $version = wpua_detect_browser_version('Version');
    17521864        }
    17531865
     
    17631875        $link = 'http://www.nokia.com/browser';
    17641876        $title = 'Nokia Web Browser';
     1877        $version = '';
    17651878        $code = 'maemo';
    17661879    }
     
    17681881    {
    17691882        $link = 'http://www.mozilla.org/';
    1770         $title = wpua_detect_browser_version('Firefox');
     1883        $title = 'Firefox';
    17711884        $code = 'firefox';
    17721885    }
     
    17741887    {
    17751888        $link = 'http://www.microsoft.com/windows/products/winfamily/ie/default.mspx';
    1776         $title = 'Internet Explorer'.wpua_detect_browser_version('MSIE');
    1777 
    1778         if (preg_match('/MSIE[\ |\/]?([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    1779         {
    1780             // We have IE10 or older
    1781         }
    1782         elseif (preg_match('/\ rv:([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    1783         {
    1784             // We have IE11 or newer
    1785         }
    1786 
    1787 
    1788         if ($regmatch[1] >= 10)
     1889        $title = 'Internet Explorer';
     1890
     1891        if (preg_match('/\ rv:([.0-9a-zA-Z]+)/i', $useragent))
     1892        {
     1893            // IE11 or newer
     1894            $version = wpua_detect_browser_version(' rv');
     1895        }
     1896        else
     1897        {
     1898            // IE10 or older, regex: '/MSIE[\ |\/]?([.0-9a-zA-Z]+)/i'
     1899            $version = wpua_detect_browser_version('MSIE');
     1900        }
     1901
     1902        if (intval($version) >= 10)
    17891903        {
    17901904            $code = 'msie10';
    17911905        }
    1792         elseif ($regmatch[1] >= 9)
     1906        elseif (intval($version) >= 9)
    17931907        {
    17941908            $code = 'msie9';
    17951909        }
    1796         elseif ($regmatch[1] >= 7)
     1910        elseif (intval($version) >= 7)
    17971911        {
    17981912            // also ie8
    17991913            $code = 'msie7';
    1800         }
    1801         elseif ($regmatch[1] >= 6)
     1914
     1915            // Detect compatibility mode for IE
     1916            if ($version === '7.0' && preg_match('/Trident\/4.0/i', $useragent))
     1917            {
     1918                $version = '8.0 (Compatibility Mode)'; // Fix for IE8 quirky UA string with Compatibility Mode enabled
     1919            }
     1920        }
     1921        elseif (intval($version) >= 6)
    18021922        {
    18031923            $code = 'msie6';
    18041924        }
    1805         elseif ($regmatch[1] >= 4)
     1925        elseif (intval($version) >= 4)
    18061926        {
    18071927            // also ie5
    18081928            $code = 'msie4';
    18091929        }
    1810         elseif ($regmatch[1] >= 3)
     1930        elseif (intval($version) >= 3)
    18111931        {
    18121932            $code = 'msie3';
    18131933        }
    1814         elseif ($regmatch[1] >= 2)
     1934        elseif (intval($version) >= 2)
    18151935        {
    18161936            $code = 'msie2';
    18171937        }
    1818         elseif ($regmatch[1] >= 1)
     1938        elseif (intval($version) >= 1)
    18191939        {
    18201940            $code = 'msie1';
     
    18281948    {
    18291949        $link = 'http://www.mozilla.org/';
    1830         $title = 'Mozilla Compatible';
    1831 
    1832         if (preg_match('/rv:([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    1833         {
    1834             $title = 'Mozilla '.$regmatch[1];
     1950        $title = 'Mozilla';
     1951        $version = wpua_detect_browser_version(' rv');
     1952
     1953        if (empty($version))
     1954        {
     1955            $title .= ' Compatible';
    18351956        }
    18361957
     
    18431964        $link = '#';
    18441965        $title = 'Unknown';
     1966        $version = '';
    18451967        $code = 'null';
     1968    }
     1969
     1970    // Set version if it hasn't been parsed yet (generic structure)...
     1971    if (is_null($version))
     1972    {
     1973        $version = wpua_detect_browser_version($title);
     1974    }
     1975
     1976    // Append version to title (as long as show version isn't 'off')
     1977    if ($wpua_show_version !== 'false')
     1978    {
     1979        $title .= " $version";
    18461980    }
    18471981
  • wp-useragent/trunk/wp-useragent-options.php

    r1415001 r1415915  
    9999            $wpua_text_on          = get_option('wpua_text_on');
    100100            $wpua_text_via         = get_option('wpua_text_via');
     101            $wpua_show_version     = get_option('wpua_show_version');
    101102            $wpua_text_links       = get_option('wpua_text_links');
    102103            $wpua_show_full_ua     = get_option('wpua_show_full_ua');
     
    155156                delete_option('ua_output_location');
    156157            }
     158            // Add new feature option for showing version to db if it didn't previously exist
     159            if (empty($wpua_show_version))
     160            {
     161                $wpua_show_version = 'full';
     162                if ( ! add_option( 'wpua_show_version', $wpua_show_version, '', 'no' ) ) update_option( 'wpua_show_version', $wpua_show_version );
     163            }
    157164
    158165            // Set defaults
     
    165172            if (empty($wpua_text_on) && is_null($wpua_text_on)) $wpua_text_on = '';
    166173            if (empty($wpua_text_via) && is_null($wpua_text_via)) $wpua_text_via = '';
     174            if (empty($wpua_show_version)) $wpua_show_version = 'full';
    167175            if (empty($wpua_text_links)) $wpua_text_links = 'false';
    168176            if (empty($wpua_show_full_ua)) $wpua_show_full_ua = 'true';
     
    295303                                            <input type="text" id="wpua_text_via" name="wpua_text_via" value="<?php echo $wpua_text_via; ?>" />
    296304                                            <p class="description"><?php _e('Displayed for Trackbacks and Pingbacks. Default value is empty.', 'wp-useragent'); ?></p>
     305                                        </td>
     306                                    </tr>
     307                                    <tr>
     308                                        <th><?php _e('Show version numbers', 'wp-useragent'); ?>:</th>
     309                                        <td>
     310                                            <select id="wpua_show_version" name="wpua_show_version">
     311                                                <option value="full" <?php if ($wpua_show_version === 'full') echo 'selected="selected"'; ?>><?php _e('Full', 'wp-useragent'); ?></option>
     312                                                <option value="simple" <?php if ($wpua_show_version === 'simple') echo 'selected="selected"'; ?>><?php _e('Simple', 'wp-useragent'); ?></option>
     313                                                <option value="false" <?php if ($wpua_show_version === 'false') echo 'selected="selected"'; ?>><?php _e('No', 'wp-useragent'); ?></option>
     314                                            </select>
    297315                                        </td>
    298316                                    </tr>
     
    466484
    467485                    <input type="hidden" name="action" value="update" />
    468                     <input type="hidden" name="page_options" value="wpua_doctype, wpua_icon_size, wpua_show_text_icons, wpua_icon_style, wpua_icon_style_input, wpua_text_using, wpua_text_on, wpua_text_via, wpua_text_links, wpua_show_full_ua, wpua_hide_unknown_ua, wpua_admin_only, wpua_output_location" />
     486                    <input type="hidden" name="page_options" value="wpua_doctype, wpua_icon_size, wpua_show_text_icons, wpua_icon_style, wpua_icon_style_input, wpua_text_using, wpua_text_on, wpua_text_via, wpua_show_version, wpua_text_links, wpua_show_full_ua, wpua_hide_unknown_ua, wpua_admin_only, wpua_output_location" />
    469487
    470488                    <input type="button" name="Reset" class="button-primary reset" value="<?php _e('Reset Defaults', 'wp-useragent'); ?>" />
     
    501519                    $wpua_text_on = $wpua_useragent.find('#wpua_text_on'),
    502520                    $wpua_text_via = $wpua_useragent.find('#wpua_text_via'),
     521                    $wpua_show_version = $wpua_useragent.find('#wpua_show_version'),
    503522                    $wpua_text_links = $wpua_useragent.find('#wpua_text_links'),
    504523                    $wpua_show_full_ua = $wpua_useragent.find('#wpua_show_full_ua'),
     
    516535
    517536                // Element event groups
    518                     $change = $wpua_useragent.find('#wpua_icon_size,#wpua_show_text_icons,#wpua_text_links,#wpua_show_full_ua,#wpua_hide_unknown_ua,#wpua_output_location'),
     537                    $change = $wpua_useragent.find('#wpua_icon_size,#wpua_show_text_icons,#wpua_show_version,#wpua_text_links,#wpua_show_full_ua,#wpua_hide_unknown_ua,#wpua_output_location'),
    519538                    $keyup = $wpua_useragent.find('#wpua_icon_style_input,#wpua_text_using,#wpua_text_on,#wpua_text_via');
    520539
     
    525544                        wpua_text_using = ($wpua_show_text_icons.val() !== 'icons')  ? $wpua_text_using.val()+' ' : '',
    526545                        wpua_text_on = ($wpua_show_text_icons.val() !== 'icons')  ? $wpua_text_on.val()+' ' : '',
    527                         wpua_browser = ($wpua_show_text_icons.val() !== 'icons' && $wpua_text_links.val() !== 'false')  ? ' <a href="http://www.opera.com/" style="text-decoration:none">Opera 10.00</a> ' : ' Opera 10.00 ',
    528                         wpua_system = ($wpua_show_text_icons.val() !== 'icons' && $wpua_text_links.val() !== 'false')  ? ' <a href="http://www.ubuntu.com/" style="text-decoration:none">Ubuntu 9.10</a>' : ' Ubuntu 9.10',
     546                        wpua_browser_text = ($wpua_show_version.val() === 'false')  ? 'Opera' : (($wpua_show_version.val() === 'simple')  ? 'Opera 10' : 'Opera 10.52'),
     547                        wpua_system_text = ($wpua_show_version.val() === 'false')  ? 'Ubuntu' : (($wpua_show_version.val() === 'simple')  ? 'Ubuntu 9' : 'Ubuntu 9.10'),
     548                        wpua_browser = ($wpua_show_text_icons.val() !== 'icons' && $wpua_text_links.val() !== 'false')  ? ' <a href="http://www.opera.com/" style="text-decoration:none">'+wpua_browser_text+'</a> ' : ' '+wpua_browser_text+' ',
     549                        wpua_system = ($wpua_show_text_icons.val() !== 'icons' && $wpua_text_links.val() !== 'false')  ? ' <a href="http://www.ubuntu.com/" style="text-decoration:none">'+wpua_system_text+'</a>' : ' '+wpua_system_text,
    529550                        wpua_content = '';
    530551
  • wp-useragent/trunk/wp-useragent.php

    r1415001 r1415915  
    88 * Author URI: https://www.kyleabaker.com/
    99 * Text Domain: wp-useragent
     10 * Domain Path: /languages/
    1011 * //Author: Fernando Briano
    1112 * //Author URI: http://picandocodigo.net
     
    6263$wpua_text_on          = get_option('wpua_text_on');
    6364$wpua_text_via         = get_option('wpua_text_via');
     65$wpua_show_version     = get_option('wpua_show_version');
    6466$wpua_text_links       = get_option('wpua_text_links');
    6567$wpua_show_full_ua     = get_option('wpua_show_full_ua');
     
    118120    delete_option('ua_output_location');
    119121}
     122// Add new feature option for showing version to db if it didn't previously exist
     123if (empty($wpua_show_version))
     124{
     125    $wpua_show_version = 'full';
     126    if ( ! add_option( 'wpua_show_version', $wpua_show_version, '', 'no' ) ) update_option( 'wpua_show_version', $wpua_show_version );
     127}
    120128
    121129// Set defaults
     
    128136if (empty($wpua_text_on) && is_null($wpua_text_on)) $wpua_text_on = '';
    129137if (empty($wpua_text_via) && is_null($wpua_text_via)) $wpua_text_via = '';
     138if (empty($wpua_show_version)) $wpua_show_version = 'full';
    130139if (empty($wpua_text_links)) $wpua_text_links = 'false';
    131140if (empty($wpua_show_full_ua)) $wpua_show_full_ua = 'true';
     
    391400    if ( ! add_option( 'wpua_text_on', '', '', 'no' ) ) update_option( 'wpua_text_on', '' );
    392401    if ( ! add_option( 'wpua_text_via', '', '', 'no' ) ) update_option( 'wpua_text_via', '' );
     402    if ( ! add_option( 'wpua_show_version', '', '', 'no' ) ) update_option( 'wpua_show_version', '' );
    393403    if ( ! add_option( 'wpua_text_links', '', '', 'no' ) ) update_option( 'wpua_text_links', '' );
    394404    if ( ! add_option( 'wpua_show_full_ua', '', '', 'no' ) ) update_option( 'wpua_show_full_ua', '' );
Note: See TracChangeset for help on using the changeset viewer.