UserAgent-Spy Wordpress Plugin (English)
Description
UserAgent-Spy is a WordPress plugin which displays the user’s Operative System and Web Browser in the comments. It uses the comment->agent property to access the UserAgent string, and through a series of regular expresions, detects the O.S. and browser. Then it shows a message with an icon of the browser and O.S.
Your feedback is very important, new features have been added by request, so if there’s something you would like to see in UA-Spy, leave a comment, and I’ll see what I can do. If you want to contribute code, images, or whatever you think may be useful to UserAgent-Spy, write a comment below or drop me an e-mail (fernando at picandocodigo.net).
You may also donate to the development of the plugin:
Screenshot:

UserAgent Spy on WordPress 2.6 default theme
Installation:
- Upload useragent-spy folder to /wp-contents/plugins/
- Login to your WordPress Admin menu, go to Plugins, and activate it.
- In your WordPress Admin menu, you will find a new menu under Settings called UserAgent Spy. There you can choose the displayed icons size, and select where to display the plugin. There are three options for displaying the plugin:
- Before the comment text. User’s WebBrowser and OS will be displayed before comment text.
- After the comment text.User’s WebBrowser and OS will be displayed after comment text.
- Custom (Advanced). You can specify the location using the useragent_spy_custom() function inside the comments loop in your template (Generally in comments.php).
Example:
<?php foreach ($comments as $comment) : ?>
<cite><?php comment_author_link() ?></cite> <?php useragent_spy_custom(); ?> says:<br />
<?php comment_text() ?>
CAUTION: If you select “Custom” and don’t use <?php useragent_spy_custom(); ?> in your template, you won’t get the information displayed.
Features (Check Release Notes below to see new features being added)
- Detects most popular web browsers and Operative Systems (It’s a work in progress, many more browsers/o.s. ’s to come)
- Shows browser icon, name, and a link to the browser’s homepage (this will be customizable in future versions).
- Shows browser/os in the comments management page (unless using “custom” option).
- Customizable, has its own Options Page where you can change the size of the browser/o.s. icon, and where you want it to be displayed.
- Published under GPLv3
Some of you may compare this to another well-known plugin named browsersniff. UserAgent-Spy is written completelly from scratch, with several improvements over browsersniff:
- Easy standard installation, just upload to wp-plugins and activate it.
- Customizable options.
- No basic knowledge of PHP or editing WordPress templates required
- Published under GPLv3.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092921 IceCat/3.0.3-g1 Debian GNU/Linux
Chip:
I haven’t yet updated the plugin to be compatible with the new version of comments. Apparently there’s some new work to do to support the new threaded comments.
That’s one of the reasons why I haven’t yet updated my blog to WP 2.7.
But I’ll get to it any time soon.
Regards
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121810 Gentoo Firefox/3.0.5
nice plugin fernando, better if it support x/html & accessibility too
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092921 IceCat/3.0.3-g1 Debian GNU/Linux
dani:
I’ve already fixed support for xhtml on version 0.6, I think it’s working fine now. What do you mean by accesibility?
Regards
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008122011 Iceweasel/3.0.5 (Debian-3.0.5-1)
Hello Fernando, I really like this plugin, and I really appreciate that you took the time to write it, but unfortunately it does not work with WP 2.7, so I am unable to use it. Are you planning on trying to fix it, or is this now a dead project?
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008122316 IceCat/3.0.5-g1 Debian GNU/Linux
Igneous:
This project is far from abandoned. I just haven’t had the time to make it work with WordPress 2.7. It’s really demotivating, since a lot was changed in 2.7, but I’ll get to it soon.
Glad you like the plugin, I’ll try to get it to work with new WordPress.
Regards
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008122011 Iceweasel/3.0.5 (Debian-3.0.5-1)
Fernando: Thank you! I would be greatly endebted to you if you were to get it working with WP 2.7. Also, if you ever need a beta tester before you take it public, be sure to send me an email, I’d be more than happy to help
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6
Really nice plugin! I like it very much, thanks!
But I’m also curious about support for CentOS recognition, I found it not working on my site (using a CentOS from my university).
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6
Back to previous comment:
The user-agent string for CentOS (that was not recognized) was like:
Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.4 (like Gecko) CentOS/3.5.4-13.el5.centos
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008122316 IceCat/3.0.5-g1 Debian GNU/Linux
New version is out: 1.0rc1. That’s release candidate 1. If everything works fine, version 1.0 final won’t be too far away.
CentOS detection included.
Still needing to port it to WP 2.7 thought, that’s the next milestone on my book…
Regards!
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008122316 IceCat/3.0.5-g1 Debian GNU/Linux
Version 1.0rc2 is out. Working perfectly on WordPress 2.7.1 (this blog)…
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080611 BonEcho/2.0.0.14
Nice work, Fernando!
..now testing from Bon Echo.
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009031406 IceCat/3.0.7-g1 Debian
Thanks V-Teq, BonEcho being detected and shown with its logo…
By the way, you should update your browser!
Regards
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009050214 Gentoo Firefox/3.0.10
fernando,
it sounds ugly if screen reader/voice browser users must hear the inline UA string too.
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US) AppleWebKit/531.0 (KHTML, like Gecko) Chrome/3.0.183.1 Safari/531.0
Just testing Google Chrome 3 (unstable) for Linux.
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.2.0; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)
Hi! I was surfing and found your blog post… nice! I love your blog.
Cheers! Sandra. R.
Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.10 (like Gecko) SUSE
Thank’s for share. I must learn how that plugins work..
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en; rv:1.9.0.16) Gecko/2009120123 Camino/2.0.1 (like Firefox/3.0.16)
I love your plugin. I have been using k2 and wp since 2005. When I updated to k2-rc8 a few months ago your plugin hides all the comments and does not show the browser feedback.
I would like to continue using your plugin if possible.
Using WP 2.9
Trackbacks y pingbacks:
Additional comments powered by BackType
Enlaces
- Re: List Category Posts WordPress Plugin support
- Re: List Category Posts WordPress Plugin support
- Re: List Category Posts WordPress Plugin support
- Re: List Category Posts WordPress Plugin support
- Add Tags Support (Here's how)
- Herramienta
- Re: List Category Posts WordPress Plugin support
- Re: List Category Posts WordPress Plugin support
- Re: List Category Posts WordPress Plugin new features request
- Re: List Category Posts WordPress Plugin support
\n\nRSS del foro:Últimos comentarios
Categorías
Blogroll