Finding your next read
Practical craft for people building for the web.
Explore DevelopmentFinding your next read
THE FINDERPRESS TOOL DIRECTORY
Explore this tool and check the official listing for its latest features and requirements.
01 / SOURCE DETAILS
WP-UserAgent is a simple plugin that allows you to display details about a computer’s operating system or web browser that your visitors comment from. It uses the comment->agent property to access the User-Agent string . Through a series of regular expressions, this plugin is able to detect the operating system and browser which can be integrated in comments or placed in custom places through your template(s). I’m adding new web browsers and operating systems frequently, as well as updating and optimizing the source code. Your feedback is very important, new features have been added by request, so if there’s something you would like to see in WP-UserAgent , leave a comment , and I’ll see what I can do. WP-UserAgent was written with Geany – http://www.geany.org/ Images created with The Gimp – http://www.gimp.org/ Features Detects most web browsers and popular operative systems (if you find one missing, please let me know !) Shows web browser and operating system icons, names, and a link to their homepages (this will be customizable in future versions). Shows web browser and operating system in the Admin comments management page (unless you’re using “custom” option). Customizable, has its own Options Page where you can change the size of the web browser and operating system icons, where you want it to be displayed, and a few other options. Option to only display web browser and operating system info in Admin section Updated frequently to further extend web browser and operating system detection as well as source code improvements. Published under GPLv3 Some of you may compare this to another well-known plugin named browsersniff. WP-UserAgent is a heavily modified and improved version of UserAgent-Spy, with several improvements over browsersniff also: 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.
02 / SOURCE DETAILS
Upload the “wp-useragent” 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 WP-UserAgent. 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 wpua_custom_output() function inside the comments loop in your template (Generally in comments.php). Example: <?php foreach ($comments as $comment) : ?> <?php comment_author_link() ?> <?php wpua_custom_output(); ?> says: <?php comment_text() ?> CAUTION : If you select “Custom” and don’t use <?php wpua_custom_output(); ?> in your template, you won’t get the information displayed. Other options include the text to use when displaying the user’s web browser and operating system as well as whether or not to show the full User-Agent string.
03 / SOURCE DETAILS
Why is my Web Browser or Operating System not detected? The most likely answer is that your web browser is not using an identifiable user agent string. If your web browser isn’t providing the Browser name or Operating System name in the user agent, then this plugin can’t detect. If you think you’ve found an error with this plugin, please reach out to me in the Support section or leave a comment on the plugin homepage . Why doesn’t this plugin support Nationality flags or IP2Geolocation? This is a commonly requested feature which I’m currently looking into. At this point in time I do not have an ETA on if/when that functionality will be available. How can I help? You can help in a number of ways: If you find a browser that’s not being detected or a bug/issue, report it! Speak another language? Help me translate this plugin ! Help me keep the lights on! Donations are always appreciated , large or small! If you have any other questions, please don’t hesitate to ask me! The easiest way to ask me a question, comment or suggest something is to post it in the comments on the plugin homepage .
KEEP EXPLORING