Recent Topics

IE version detection

started by on May 01, 2013 – Last touched: Jun 22, 2015

May 01, 2013 12:44    

.\inc\skins\_skin.funcs.php

PHP

if( !empty( $_SERVER['HTTP_USER_AGENT'] ) )
    {    // Detect IE browser version
        preg_match'/msie (\d)/i'$_SERVER['HTTP_USER_AGENT'], $browser_ie );
        if( count$browser_ie ) == && $browser_ie[1] < )
        {    // IE < 7
            require_css'ie6.css''relative' );
            $Messages->addT_('Your web browser is too old. For this site to work correctly, we recommend you use a more recent browser.'), 'note' );
        }
    }

The regex returns only 1 digit, so if the IE version is 10, or 11 to come etc, it only gets 1 and thinks 1 < 7 .

This should work fine:

PHP

preg_match'/msie (\d.{1})/i'$_SERVER['HTTP_USER_AGENT'], $browser_ie );

May 01, 2013 13:04

Thanks - worked a treat!

May 06, 2013 11:39

Fixed in next release.

May 17, 2013 09:49

@fplanque wrote earlier:

Fixed in next release.

Francois> I just installed 5.0.3-beta-5 and I still get this message on top of the blog posts...

tilqicom>thanks ! your hack worked perfectly :-)

May 17, 2013 12:45

Next meaning next after 5.0.3 :p


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.