Back to vBulletin 5.x Products & Extensions

IE11 browser detection and fixes
Mod Version: 1.01, by Zachery

vB Version: 5.0.x Rating: (2 votes - 5.00 average) Installs: 13
Released: 17 Oct 2013 Last Update: Never Downloads: 0
Not Supported Code Changes  

IE11 has some issues with vB5 as it stands now due to bad browser detection. These changes should address the issues at hand until the software is patched.

In core/includes/functions.php find:



PHP Code:
 
        
// detect macintosh 


Add above:

PHP Code:
 
// Detect Modern IE11+
 
        
if (strpos($useragent'trident') !== false AND !$is['opera'] AND !$is['ie'])
 
        {
 
            
preg_match('#rv:([0-9\.-]+)#'$useragent$regs);
 
            
$is['ie'] = $regs[1];
 
 
 
        } 


Next, find:



PHP Code:
if (strpos($useragent'gecko') !== false AND !$is['safari'] AND !$is['konqueror']) 


And replace it with



PHP Code:
if (strpos($useragent'gecko') !== false AND !$is['safari'] AND !$is['konqueror'] AND !$is['ie']) 

Next, we have one more change to make:

In /includes/vb5/frontend/controller.php Find

PHP Code:
        if (isset($_SERVER['HTTP_USER_AGENT']) &&
            (
strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
        {
            
header('Content-type: text/plain; charset=UTF-8');
        } 
Add after

PHP Code:
        // IE11+ detection, MS changed the UA
        
elseif (isset($_SERVER['HTTP_USER_AGENT']) &&
            (
strpos($_SERVER['HTTP_USER_AGENT'], 'Trident') !== false))
        {
 
            
header('Content-type: text/plain; charset=UTF-8');        
        } 

Download

No files for download.

Similar Mods

Integration with vBulletin Mobile Device & Browser Detection (Adapted by BOP5) vBulletin 4.x Add-ons
Miscellaneous Hacks IE11 browser detection and fixes vBulletin 4.x Add-ons
Miscellaneous Hacks IE11 browser detection and fixes vBulletin 3.8 Add-ons

vblts.ru supports vBulletin®, 2022-2025