Plugin Directory

Changeset 456818


Ignore:
Timestamp:
10/28/2011 07:09:07 PM (14 years ago)
Author:
kyleabaker
Message:

v0.10.10

  • Fixed Opera Next detection since the ua string has changed.
  • Added detection for Opera Labs, Fireweb Navigator, Kylo, Sundance, Charon, Sylera, Dorothy Browser, and Webian Shell.
  • Added detection for x64 versions of Unix/Linux.
  • Added detection for the Inferno operating system.
  • Added detection for Nokia Browser (props: Yomi)
Location:
wp-useragent/trunk
Files:
14 added
2 edited

Legend:

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

    r426533 r456818  
    44Tags: useragent, user-agent, user agent, web, browser, web browser, operating system, platform, os, mac, apple, windows, win, linux, phone
    55Requires at least: 2.0
    6 Tested up to: 3.2
    7 Stable tag: 0.10.9
     6Tested up to: 3.2.1
     7Stable tag: 0.10.10
    88
    99== Description ==
     
    5757
    5858
    59 Some of you may compare this to another well-known plugin named browsersniff. UserAgent-Spy is a heavily modified and improved version of UserAgent-Spy, with several improvements over browsersniff also:
     59Some of you may compare this to another well-known plugin named browsersniff. WP-UserAgent is a heavily modified and improved version of UserAgent-Spy, with several improvements over browsersniff also:
    6060
    6161* Easy standard installation, just upload to wp-plugins and activate it.
     
    6666
    6767== Changelog ==
     68
     69= v0.10.10 =
     70* Fixed Opera Next detection since the ua string has changed.
     71* Added detection for Opera Labs, Fireweb Navigator, Kylo, Sundance, Charon, Sylera, Dorothy Browser, and Webian Shell.
     72* Added detection for x64 versions of Unix/Linux.
     73* Added detection for the Inferno operating system.
     74* Added detection for Nokia Browser (props: Yomi)
     75
    6876
    6977= v0.10.9 =
     
    512520* Reach a stable and solid 1.0 release where the plugin is mostly finalized and updates will generally be additional browsers and/or systems.
    513521* New web browsers, devices and operating systems are always welcome.
     522* Add detection for PSVita when its released.
    514523
    515524== Upgrade Notice ==
    516525
    517 = v0.10.8 =
    518 * Added detection for Opera Next, Android Webkit and MiniBrowser.
     526= v0.10.10 =
     527* Fixed Opera Next detection since the ua string has changed.
     528* Added detection for Opera Labs, Fireweb Navigator, Kylo, Sundance, Charon, Sylera, Dorothy Browser, and Webian Shell.
     529* Added detection for x64 versions of Unix/Linux.
     530* Added detection for the Inferno operating system.
     531* Added detection for Nokia Browser (props: Yomi)
  • wp-useragent/trunk/wp-useragent.php

    r426533 r456818  
    44Plugin URI: http://kyleabaker.com/goodies/coding/wp-useragent/
    55Description: A simple User-Agent detection plugin that lets you easily insert icons and/or textual web browser and operating system details with each comment.
    6 Version: 0.10.9
     6Version: 0.10.10
    77Author: Kyle Baker
    88Author URI: http://kyleabaker.com/
     
    6262    //fix for Opera's (and others) UA string changes in v10.00
    6363    $start=$title;
    64     if((strtolower($title)==strtolower("Opera") || strtolower($title)==strtolower("Opera Next")) && preg_match('/Version/i', $useragent))
     64    if((strtolower($title)==strtolower("Opera") || strtolower($title)==strtolower("Opera Next")
     65        || strtolower($title)==strtolower("Opera Labs")) && preg_match('/Version/i', $useragent))
    6566        $start="Version";
    6667    elseif(strtolower($title)==strtolower("Opera Mobi") && preg_match('/Version/i', $useragent))
     
    110111    elseif(strtolower($title)=="tencenttraveler")
    111112        return "TT Explorer ".$version;
     113    elseif(strtolower($title)=="opera labs")
     114    {
     115        preg_match('/Edition\ Labs([\ ._0-9a-zA-Z]+);/i', $useragent, $regmatch);
     116        return $title.$regmatch[1]." ".$version;
     117    }
    112118    else
    113119        return $title." ".$version;
     
    126132        $title="Abolimba";
    127133        $code="abolimba";
    128     }elseif(preg_match('/ABrowse/i', $useragent)){
    129         $link="http://abrowse.sourceforge.net/";
    130         $title=detect_browser_version("ABrowse");
    131         $code="abrowse";
    132134    }elseif(preg_match('/Acoo\ Browser/i', $useragent)){
    133135        $link="http://www.acoobrowser.com/";
     
    210212        $title="Cayman ".detect_browser_version("Browser");
    211213        $code="caymanbrowser";
     214    }elseif(preg_match('/Charon/i', $useragent)){
     215        $link="http://en.wikipedia.org/wiki/Charon_(web_browser)";
     216        $title=detect_browser_version("Charon");
     217        $code="null";
    212218    }elseif(preg_match('/Cheshire/i', $useragent)){
    213219        $link="http://downloads.channel.aol.com/browser";
     
    294300        $title=detect_browser_version("Doris");
    295301        $code="doris";
     302    }elseif(preg_match('/Dorothy/i', $useragent)){
     303        $link="http://www.dorothybrowser.com/";
     304        $title=detect_browser_version("Dorothy");
     305        $code="dorothybrowser";
    296306    }elseif(preg_match('/Edbrowse/i', $useragent)){
    297307        $link="http://edbrowse.sourceforge.net/";
     
    330340        $title=detect_browser_version("Firebird");
    331341        $code="firebird";
     342    }elseif(preg_match('/Fireweb\ Navigator/i', $useragent)){
     343        $link="http://www.arsslensoft.tk/?q=node/7";
     344        $title=detect_browser_version("Fireweb Navigator");
     345        $code="firewebnavigator";
    332346    }elseif(preg_match('/Flock/i', $useragent)){
    333347        $link="http://www.flock.com/";
     
    478492        $title=detect_browser_version("Konqueror");
    479493        $code="konqueror";
     494    }elseif(preg_match('/Kylo/i', $useragent)){
     495        $link="http://kylo.tv/";
     496        $title=detect_browser_version("Kylo");
     497        $code="kylo";
    480498    }elseif(preg_match('/LBrowser/i', $useragent)){
    481499        $link="http://wiki.freespire.org/index.php/Web_Browser";
     
    610628        $title=detect_browser_version("NF-Browser");
    611629        $code="netfront";
     630    }elseif(preg_match('/NokiaBrowser/i', $useragent)){
     631        $link="http://browser.nokia.com/";
     632        $title="Nokia ".detect_browser_version("Browser");
     633        $code="nokia";
    612634    }elseif(preg_match('/Novarra-Vision/i', $useragent)){
    613635        $link="http://www.novarra.com/";
     
    634656        $title=detect_browser_version("Opera Mobi");
    635657        $code="opera-2";
    636     }elseif(preg_match('/Opera Next/i', $useragent)){
     658    }elseif(preg_match('/Opera Labs/i', $useragent) || (preg_match('/Opera/i', $useragent) && preg_match('/Edition Labs/i', $useragent))){
     659        $link="http://labs.opera.com/";
     660        $title=detect_browser_version("Opera Labs");
     661        $code="opera-next";
     662    }elseif(preg_match('/Opera Next/i', $useragent) || (preg_match('/Opera/i', $useragent) && preg_match('/Edition Next/i', $useragent))){
    637663        $link="http://www.opera.com/support/kb/view/991/";
    638664        $title=detect_browser_version("Opera Next");
     
    772798        $title="Flock ".detect_browser_version("Sulfur");
    773799        $code="flock";
     800    }elseif(preg_match('/Sundance/i', $useragent)){
     801        $link="http://digola.com/sundance.html";
     802        $title=detect_browser_version("Sundance");
     803        $code="sundance";
    774804    }elseif(preg_match('/Sunrise/i', $useragent)){
    775805        $link="http://www.sunrisebrowser.com/";
     
    788818        $title=detect_browser_version("Swiftweasel");
    789819        $code="swiftweasel";
     820    }elseif(preg_match('/Sylera/i', $useragent)){
     821        $link="http://dombla.net/sylera/";
     822        $title=detect_browser_version("Sylera");
     823        $code="null";
    790824    }elseif(preg_match('/tear/i', $useragent)){
    791825        $link="http://wiki.maemo.org/Tear";
     
    872906        $title=detect_browser_version("Android Webkit");
    873907        $code="android-webkit";
     908    }elseif(preg_match('/WebianShell/i', $useragent)){
     909        $link="http://webian.org/shell/";
     910        $title="Webian ".detect_browser_version("Shell");
     911        $code="webianshell";
    874912    }elseif(preg_match('/WeltweitimnetzBrowser/i', $useragent)){
    875913        $link="http://weltweitimnetz.de/software/Browser.en.page";
     
    898936
    899937    //Pulled out of order to help ensure better detection for above browsers
     938    }elseif(preg_match('/ABrowse/i', $useragent)){
     939        $link="http://abrowse.sourceforge.net/";
     940        $title=detect_browser_version("ABrowse");
     941        $code="abrowse";
    900942    }elseif(preg_match('/Chrome/i', $useragent)){
    901943        $link="http://google.com/chrome/";
     
    12201262            $title.=" ".$regmatch[1];
    12211263        $code="amigaos";
     1264        if(preg_match('/x86_64/i', $useragent))
     1265            $title.=" x64";
    12221266    }elseif(preg_match('/Android/i', $useragent)){
    12231267        $link="http://www.android.com/";
    12241268        $title="Android";
    12251269        $code="android";
     1270        if(preg_match('/x86_64/i', $useragent))
     1271            $title.=" x64";
    12261272    }elseif(preg_match('/[^A-Za-z]Arch/i', $useragent)) { //&& !preg_match('/Search/i', $useragent)){
    12271273        $link="http://www.archlinux.org/";
    12281274        $title="Arch Linux";
    12291275        $code="archlinux";
     1276        if(preg_match('/x86_64/i', $useragent))
     1277            $title.=" x64";
    12301278    }elseif(preg_match('/BeOS/i', $useragent)){
    12311279        $link="http://en.wikipedia.org/wiki/BeOS";
    12321280        $title="BeOS";
    12331281        $code="beos";
     1282        if(preg_match('/x86_64/i', $useragent))
     1283            $title.=" x64";
    12341284    }elseif(preg_match('/CentOS/i', $useragent)){
    12351285        $link="http://www.centos.org/";
     
    12381288            $title.=" ".$regmatch[1];
    12391289        $code="centos";
     1290        if(preg_match('/x86_64/i', $useragent))
     1291            $title.=" x64";
    12401292    }elseif(preg_match('/CrOS/i', $useragent)){
    12411293        $link="http://en.wikipedia.org/wiki/Google_Chrome_OS";
    12421294        $title="Google Chrome OS";
    12431295        $code="chromeos";
     1296        if(preg_match('/x86_64/i', $useragent))
     1297            $title.=" x64";
    12441298    }elseif(preg_match('/Debian/i', $useragent)){
    12451299        $link="http://www.debian.org/";
    12461300        $title="Debian GNU/Linux";
    12471301        $code="debian";
     1302        if(preg_match('/x86_64/i', $useragent))
     1303            $title.=" x64";
    12481304    }elseif(preg_match('/DragonFly/i', $useragent)){
    12491305        $link="http://www.dragonflybsd.org/";
    12501306        $title="DragonFly BSD";
    12511307        $code="dragonflybsd";
     1308        if(preg_match('/x86_64/i', $useragent))
     1309            $title.=" x64";
    12521310    }elseif(preg_match('/Edubuntu/i', $useragent)){
    12531311        $link="http://www.edubuntu.org/";
     
    12611319        if(strlen($version) > 1)
    12621320            $title.=$version;
     1321        if(preg_match('/x86_64/i', $useragent))
     1322            $title.=" x64";
    12631323    }elseif(preg_match('/Fedora/i', $useragent)){
    12641324        $link="http://www.fedoraproject.org/";
     
    12671327            $title.=" ".$regmatch[1];
    12681328        $code="fedora";
     1329        if(preg_match('/x86_64/i', $useragent))
     1330            $title.=" x64";
    12691331    }elseif(preg_match('/Foresight\ Linux/i', $useragent)){
    12701332        $link="http://www.foresightlinux.org/";
     
    12731335            $title.=" ".$regmatch[1];
    12741336        $code="foresight";
     1337        if(preg_match('/x86_64/i', $useragent))
     1338            $title.=" x64";
    12751339    }elseif(preg_match('/FreeBSD/i', $useragent)){
    12761340        $link="http://www.freebsd.org/";
    12771341        $title="FreeBSD";
    12781342        $code="freebsd";
     1343        if(preg_match('/x86_64/i', $useragent))
     1344            $title.=" x64";
    12791345    }elseif(preg_match('/Gentoo/i', $useragent)){
    12801346        $link="http://www.gentoo.org/";
    12811347        $title="Gentoo";
    12821348        $code="gentoo";
     1349        if(preg_match('/x86_64/i', $useragent))
     1350            $title.=" x64";
     1351    }elseif(preg_match('/Inferno/i', $useragent)){
     1352        $link="http://www.vitanuova.com/inferno/";
     1353        $title="Inferno";
     1354        $code="inferno";
     1355        if(preg_match('/x86_64/i', $useragent))
     1356            $title.=" x64";
    12831357    }elseif(preg_match('/IRIX/i', $useragent)){
    12841358        $link="http://www.sgi.com/partners/?/technology/irix/";
     
    12911365        }
    12921366        $code="irix";
     1367        if(preg_match('/x86_64/i', $useragent))
     1368            $title.=" x64";
    12931369    }elseif(preg_match('/Kanotix/i', $useragent)){
    12941370        $link="http://www.kanotix.com/";
    12951371        $title="Kanotix";
    12961372        $code="kanotix";
     1373        if(preg_match('/x86_64/i', $useragent))
     1374            $title.=" x64";
    12971375    }elseif(preg_match('/Knoppix/i', $useragent)){
    12981376        $link="http://www.knoppix.net/";
    12991377        $title="Knoppix";
    13001378        $code="knoppix";
     1379        if(preg_match('/x86_64/i', $useragent))
     1380            $title.=" x64";
    13011381    }elseif(preg_match('/Kubuntu/i', $useragent)){
    13021382        $link="http://www.kubuntu.org/";
     
    13101390        if(strlen($version) > 1)
    13111391            $title.=$version;
     1392        if(preg_match('/x86_64/i', $useragent))
     1393            $title.=" x64";
    13121394    }elseif(preg_match('/LindowsOS/i', $useragent)){
    13131395        $link="http://en.wikipedia.org/wiki/Lsongs";
    13141396        $title="LindowsOS";
    13151397        $code="lindowsos";
     1398        if(preg_match('/x86_64/i', $useragent))
     1399            $title.=" x64";
    13161400    }elseif(preg_match('/Linspire/i', $useragent)){
    13171401        $link="http://www.linspire.com/";
    13181402        $title="Linspire";
    13191403        $code="lindowsos";
     1404        if(preg_match('/x86_64/i', $useragent))
     1405            $title.=" x64";
    13201406    }elseif(preg_match('/Linux\ Mint/i', $useragent)){
    13211407        $link="http://www.linuxmint.com/";
     
    13241410            $title.=" ".$regmatch[1];
    13251411        $code="linuxmint";
     1412        if(preg_match('/x86_64/i', $useragent))
     1413            $title.=" x64";
    13261414    }elseif(preg_match('/Lubuntu/i', $useragent)){
    13271415        $link="http://www.lubuntu.net/";
     
    13351423        if(strlen($version) > 1)
    13361424            $title.=$version;
     1425        if(preg_match('/x86_64/i', $useragent))
     1426            $title.=" x64";
    13371427    }elseif(preg_match('/Mac/i', $useragent) || preg_match('/Darwin/i', $useragent)){
    13381428        $link="http://www.apple.com/macosx/";
     
    13641454            $title.=" ".$regmatch[1];
    13651455        $code="mandriva";
     1456        if(preg_match('/x86_64/i', $useragent))
     1457            $title.=" x64";
    13661458    }elseif(preg_match('/moonOS/i', $useragent)){
    13671459        $link="http://www.moonos.org/";
     
    13701462            $title.=" ".$regmatch[1];
    13711463        $code="moonos";
     1464        if(preg_match('/x86_64/i', $useragent))
     1465            $title.=" x64";
    13721466    }elseif(preg_match('/MorphOS/i', $useragent)){
    13731467        $link="http://www.morphos-team.net/";
    13741468        $title="MorphOS";
    13751469        $code="morphos";
     1470        if(preg_match('/x86_64/i', $useragent))
     1471            $title.=" x64";
    13761472    }elseif(preg_match('/NetBSD/i', $useragent)){
    13771473        $link="http://www.netbsd.org/";
    13781474        $title="NetBSD";
    13791475        $code="netbsd";
     1476        if(preg_match('/x86_64/i', $useragent))
     1477            $title.=" x64";
    13801478    }elseif(preg_match('/OpenBSD/i', $useragent)){
    13811479        $link="http://www.openbsd.org/";
    13821480        $title="OpenBSD";
    13831481        $code="openbsd";
     1482        if(preg_match('/x86_64/i', $useragent))
     1483            $title.=" x64";
    13841484    }elseif(preg_match('/Oracle/i', $useragent)){
    13851485        $link="http://www.oracle.com/us/technologies/linux/";
     
    13901490            $title.=" Linux";
    13911491        $code="oracle";
     1492        if(preg_match('/x86_64/i', $useragent))
     1493            $title.=" x64";
    13921494    }elseif(preg_match('/PCLinuxOS/i', $useragent)){
    13931495        $link="http://www.pclinuxos.com/";
     
    13961498            $title.=" ".str_replace("_", ".", $regmatch[1]);
    13971499        $code="pclinuxos";
     1500        if(preg_match('/x86_64/i', $useragent))
     1501            $title.=" x64";
    13981502    }elseif(preg_match('/Red\ Hat/i', $useragent) || preg_match('/RedHat/i', $useragent)){
    13991503        $link="http://www.redhat.com/";
     
    14021506            $title.=" Enterprise Linux ".str_replace("_", ".", $regmatch[1]);
    14031507        $code="red-hat";
     1508        if(preg_match('/x86_64/i', $useragent))
     1509            $title.=" x64";
    14041510    }elseif(preg_match('/Sabayon/i', $useragent)){
    14051511        $link="http://www.sabayonlinux.org/";
    14061512        $title="Sabayon Linux";
    14071513        $code="sabayon";
     1514        if(preg_match('/x86_64/i', $useragent))
     1515            $title.=" x64";
    14081516    }elseif(preg_match('/Slackware/i', $useragent)){
    14091517        $link="http://www.slackware.com/";
    14101518        $title="Slackware";
    14111519        $code="slackware";
     1520        if(preg_match('/x86_64/i', $useragent))
     1521            $title.=" x64";
    14121522    }elseif(preg_match('/Solaris/i', $useragent)){
    14131523        $link="http://www.sun.com/software/solaris/";
     
    14221532        $title="openSUSE";
    14231533        $code="suse";
     1534        if(preg_match('/x86_64/i', $useragent))
     1535            $title.=" x64";
    14241536    }elseif(preg_match('/Symb[ian]?[OS]?/i', $useragent)){
    14251537        $link="http://www.symbianos.org/";
     
    14281540            $title.=" ".$regmatch[1];
    14291541        $code="symbianos";
    1430     }elseif(preg_match('/Ubuntu/i', $useragent)){
    1431         $link="http://www.ubuntu.com/";
    1432         $title="Ubuntu";
    1433         if(preg_match('/Ubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
    1434             $version.=" ".$regmatch[1];
    1435         if($regmatch[1] < 10)
    1436             $code="ubuntu-1";
    1437         else
    1438             $code="ubuntu-2";
    1439         if(strlen($version) > 1)
    1440             $title.=$version;
     1542        if(preg_match('/x86_64/i', $useragent))
     1543            $title.=" x64";
    14411544    }elseif(preg_match('/Unix/i', $useragent)){
    14421545        $link="http://www.unix.org/";
    14431546        $title="Unix";
    14441547        $code="unix";
     1548        if(preg_match('/x86_64/i', $useragent))
     1549            $title.=" x64";
    14451550    }elseif(preg_match('/VectorLinux/i', $useragent)){
    14461551        $link="http://www.vectorlinux.com/";
    14471552        $title="VectorLinux";
    14481553        $code="vectorlinux";
     1554        if(preg_match('/x86_64/i', $useragent))
     1555            $title.=" x64";
    14491556    }elseif(preg_match('/Venenux/i', $useragent)){
    14501557        $link="http://www.venenux.org/";
    14511558        $title="Venenux GNU Linux";
    14521559        $code="venenux";
     1560        if(preg_match('/x86_64/i', $useragent))
     1561            $title.=" x64";
    14531562    }elseif(preg_match('/webOS/i', $useragent)){
    14541563        $link="http://en.wikipedia.org/wiki/WebOS";
     
    15221631        $title="Xandros";
    15231632        $code="xandros";
     1633        if(preg_match('/x86_64/i', $useragent))
     1634            $title.=" x64";
    15241635    }elseif(preg_match('/Xubuntu/i', $useragent)){
    15251636        $link="http://www.xubuntu.org/";
     
    15331644        if(strlen($version) > 1)
    15341645            $title.=$version;
     1646        if(preg_match('/x86_64/i', $useragent))
     1647            $title.=" x64";
    15351648    }elseif(preg_match('/Zenwalk/i', $useragent)){
    15361649        $link="http://www.zenwalk.org/";
    15371650        $title="Zenwalk GNU Linux";
    15381651        $code="zenwalk";
     1652        if(preg_match('/x86_64/i', $useragent))
     1653            $title.=" x64";
    15391654
    15401655    //Pulled out of order to help ensure better detection for above platforms
     1656    }elseif(preg_match('/Ubuntu/i', $useragent)){
     1657        $link="http://www.ubuntu.com/";
     1658        $title="Ubuntu";
     1659        if(preg_match('/Ubuntu[\/|\ ]([.0-9a-zA-Z]+)/i', $useragent, $regmatch))
     1660            $version.=" ".$regmatch[1];
     1661        if($regmatch[1] < 10)
     1662            $code="ubuntu-1";
     1663        else
     1664            $code="ubuntu-2";
     1665        if(strlen($version) > 1)
     1666            $title.=$version;
     1667        if(preg_match('/x86_64/i', $useragent))
     1668            $title.=" x64";
    15411669    }elseif(preg_match('/Linux/i', $useragent)){
    15421670        $link="http://www.linux.org/";
Note: See TracChangeset for help on using the changeset viewer.