How does MB Avatar Plugin enable the front end user to upload his avatar?

Support MB User Avatar How does MB Avatar Plugin enable the front end user to upload his avatar?Resolved

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #36116
    EddyPiVEddyPiV
    Participant

    Hi,

    I am looking for a solution to let the user of the website change his avatar at the front end. Through front end, i.e. by uploading an image.
    Sounds to me like the MB User Avatar solution.

    But I see no documentation at all, and the topics here seem not to use this plugin at all, but use MB User Profile functionality. And to use the Image Upload it requires to change some codes.

    Am I missing something? I was expecting that MB User Avatar would be a solution to all this, but I'm quite puzzled.

    Can you pls explain?

    #36126
    Long NguyenLong Nguyen
    Moderator

    Hi Eddy,

    The solution MB User Avatar works like the steps in this article https://metabox.io/create-custom-avatar/

    You can create your own custom field and update the user avatar by the field single_image with code. Then if you want to include the field on the frontend with the user profile shortcode, you can add the field group ID to that shortcode.
    https://docs.metabox.io/extensions/mb-user-profile/#edit-profile-form

    #36140
    EddyPiVEddyPiV
    Participant

    Hi Long,

    All that I understand. But for doing so, I don't need to install & activate the MB User Avatar plugin. Actually, that plugin results in another field in the user profile than the created custom field. So with the plugin active I have 2 profile image fields.

    I am puzzled about the so called solution of the MB User Avatar. It seems not to be used at all.
    Or am I missing something?

    Then back to how to get it working. I think I have done all what's in the documentation (deactivated actually the Avatar plugin), but the WordPress Profile picture is not changing. I guess that's what you mean with "single_image with code", is that the code in the functions.php file?
    Can you help me with the code that needs to be changed?

    #36152
    Long NguyenLong Nguyen
    Moderator

    Hi Eddy,

    Did you add this code to the file functions.php in the theme/child theme folder?
    https://metabox.io/create-custom-avatar/#step-2-get-data-from-the-custom-avatar-field-to-set-as-profile-picture

    The solutions are a combination of some MB extensions and custom code to resolve a problem for the customer with a few clicks. So you can use MB extensions and follow the article above without using MB User Avatar to set the user avatar with a custom field and include it on the frontend shortcode, because the meta box in the solution MB User Avatar does not have the meta box ID.

    #36166
    EddyPiVEddyPiV
    Participant

    I did add the code to the functions.php file, but it's not affecting the profile picture. Changed it back to Single Upload fieldtype. Still no luck.

    Then I did a plugin conflict test. It's conflicting with the BuddyBoss Platform Pro plugin. I also tried with priority 1 in the add_filter, but no difference either.

    I think I will have to proceed with the BuddyBoss avatar, although it comes with a bunch of other stuff that I don't like.

    Thanks Long for your help.

    #36187
    Long NguyenLong Nguyen
    Moderator

    Hi Eddy,

    Please update the plugin MB User Avatar to the new version 1.0.1 then you can use this meta box ID mb-user-avatar in the user shortcode.

    [mb_user_profile_info id="mb-user-avatar"]

    Let me know how it goes.

    #36190
    EddyPiVEddyPiV
    Participant

    Long, works like a charm.

    Thanks a lot, completely to my liking now!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.