[buddypress-trac] [BuddyPress Trac] #6290: Avatars, an extensible UI

buddypress-trac noreply at wordpress.org
Wed Apr 8 15:41:08 UTC 2015


#6290: Avatars, an extensible UI
------------------------------------+-----------------------
 Reporter:  imath                   |       Owner:  imath
     Type:  idea                    |      Status:  assigned
 Priority:  normal                  |   Milestone:  2.3
Component:  API - Avatars           |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------

Comment (by imath):

 Apart from concerns related to where to put the templates, how to name the
 folder, how to load the templates...

 These last 2 days i had a fight with Internet Explorer 8, testing the
 patch in it. In the end, i don't know if i should kill him or kiss him!

 So 6290.09.patch is bringing compatibility with IE8, improving our
 BuddyPress plupload file and revealing a problem in the
 {{{bp_core_check_avatar_type()}}}.

 How works plupload ? You set the available runtimes in your script, that's
 what we're doing in {{{bp_attachments_get_plupload_default_settings()}}}
 and the library will use the first runtime available. So far as i've
 tested in Chrome/Safari and Firefox, i was always getting the html5
 runtime. But with my tests in IE8, once i've resolved some javascript
 issues (that was the most painful 2 days of my coding life!), i've found
 that, as we are falling back on the flash runtime, the
 {{{bp_core_check_avatar_type()}}} keeps on returning a file extension
 error despite the file is a jpg, png or gif image. I then checked in
 Chrome by disabling html5 and the same issue showed up.

 Here's a little summary of my tests with supported image files :
 ||=Runtime=||={{{bp_core_check_avatar_type()}}}=||
 ||html5||success||
 ||silverlight||success||
 ||flash||error||

 Reason: in flash the mime type is 'application/octet-stream' and not
 {{{preg_match('/(jpe?g|gif|png)$/i', $file_type ) )}}}. This is not
 happening when you rely on WordPress to upload your file because WordPress
 uses {{{wp_check_filetype_and_ext()}}}. Hopefully, thanks to DJPaul
 there's a ticket (#6336) about this, so i just added a new version of
 [https://buddypress.trac.wordpress.org/attachment/ticket/6336/6336.02.patch
 the attached patch] and it's solving the issue in IE8 (actually with
 flash).

 - I still need to improve the javascript strategy in case the plupload
 runtime happens to be html4.
 - I still need to check IE versions that are supporting html5 uploads eg:
 10 & 11. Thanks to hnla we confirmed yesterday that 6290.08.patch was
 failing in these two browsers. I hope 6290.09.patch will fix the trouble
 in these, else i guess i'll need to virtualize WIN/IE !

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6290#comment:42>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list