BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9903

    Thanks Brajesh! That would be awesome, but please only worry about this if you are interested and think it’d benefit other users too, and you have time. The method I’m using is working, so, no need for a special addition just on my behalf. Thanks again for the helpful info.

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9637

    Hi again guys,

    Confirmed with Shane from EWWW that the first hook should indeed be add_filter, as above. This allows EWWW to resize earlier and use less memory, and also ensures image rotation is handled properly for thumbnails. Shane said he is going to do some more testing and plans to include these 2 filters directly in a future version of EWWW.

    • This reply was modified 7 years, 4 months ago by Andy.
  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9636

    Hi again,

    Shane from ewww suggested using ‘mpp_generate_metadata’ for the second hook and problem is solved!

    Another thing I noticed is mpp_handle_upload looks like a filter hook, not an action hook. (See line 267: https://github.com/buddydev/mediapress/blob/master/core/storage/class-mpp-local-storage.php). I tried changing ‘add_action’ to ‘add_filter’ for the first hook, result seems the same. I guess as long as ewww_image_optimizer_handle_upload is returning what the hook expects it will be fine either way. But maybe good practice to use ‘add_filter’ here?

    Here is the code I am testing now:


    add_action( ‘init’, ‘mpp_ewww_optimizer_bridge’ );
    function mpp_ewww_optimizer_bridge() {

    if( function_exists( ‘ewww_image_optimizer_handle_upload’ ) ) {

    add_filter( ‘mpp_handle_upload’, ‘ewww_image_optimizer_handle_upload’ );
    add_filter( ‘mpp_generate_metadata’, ‘ewww_image_optimizer_resize_from_meta_data’, 15, 2 );

    }
    }

    Just tested with a 5120×3400 image upload and it successfully processed the original, resizing down to 1920px as specified in ewww settings, and compressed by 96%! So all seems to be working.

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9600

    Thanks Brajesh, I really appreciate your help.

    I also emailed the developer of ewww and will update if I find out anything helpful from him.

    • This reply was modified 7 years, 4 months ago by Andy.
  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9597

    Thank you, Brajesh.

    The information you provide is really helpful, and I figured out the issue, on my site anyways.

    Apparently jquery UI sortable/droppable doesn’t work properly on IOS by default (see here for example: https://stackoverflow.com/questions/12051045/jquery-ui-sortable-and-dragable-not-working-on-ipad-iphone-or-android)

    There is an easy fix, which is to load the following small js script that modifies the behavior:

    http://touchpunch.furf.com/

    Just implemented this and it works on my iphone now! The styling of the reorder template is messed up but it’s probably my theme and I should be able to make it look nice with a child theme override and CSS work.

    Thanks,
    Andy

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9578

    Guys one thing to note, there is a typo in the callback function name in that linked code snippet above (‘eww’ vs ‘ewww’). But even after I fixed that, it still isn’t working. Have the hook names changed maybe?

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9476

    To provide some further info: I am running version 1.1.9. It seems that visibility conditions are treating checkboxes as radio buttons. Is this intended functionality that I can only condition on single selections? Thanks.

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9264

    Hi Brajesh,

    Yes the issue is fixed!

    Wow, thanks for the quick patch, especially on the weekend.

    I’m impressed with your support.

    Gratefully,
    Andy

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9258

    Sounds good, Brajesh. Let me know if I can provide any further info to assist with developing the fix. It would be great if this thread could be updated when that fix is available, so I’ll know to patch it.

    Thanks very much,
    Andy

  • Participant
    Level: Initiated
    Posts: 14
    Andy on #9256

    Hi Brajesh,

    Thanks for your reply. I have set the preferences as you suggest and the ‘protected’ tab is still present as a navigation tab in every member’s profile. Even though these profiles are not set to protected either by default or in each member’s profile settings. Also the plugin’s mode is set to redirect.

    Here is a screenshot:
    https://ibb.co/bxoidF

    I am sure this is not the intended behavior of your plugin?

    Thanks,
    Andy