User Browser and OS detection plugin for WordPress
Features
- Detects and shows commenter’s web browser and operating system (Edit your comment template)
- Describe an arbitrary user agent string (for general use)
- Optionally show web browser and operating system icons.
- If the user is ‘cookied’, it also displays an asterisk * titled with the full user agent string (hover over them to see the full user agent string mentioned in 2). Your regular visitors will not be shown this asterisk.
- All major browsers detected: Desktop browsers, antiquated browsers, blogging software (for trackbacks and pingbacks), text based browsers, various PDAs and cell phones.
Sample : Browser sniff plugin used in the comments’ template
Instructions
- Download the plugin: browsniff.txt
- Put it in your
wp-content/plugins
directory and rename it tobrowsniff.php
. - Activate the plugin from your WordPress Plugins administration menu.
- (optional) Download web browser and operating system icons: browsers.tar.gz. Extract it in your WordPress installation root directory. This should create a directory
browsers
filled with icons. - Follow the usage below.
- (optional) You can change how the icons look in your CSS by modifying style for selector
img.browsericon
UsageTo show commenters web browser description, use the function pri_print_browser("Using ", "", true, 'on');
 inside the comment loop. The function has three parameters:
- String to be printed before description
- String to be printed after description
- Whether to display icons or not, set this to
true
orfalse
. - String to be printed between web browser and operating system description, defaults to ‘on’.
SOURCEÂ : http://priyadi.net/archives/2005/03/29/wordpress-browser-detection-plugin/
Nice plugin 🙂
I am a new WordPress user, in my previous blog, I used a little script to detect the browser of visitors (no commenter) to show a Warning if they use IE browser, your plugin also detect the visitor' s user agent or only the commenter user agent ?
Hi gialloporpora..
This plugin is for showing commenter's user agent as it fetches data from WP's saved commenter user agent field.
For showing a custom code for IE users, try :
<code><tt>
<!–[if IE]>
// Code for IE goes Here
< ![endif]–>
</tt></code>
Ok, thanks for your code :-).
Now I'll try it in my local copy and after, if all works great, I'll upload and activate it in my blog 🙂
Ciao
I have put the function above in my footer of my wordpress template, but not result anything… I have follow this instruction well.. Can help me??
What is the latest and most expensive cellphones this year ?-"*
For me, the best operating system is Linux because it rarely hangs..,'
i am sort of obsessed with the latest cellphones on the market and i am always on the lookout’-*
operating systems can either make or break your system that is why it is wise to choose a vey stable one.~*:
i love camera cellphones so much, i wish they could have make a 10 Megapixel camera cellphone.''
the best operating system is always Linux, after Linux it is Windows XP. Vista sucks-,,
Linux is still the best when it comes to stability and Windows for ergonomics:-;
hi there. are you currently serious to help change hyperlinks by using the web site?
http://www.canadagoose-paris.com/doudoune-canada-… looking forward for more articles on your blog Cool to read, worth learning! Keep it up!