Skip to content
CSS Browser Selector Plugin for ExpressionEngine
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README
pi.css_browser_selector.php

README

This plugin returns the visitors operating system and browser as CSS browser selectors to use in your HTML.

=====================================================
Basic Usage
=====================================================

The following code returns CSS selectors:
{exp:css_browser_selector}

Or you can provide the user agent as a string:
{exp:css_browser_selector agent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)"}

Keep in mind that you can use ExpressionEngine's own Referrer module variable {ref_agent}:
{exp:css_browser_selector agent="{ref_agent}"}


=====================================================
Parameters
=====================================================

agent
If empty, ExpressionEngine will use PHP's own $_SERVER['HTTP_USER_AGENT'] variable.


=====================================================
Changelog
=====================================================

1.1
Added selectors for Windows NT 4, Windows 2000, Windows XP, Windows Vista, Windows 7 and Windows 8. Now you can use the following selectors: winnt4, win2k, winxp, winvista, win7, win8.

1.0.1
Added support for Mobile Safari on iPad.

1.0
Initial release, no changes from the original PHP script by Bastian Allgeier.


=====================================================
Credits
=====================================================

This is an ExpressionEngine port of Bastian Allgeier's PHP CSS Browser Selector. (Which is then a port of Rafael Lima's Javascript CSS Browser Selector.)

Bastian Allgeier
http://bastian-allgeier.de/css_browser_selector

Rafael Lima
http://rafael.adm.br/css_browser_selector
Something went wrong with that request. Please try again.