Forums

Awebsome! Browser Selector
[resolved] How to add new browsers to the plugin (3 posts)

  1. Copernicus
    Member
    Posted 3 months ago #

    Thanks for a great (and important) plugin!
    Even though the plugin was last updated in July 2011, there have been numerous releases of Firefox (that has changed to a rapid release schedule).

    As of this writing, we're up to Firefox 10.

    Is there a way that we can modify the plugin's code to add support for new versions of browsers as they become available?

    http://wordpress.org/extend/plugins/awebsome-browser-selector/

  2. Copernicus
    Member
    Posted 3 months ago #

    Well, I may have successfully answered my own question.

    Within the file, , there's a snippet of code listed under the "//browsers" section that determines the browser version:

    elseif( strstr($ua, 'firefox/3.5') )  $b[] = $g . ' ff3 ff3_5';
    	elseif( strstr($ua, 'firefox/3')  $b[] = $g . ' ff3';
    	elseif( strstr($ua, 'firefox/3')  $b[] = $g . ' ff4';
    	elseif( strstr($ua, 'firefox/3')  $b[] = $g . ' ff5';

    To this, I simply added:

    elseif( strstr($ua, 'firefox/10') $b[] = $g . ' ff10';

    at the end of that list. The final view within the code is this:

    elseif( strstr($ua, 'firefox/3.5') )  $b[] = $g . ' ff3 ff3_5';
    	elseif( strstr($ua, 'firefox/3')  $b[] = $g . ' ff3';
    	elseif( strstr($ua, 'firefox/3')  $b[] = $g . ' ff4';
    	elseif( strstr($ua, 'firefox/3')  $b[] = $g . ' ff5';
    	elseif( strstr($ua, 'firefox/10')  $b[] = $g . ' ff10';

    I've tested it with Firefox 10 and it seems to work fine.

    Hope this helps someone else!

  3. Raul Illana
    Member
    Posted 2 months ago #

    Yo Copernicus!

    You're right. Big fail. :_P

    This plugin needs an interface to manage browsers, OS and versions.

    Taking note for the next release. Stay tunned. :)

    Best!
    R

Reply

You must log in to post.

About this Plugin

About this Topic