BuddyDev

Search

Profile Cover Page Confirmation

  • Participant
    Level: Initiated
    Posts: 11
    Mocha on #23735

    Hello,

    When uploading profile cover images, it seems that the “Your new cover image was uploaded successfully.” is not triggered every time. I tested it and the confirmation only appears when you upload an image that is at least 1300px wide and 225px tall.

    If the image is smaller, this message triggers:

    “For better results, make sure to upload an image that is larger than 1300px wide, and 225px tall.”

    Here is an example: https://imgur.com/KFzHL1b
    Mushrooms (734px by 280px)
    Pink Image (1350px by 350px)

    Is there a way to change the text so if an image is smaller than the recommended size, it says:

    “Your new cover image was uploaded successfully. For better results, make sure to upload an image that is larger than 1300px wide, and 225px tall.”

    Thank you so much in advance for your help.

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #23740

    Hi Mocha,
    Please use a translation tool(poedit) or any plugin(if you are using any translation plugin) and you can translate the text to specify that message.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    Mocha on #23762

    Brajesh,

    I am avoiding adding unncessary plugins and I am not too familar with poedit.
    However, I was able to find where the warning text is located at:

    
         // Set warning messages. 
            $strings['cover_image_warnings'] = apply_filters( 'bp_attachments_cover_image_ui_warnings', array( 
                'dimensions' => sprintf( 
                        __( 'For better results, make sure to upload an image that is larger than %1$spx wide, and %2$spx tall.', 'buddypress' ),  
                        (int) $cover_dimensions['width'],  
                        (int) $cover_dimensions['height'] 
    

    However, it is under /bp-core/bp-core-attachments.php so I am not going to change it as editing core files is not recommended.

    Is there a way for me to change the text through filters in bp-customs.php? If so, may you provide some guidance on how to do so? Users have said that not having a confirmation after uploading their cover image caused confusion and they were unaware that it was successfully uploaded until they returned back to their profile.

    Thank you so much!

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #23767

    Hi Mocha,
    Poedit is the best option in my opinion.

    You can use filter.

    Here is the link
    https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    Mocha on #23880

    Brajesh,

    Thank you so much for your help. I was able to figure out how to translate the text with the link you provided.

    As a follow-up, do you know why the confirmation of “your new cover image was uploaded successfully.” is not triggered every time?

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #23883

    Hi Mocha,
    You are welcome.

    Is there a chance that you are using any custom theme?

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 11
    Mocha on #23885

    Brajesh,

    I am using the Editor Theme: https://wordpress.org/themes/editor/

  • Keymaster
    (BuddyDev Team)
    Posts: 21785
    Brajesh Singh on #23902

    Please ask the theme authors for the same. I am guessing it is some conflict with theme or plugin. otherwise the notice should be consistent.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved