WP-UserAgent
Latest version: v0.9.2 – Download
Official WordPress Plugin Page:
http://wordpress.org/extend/plugins/wp-useragent/
This is a WordPress plugin that I’ve taken the liberty to maintain since the original author has failed to code to xhtml standards and keep up with the latest browsers as well as detecting platform versions, Internet Explorer versions and more.
WP-UserAgent is a user agent plugin for WordPress that uses the user agent provided by the visitors browser to identify their operating system and browser for each comment.
Note to WordPress developers: Feel free to take the changes that I’ve made and add them in to Wordpress 2.8 or whatever. I just like to contribute (although my name somewhere in the credits would be great
).
WP-UserAgent identifies the following:
Web browsers:
- ABrowse
- Acoo Browser
- Amaya
- America Online Browser
- Amiga Voyager
- AOL
- Arora
- Avant Browser
- Beonex
- Black Berry Browser
- Blazer
- Bolt Browser
- BonEcho
- Camino
- Cayman Browser
- Cheshire
- Chimera
- Chrome
- CometBird
- Crazy Browser
- Cruz
- Cyberdog
- Deepnet Explorer
- Dillo
- Elinks
- Enigma Browser
- Epiphany
- Fennec
- Firebird
- Firefox
- Flock
- Fluid
- Galaxy
- Galeon
- GoSurf
- GranParadiso
- GreenBrowser
- Hana
- HotJava
- IBM WebExplorer
- IBrowse
- iCab
- IceApe
- IceCat
- IceWeasel
- Internet Explorer
- Internet Explorer Mobile
- Iron
- K-Meleon
- K-Ninja
- Kapiko
- Kazehakase
- KKman
- KMail
- KMLite
- Konqueror
- Links
- Lobo
- lolifox
- Lunascape
- Lynx
- Maxthon
- MIB (Motorola Internet Browser)
- Midori
- Minefield
- Minimo
- Mosaic
- Mozilla
- MultiZilla
- MyIE2
- Navigator
- NetFront
- NetNewsWire
- NetPositive
- Netscape
- NetSurf
- NF-Browser
- Obigo
- OmniWeb
- Opera
- Opera Mini
- Orca
- Oregano
- Phoenix
- Polaris
- Pre Browser
- QtWeb Internet Explorer
- retawq
- Safari
- SeaMonkey
- SEMC Browser
- Shiira
- Shiretoko
- Sleipnir
- SlimBrowser
- Songbird
- Stainless
- Sunrise
- Swiftfox
- TeaShark
- TheWorld
- Thunderbird
- uBrowser
- UCWEB
- UP.Browser
- W3M
- WorldWideWeb
- Wyzo
Operating Systems:
- Android
- Arch Linux
- BeOS
- CentOS
- Debian
- DragonFly BSD
- Edubuntu
- Fedora
- FreeBSD
- Gentoo
- Google Chrome OS
- iPhone
- iPod
- Kanotix
- Knoppix
- Kubuntu
- LindowsOS
- Linspire
- Linux
- Linux x86_64
- Linux Mint
- Macintosh
- Mac OS Darwin
- Mac OS X
- Mandriva
- Motorola
- NetBSD
- Nintendo DSi
- Nintendo Wii
- Nokia
- OLPC
- OpenBSD
- Oracle Linux
- Palm
- Playstation 3
- Playstation Portable
- RedHat
- Sabayon Linux
- Slackware
- Solaris
- SunOS
- Suse
- SymbianOS
- Ubuntu
- VectorLinux
- Venenux GNU Linux
- WebOS
- Windows
- Windows 3.1
- Windows 3.11
- Windows NT 3.11
- Windows NT 4.0
- Windows CE
- Windows 95
- Windows 98
- Windows 98 SE
- Windows Millennium Edition (Windows ME)
- Windows 2000
- Windows 2000, Service Pack 1 (SP1)
- Windows XP
- Windows Server 2003
- Windows XP x64 Edition
- Windows Vista
- Windows 7
- Windows 7 x64 Edition
- Xubuntu
- Zenwalk
TrackBacks:
- Feedburner
- Laconica
- Meneame
- MovableType
- Pligg
- WordPress
Here is a screenshot preview of what to expect:
Please let me know of any suggestions or browser/operating system versions that should be added. I tried to add as much as possible for the time being. I will add more soon and try to perfect the detection, but if you have problems then please let me know in the comments below!
Changelog:
v0.5.2 – Download
- Initial release (of taken over code).
v0.5.3.2 – Download
- Updated string names: $size => $uasize, $location =>$ualocation.
- Updated Google Chrome logo images with logo images added to UserAgent-Spy 0.5.3.2 (Images already added in my version of 0.5.2, but replaced for consistency).
v0.5.3.3 – Download
- Added Pre-2.6 compatibility for determining and defining Plugin and Content Directories constants. WordPress documentation here.
- Replaced sloppy code for image paths with more dynamic code.
- Renamed the function “useragent_spy_custom()” in “wp-useragent.php” to “useragent_output_custom()” to make it more generic and move away from the UserAgent-Spy naming system.
- Removed text attributes that were improperly added to option tags in “wp-useragent-options.php” to correct html validation errors.
- Adjusted the “UserAgent Output Location” section in “wp-useragent-options.php” and added the options to an ordered list, adjusting the use of the “small” tag.
- “wp-useragent-options.php” is now 100% XHTML 1.0 Transitional standards compliant. This is the default DTD used in the WordPress administration panel. I will eventually work towards compliance for XHTML 1.0 Strict.
- Fixed regex for OLPC so it’s case insensitive.
- Removed “target” attribute from browser links to improve XHTML 1.0 Strict compliance.
- Gave WP-UserAgent settings page a header title to make the location more recognizable.
- Cleaned up appearance of “wp-useragent-options.php” settings page by categorizing the content.
v0.5.3.4 – Download
- Added Windows 7 and Windows 7 x64 to detectable OS versions.
v0.6 – Download
- Added over 40 more web browsers that are detected.
- Added a couple more operating systems that are detected
- Fixed a bug in previous versions that caused errors to occur when users who were not logged in attempted to post a comment.
- Cleaned code and simplified several naming systems used.
- Added option to select DocType. Options include html and xhtml (strict for both).
- Known Issue: Most of the newly detected web browsers are still missing icons. I will try to add them as soon as I possibly can.
- *Note: The original author seems to like the additions that I made since I started extending this plugin and has incorporated many of the changes that I made into the other plugin.
v0.6.1 – Download
- 90 total web browsers detectable.
- 34 total operating systems detectable.
- Implemented a fix for Opera’s new versioning system, which started in version 10 snapshots, to correctly display the browser version.
- Cleaned code more and removed unnecessary global variable references.
- Fixed detection of CentOS.
- Debian and Ubuntu based distros (that are supported) now fetch version numbers also. Generic GNU/Linux now also specifies x64 when detected. Fedora version fetching is in the works as well as Mac OS X. Maybe these will be added in the next release. Mac versions are a little tricky since it seems they are optionally provided and formated differently per browser.I need to add fall back checks in case an odd UA string is created without version numbers for these so they are still detected. And parse pingbacks such as “XML-RPC for PHP 2.2″ in the future as something other than unknown.
- Known Issue: Some web browser icons have not been found/added as of yet. Those include: Amiga Voyager, Cheshire, Chimera, Elinks, IBrowse, Kapiko, KMLite, Minimo, Mosaic, MultiZilla, retawq, TeaShark, WorldWideWeb. Several of these listed browsers never had an icon to begin with, however, all listed will use the “unknown” icon (which is generic).Output location “custom” is still highly untested.
v0.6.2 – Download
- 90 total web browsers detectable.
- 35 total operating systems detectable.
- Code cleanup (removed extra whitespace to reduce size a little) and simplification (replaced switch with if..else).
- Most of the remaining icons for web browsers have been added.
- Linux Mint support added.
- A list of detectable operating systems that now also detect versions when available: CentOS, Edubuntu, Fedora, iPhone OS, Kubuntu, Mac, Ubuntu, Windows.
- Also, generic Linux will now specify if it is detected to be x86_64 (64-bit or x64). Others may be included later.
- Appearance adjustments made (settings icon by title and styling of “Save Changes” button) to WP-UserAgent Options page as well as adding a Help section with Author and Plugin Homepage to bottom of Options page for convenience.
- Known Issues:
- Some web browser icons have not been found/added as of yet. Those include: Chimera, KMLite, retawq, TeaShark, WorldWideWeb.
- Output location “custom” is still highly untested.
v0.7 – Download
- All images were optimized to reduce file sizes (PNGGauntlet) which reduced the overall package size from 308.4kb to 288.1kb!
v0.8 – Download
- Added a “Settings” quick link to the plugin listing in the plugins page.
- Worked on description wording for plugin in plugins page.
- Added a “Comment Preview” section to the WP-UserAgent settings page that displays an example of the options that you choose in real time.
- Also, WP-UserAgent has now been cleaned and extended far enough to reach the 1.0 milestone soon. I will be checking for possible problems and cleanups, but feel free to point them out to me at any time!
- *Note: Please suggest web browsers and/or operating systems that I am missing so I can include them to be detected.
v0.8.1 – Download
- Added missing ./img/16/net/arora.png file.
- Corrected typo of Maxthon 16px and 24px icons. maxton.png -> maxthon.png
- Added a quick fix for detecting and trimming Maxthon when no version is provided.
- *Note: WP-UserAgent is nearing a 1.0 release. Please let me know if you find any bugs, missing images, typos, undetected web browsers or operating systems, or detection errors in general.
v0.8.2 – Download
- Added detection for Windows 3.11, Windows NT 3.11, Windows NT 4.0 and fallback check for Windows Me.
- Added detection for Nintendo Wii, Playstation 3 and Playstation Portable.
- Added detection for Thunderbird (the e-mail client) since it has a unique and detectable user agent string.
- Debian is now shown as Debian GNU/Linux (props: Terry Wang)
- *Note: WP-UserAgent is nearing a 1.0 release. Please let me know if you find any bugs, missing images, typos, undetected web browsers or operating systems, or detection errors in general.
v0.8.3 – Download
- Adjusted readme.txt to appear better on the plugin page and pass validation from: http://wordpress.org/extend/plugins/about/validator/
- Initial submission to the the WP-UserAgent SVN Plugin Repository
v0.8.4 – Download
- Links: rel=”nofollow” is applied to all web browser and operating system links. (props: Alter Ego Blog)
- Added detection for Arch Linux (props: Terry Wang)
- Added detection for KMail (Kontact Mail) since it has a unique and detectable user agent string.
- Icon change: Macintosh (generic/old Mac) uses multi-color Apple icon, Mac OS X now uses gray Apple icon.
v0.8.5 – Download
- Added detection for Sabayon Linux (props: Ian “Thev00d00″ Whyman)
- Updated readme.txt to take advantage of the new changelog tab.
v0.8.6 – Download
- Added detection for more web browsers: BlackBerry Web Browser, Blazer, IEMobile, MIB (Motorola Internet Browser), NetFront, NetPositive, Obigo, Palm Pre Web Browser, Polaris, SEMC Browser, UCWEB, UP.Browser
- Added detection for more operating systems: Android, BeOS, Darwin (Mac), DragonFly BSD, Kanotix, Knoppix, LindowsOS, Linspire, Mandriva, Motorola, NetBSD, Nintendo DSi, Palm, VectorLinux, webOS
- Updates to detection of some rare sub-string instances: Win16 (Windows 3.11), Win95, Win98 (Windows 98 SE), Windows ME, Windows XP, Mac OSX, and Darwin (as Mac).
- Moved detection point of Firefox near end (along with Mozilla and MSIE) so other browsers that include Firefox in the User-Agent string are properly detected (example: Swiftfox is occassionally listed after Firefox in the string, causing improper detection).
- Corrected detection of Safari. Now Opera (starting with v10) and Safari are both versioned based on the Version/x.y string.
- Corrected detection of Nokia. Minor detection change included forward slash to further narrow results.
- Corrected links to Fedora and Mosaic’s homepage.
- Added icons for TeaShark (mobile web browser).
- Added new detection for Mozilla versioning.
- Added new Windows icons so a properly styled Windows icon is shown with the correct operating system version.
- Minor code cleaning.
v0.8.7 – Download
- Added detection for the Bolt Browser (mobile).
- Fixed bug where Browser and Operating System names were not passed along to the title and alt attributes in the image tags (props: cimddwc)
v0.8.8 – Download
- Corrected a layout bug on the Settings page with the Comment Preview section.
- Added option to display only text. Options are now Display icons and text, icons only or text only. You may need to check your settings if you were previously using the Icon only mode as it will most likely be reset with this update.
- Added option to specify css styling of image via Default (no-border), Inline Style for custom css, or Class for using a stylesheet (props: Zim)
v0.8.9 – Download
- Added detection for TheWorld Browser (props: mecal)
v0.9 – Download
- Added detection for Venenux GNU Linux and Oracle Linux.
- Added detection for Laconica and MovableType trackbacks.
- Cleaned some of the code for trackback detections.
v0.9.1 – Download Never committed to svn.
- Added a quick fix for Opera Mini detection.
v0.9.2 – Download
- Added support for iPod detection so an iPod Touch doesn’t appear as an iPhone.
- Added detection for Google Chrome OS.
- Fixed format and syntax of the readme.txt file that’s included.
To-do:
- Reach a stable and solid 1.0 release where the plugin is mostly finalized and updates will generally be additional browsers and/or systems.
- Allow users to enable/disable links for web browsers and operating systems.
- Update Opera’s new icon for version 10+ only.
- New web browsers and operating systems are always welcome.




Opera/9.80 (Windows NT 6.1; U; de) Presto/2.2.15 Version/10.10
very useful
Thanks for you plugin
Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16
Testing from an iPod Touch with OS 3.1.2..
Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.2.15 Version/10.20
WP-UserAgent v0.3 Released!
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.8 (KHTML, like Gecko) Chrome/4.0.288.1 Safari/532.8
WP-UserAgent is really wonderful.I use “mail to commenter” plugin at the same time,but commenter receives letters with blank content.I’m not sure if there’s something incompatible between these two plugins…Any advice or solution?
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.18 Version/10.50
I’ll look into this. It may be that they are using a variable incommon or the same function name. I’ve not used “mail to commenter” before.
Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.2.15 Version/10.20
I’ve looked through the code of the plugin that you’re using along side WP-UserAgent and I can’t seem to find the problem.
Are you still seeing this problem? …even when you deactivate WP-UserAgent?
BlackBerry8330m/4.5.0.131 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/104
Testing for proper BlackBerry device detection..
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.18 Version/10.50
Works!
Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.9.1.7) Gecko/20100105 Firefox/3.5.7
You do a great job! I really love your plug-in. Would it be possible to add archlinux inside the known OS?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0
Thanks for the plugin, great work on it
Nice to see this one support’s detection of Windows 7 correctly!
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100110 Mandriva Linux/1.9.1.7-0.1mdv2010.0 (2010.0) Firefox/3.5.7
Hi, one suggestion,
would it be possible to let it show information next to Author’s name or next to Date?
Inspiration comes from Advanced User Agent Displayer (http://www.moallemi.ir/en/blog/2009/09/20/advanced-user-agent-displayer/ )
All the best