Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   RFE: allow selectable document mode for IE (http://forum.bytesforall.com/showthread.php?t=12653)

mdmower Feb 6, 2011 10:51 AM

RFE: allow selectable document mode for IE
 
I usually manually set <meta http-equiv="X-UA-Compatible" content="IE=8" />

I see this is now an option under "STYLE & configure LAYOUT" to disable EmulateIE7. When I visit my site pagsa.missouri.edu with IE9 beta, the documents mode is still IE7 (I have refreshed). I agree that the EmulateIE7 header line no longer exists, but how can I force IE8 documents mode?

EDIT

Nevermind, I see that I just need to add
Code:

<meta http-equiv="X-UA-Compatible" content="IE=8" />
outside of the following block:
Code:

<?php if  ( isset($bfa_ata['EmulateIE7']) ) { if ( $bfa_ata['EmulateIE7'] == "Yes" ) { ?><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<?php }}; ?>

and leave the option for EmulateIE7 set to No.

FEATURE REQUEST

Now that the code is in place on your end, it would be great to make the option a selectable list of document types so this doesn't have to be manually set with every update.

juggledad Feb 6, 2011 12:15 PM

Added this as an RFE for 3.6.5

mdmower Feb 7, 2011 09:34 AM

I have made the necessary changes for my feature request. Hopefully they can be incorporated into 3.6.5. Editing version 3.6.4, the changes are as follows:

header.php: lines 9-10
Remove these lines:
Code:

<?php if  ( isset($bfa_ata['EmulateIE7']) ) { if ( $bfa_ata['EmulateIE7'] == "Yes" ) { ?><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<?php }}; ?>

Replace with these lines at same location:
Code:

<?php if ( isset($bfa_ata['IEDocType']) ) {
switch ( $bfa_ata['IEDocType'] ) {
        case "None":
                break;
        case "EmulateIE7":
                echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />";
                break;
        case "EmulateIE8":
                echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE8\" />";
                break;
        case "IE8":
                echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=8\" />";
                break;
        case "IE9":
                echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=9\" />";
                break;
        case "Edge":
                echo "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />";
                break;
        default:
                break;
}} ?>

functions/bfa_theme_options.php: lines 446-453
Remove these lines:
Code:

        array(    "name" => "Emulate IE7",
                "category" => "layout",
            "id" => "EmulateIE7",
            "type" => "select",
            "std" => "No",
            "options" => array("No", "Yes"),
            "lastoption" => "yes",
            "info" => "Set this option to YES if you would like to set IE7 compatibility mode on."),

Replace with these lines at same location
Code:

        array(    "name" => "IE Document Type",
                "category" => "layout",
            "id" => "IEDocType",
            "type" => "select",
            "std" => "None",
            "options" => array("None", "EmulateIE7", "EmulateIE8", "IE8", "IE9", "Edge"),
            "lastoption" => "yes",
            "info" => "Set this option to force Internet Explorer to use a particular rendering mode (supported by Internet Explorer 8 and newer)"),



All times are GMT -6. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.