Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

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
  #12  
Old 12-03-2013, 06:52 PM
Boothby Boothby is offline
 
Join Date: Mar 2002
Location: at home
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about the browser detection in the javascript files? Do they need a fix as well?
Reply With Quote
Благодарность от:
cellarius
  #13  
Old 12-03-2013, 08:10 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nearly positive all of our detection is done with is_browser, I haven't detected anything working/not working based on js detection.
Reply With Quote
Благодарность от:
Boothby
  #14  
Old 12-12-2013, 12:14 AM
bitwise2000 bitwise2000 is offline
 
Join Date: Apr 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone fixed this on 3.7?
Reply With Quote
  #15  
Old 12-12-2013, 12:31 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cellarius View Post
Thanks, Zachery! Installed. Do you know whether this will be included into vB3.8.8 before release? Just so I know whether I'll have to remember to redo it after an eventual upgrade.
I added it to 3.8.8 Beta 3.

(Yes, I know it not downloadable yet, but it will be when I get time to make it available).
Reply With Quote
2 благодарности(ей) от:
blind-eddie, cellarius
  #16  
Old 12-15-2013, 03:07 PM
bitwise2000 bitwise2000 is offline
 
Join Date: Apr 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bitwise2000 View Post
Anyone fixed this on 3.7?
Answered my own question. Fix is identical for 3.7.6

Thanks!
Reply With Quote
  #17  
Old 12-17-2013, 12:32 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?

Edit: Enabling the "Send Internet Explorer 7 Compatibility Header" option seems to fix it, however if I do that mods like the vbshop stop working properly (clicking the tabs on the main page of the shop does nothing).
Reply With Quote
  #18  
Old 12-17-2013, 01:32 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

You'd want to look at

/clientscript/yui/yahoo-dom-event.js and find:

else{A=B.match(/MSIE\s([^;]*)/);

Then you'd have to append something to match Trident, instead of IE, and check for rv: instead of the MSIE version string. I'm not a pro at regex so I don't quiet understand how that regex works or what its trying to match.

I don't think any version of YUI supports IE11 though, since it was discontinued almost 3 years ago now. Before IE was even a thing.
You'd need to add something like

else{A=B.match(/Trident\s([^;]*)/);


basically, you need to patch YUI with IE11 detection. I'm not sure if the above code is correct, you'll have to dig around and check out how the user agent is parsed, and then figure out how to add the additional parsing.
Reply With Quote
  #19  
Old 12-17-2013, 01:43 AM
EvilLS1's Avatar
EvilLS1 EvilLS1 is offline
 
Join Date: Apr 2002
Location: Georgia, USA
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Zachery. I'll have a look at it tomorrow.
Reply With Quote
  #20  
Old 12-17-2013, 10:03 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This regex will match Trident OR MSIE....

Code:
[Trident|MSIE]+\s([^;]*)
so the code would be...

Code:
else{A=B.match(/[Trident|MSIE]+\s([^;]*)/);
Note- it should work but is not a perfect Regex- besides matching Trident or MSIE it will also match for example rent or SIEM but since these aren't valid / known useragents it should be OK.
Reply With Quote
  #21  
Old 12-17-2013, 10:02 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<font face="Courier">(Trident|MSIE)</font> would match specifically one of those two words, but I don' know how that affects the JS.
Reply With Quote
Reply

Thread Tools

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:11 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.04873 seconds
  • Memory Usage 2,342KB
  • 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
  • (2)bbcode_code
  • (4)bbcode_php
  • (2)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
  • (6)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