Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

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

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

IE11 gets along pretty well with vB3, though file downloads get a bit wonky due to some changes in how IE is detected.

In 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']) 

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
cellarius, Gladius2007

Comments
  #22  
Old 12-17-2013, 11:16 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
[minicode](Trident|MSIE)[/minicode] would match specifically one of those two words, but I don' know how that affects the JS.
My concern was the extra parentheses would throw off the rest of the script.
Reply With Quote
  #23  
Old 12-22-2013, 03:16 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did anyone try?
Reply With Quote
  #24  
Old 12-28-2013, 11:36 PM
JamesC70 JamesC70 is offline
 
Join Date: Jun 2007
Posts: 219
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EvilLS1 View Post
Smileys don't seem to work in IE11/vB3.8 by clicking them in WYSIWYG mode. Works fine in compatibility mode. Any fix for this?
Quote:
Originally Posted by Zachery View Post
It appears that YUI will also need to be updated to handle the issues with the editor. Though, I don't know how reasonable that will be. I suspect we can just append similar code to the YUI file for browser matching. But I'm not overly familiar with js.
YUI has been updated: http://www.yuiblog.com/blog/2013/12/...14-1-released/ Has anyone at vB verified that this fixes the issue on 3-series forums? (Alternately: how badly would it screw up our sites if we used this one instead of YUI 2.9.0? )
Reply With Quote
  #25  
Old 12-28-2013, 11:42 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

YUI 3, is not YUI 2, its not a drop in replacement. Moving to YUI 3 is about the same as moving to Jquery, or another similar js lib.

So yes, to get IE11 support in vBulletin fully, you'd need to update yui to support something it wasn't originally intended to.
Reply With Quote
2 благодарности(ей) от:
JamesC70, Kaelon
  #26  
Old 01-05-2014, 03:10 PM
Boothby Boothby is offline
 
Join Date: Mar 2002
Location: at home
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
[Trident|MSIE]+
Sorry, but this makes no sense at all, because it would even match M or MM or MMMMMMMM or in an unbelievable worst case |||||. Uuuh.
The | has no meaning between []. The chars/letters are alternatives, so you could also write:
Code:
(T|r|i|d|e|n|t|\||M|S|I|E){1,}
So, after looking into the original source codes of YUI 2 and 3 I would suggest to replace

Code:
else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}
with

Code:
else{a=c.match(/MSIE ([^;]*)|Trident.*; rv:([0-9.]+)/);if(a&&(a[1]||a[2])){g.ie=e(a[1]||a[2]);}
The browser detection is very similar in both, YUI 2 and 3 and the above code is from YUI3 and then backminified by me.

untested, hope it works
Reply With Quote
2 благодарности(ей) от:
BirdOPrey5, cellarius
  #27  
Old 01-05-2014, 06:57 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What YUI version file do you use, Boothby? I don't have that line in my /clientscript/yui/yahoo-dom-event.js.
Reply With Quote
  #28  
Old 01-05-2014, 07:26 PM
Boothby Boothby is offline
 
Join Date: Mar 2002
Location: at home
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I downloaded the latest version from yahoo, 2.9.0, and it seems identical to the latest stable and beta vBulletin builds. In an older build on my local install I found also Zachery's code which was from 2.7.0.

Here it is:

Find:
Code:
else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}
and replace with:
Code:
else{A=B.match(/MSIE ([^;]*)|Trident.*; rv:([0-9.]+)/);if(A&&(A[1]||A[2])){C.ie=parseFloat(A[1]||A[2]);}
And again, not tested with best hopes.
Reply With Quote
  #29  
Old 01-05-2014, 08:20 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

digitalpoint did some testing and he said the YUI 2.9 seemed to work, but again, its not supported by default.
Reply With Quote
Благодарность от:
cellarius
  #30  
Old 01-05-2014, 08:45 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks guys, appreciated! Shawn's word is good enough for me :-)
Reply With Quote
  #31  
Old 01-06-2014, 04:29 AM
Boothby Boothby is offline
 
Join Date: Mar 2002
Location: at home
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

YUI 2.9 is in the current download packages of vB 3.8.7 and 3.8.8.

Code:
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
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 04:13 PM.


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.06148 seconds
  • Memory Usage 2,346KB
  • Queries Executed 26 (?)
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_code
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (7)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete