Go Back   vb.org Archive > vBulletin Modifications > vBulletin 5.x Modifications > vBulletin 5.x Products & Extensions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
IE11 browser detection and fixes Details »»
IE11 browser detection and fixes
Version: 1.01, by Zachery Zachery is offline
Developer Last Online: May 2017 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 5.0.x Rating:
Released: 10-16-2013 Last Update: Never Installs: 13
Code Changes  
No support by the author.

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');        
        } 

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
BirdOPrey5

Comments
  #2  
Old 11-13-2013, 03:21 PM
Afrika Afrika is offline
 
Join Date: Aug 2004
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Done, but in opera it does'nt work
Reply With Quote
  #3  
Old 11-13-2013, 05:15 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It wasn't intended to fix opera, but I might be able to spare some time to look into it.
Reply With Quote
  #4  
Old 11-16-2013, 10:29 PM
Afrika Afrika is offline
 
Join Date: Aug 2004
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great Thanks
Reply With Quote
  #5  
Old 11-20-2013, 07:27 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Made a small change to fix a IE10 detection issue.
Reply With Quote
  #6  
Old 11-28-2013, 09:36 AM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for posting zachery

one note tho the first file is rather large so for reference its looking 3/4 down or so line 7200something or such i forget exact but in that area
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04244 seconds
  • Memory Usage 2,279KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete