Hide personal files within other files
  • Login
  • Become a blogger
  • User Browser and OS detection plugin for Wordpress

    Posted by thinkdj on November 8th, 2007
    4 Comments | 2,596 pageviews

    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.

      User Browser and Operating System detection Plugin for Wordpress - BrowserSniff
      Sample : Browser sniff plugin used in the comments’ template

    Instructions

    1. Download the plugin: browsniff.txt
    2. Put it in your wp-content/plugins directory and rename it to browsniff.php.
    3. Activate the plugin from your Wordpress Plugins administration menu.
    4. (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.
    5. Follow the usage below.
    6. (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:

    1. String to be printed before description
    2. String to be printed after description
    3. Whether to display icons or not, set this to true or false.
    4. 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/

    4 Responses »

    1. arif says:

      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??

    2. 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

    3. thinkdj says:

      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 :

      <!--[if IE]>
      // Code for IE goes Here
      < ![endif]-->

    4. 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 ?

    Trackbacks/Pingbacks

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    More from "Wordpress"

    Find what you are looking for

    Recently added

    Categories

    Blogulate

    Keeping you updated of the latest fads and developments of the industry via amalgamated web content.

    Join us

    Post articles on blogulate and monetize them. Learn more »

    Stay updated

    Subscribe now and stay aware of the latest trends and happenings on the www. Get notified via email when we update.

    Enter your email address:

    Blogulate is based on Magnus premium theme by WizeDesigns
    © 2009 Blogulate. Some rights reserved.