UserAgent-Spy WordPress Plugin (English)
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).
Donate to the development of the plugin:
- 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).
<?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.