This topic has 14 replies, 3 voices, and was last updated 6 years by Radu.

  • Author
  • #210593
     arbolife
    Participant

    Hi,

    I already had this issue with Geodirectory where they were using get_avatar instead of bp_core_fetch_avatar for a listing’s owner.

    The problem is: a user creates a profile with Facebook account (where they might have a funny picture as profile picture). Then they change their cover image in BP to a new one. But then as a blog post owner, it still displays the Facebook image rather than the one they uploaded.

    Can you please provide a snippet I can put in functions.php so that the theme uses bp_core_fetch_avatar instead of get_avatar for blog post owner ?

    Thanks,

    Marc

    #210639
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #210660
     Radu
    Moderator

    I think it might be easier to edit the blog templates where the user avatar it’s called ?

    Can you screenshot me in frontend in blog area including page url which avatar ? post page url ? category?

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #210701
     arbolife
    Participant
    This reply has been set as private.
    #210955
     Radu
    Moderator

    Hi,

    Can you please provide FTP and WP admin to can test various please ?

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #211033
     arbolife
    Participant
    This reply has been set as private.
    #211280
     Radu
    Moderator

    Hi,

    IT should be ok now,

    I had used a temp solution i had edited directly in parent in this file : wp-content/themes/kleo/kleo-framework/lib/function-facebook-login.php line 390 ±

    this thing, i just commented that line

    On next update that will be overwritten.

    I will look for a snippet solution in future.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #211286
     arbolife
    Participant

    Thanks Radu, it works fine now.

    Will you create the snippet now or does it need to be coded differently so the snippet can function ? I’d like to avoid having to open a new support ticket by the next update.

    Cheers,
    Marc

    #211290
     Radu
    Moderator

    I think we don’t need to change the code to make the snippet to work for the moment. Will let you know.
    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #211994
     arbolife
    Participant

    Hi Radu,

    OK thanks, let me know when you have it.

    Cheers,
    Marc

    #212175
     Radu
    Moderator

    Hi,

    Try to add this function in child theme functions.php and let me know

    <img src=”
    if ( ! function_exists( ‘kleo_fb_bp_show_avatar_url’ ) ) {
    function kleo_fb_bp_show_avatar_url($gravatar, $params)
    {

    //if we have an avatar uploaded and is not Gravatar return it
    if (strpos($gravatar, home_url()) !== false && strpos($gravatar, ‘gravatar’) === false) {
    return $gravatar;
    }

    return $gravatar;
    }
    }”>

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #212752
     arbolife
    Participant

    Hi Radu,

    I tried to put this code as it is in my functions.php file and it generates an HTTP error 500.

    COPY CODE
    <img src=”
    if ( ! function_exists( ‘kleo_fb_bp_show_avatar_url’ ) ) {
    function kleo_fb_bp_show_avatar_url($gravatar, $params)
    {
    
    //if we have an avatar uploaded and is not Gravatar return it
    if (strpos($gravatar, home_url()) !== false && strpos($gravatar, ‘gravatar’) === false) {
    return $gravatar;
    }
    
    return $gravatar;
    }
    }”>

    Cheers,
    Marc

    #212863
     Radu
    Moderator

    Sorry there was something in plus >img src tag not sure why… the snippet should be like this

    COPY CODE
    
    
    if ( ! function_exists( 'kleo_fb_bp_show_avatar_url') ) {
        function kleo_fb_bp_show_avatar_url($gravatar, $params)
        {
    
    //if we have an avatar uploaded and is not Gravatar return it
            if (strpos($gravatar, home_url()) !== false && strpos($gravatar, 'gravatar') === false) {
                return $gravatar;
            }
    
            return $gravatar;
        }
    }
    

    Or copy it from there : https://pastebin.com/raw/xRqY1ssp

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #212878
     arbolife
    Participant

    Thanks Radu, it seems to work.

    Cheers,
    Marc

    #212964
     Radu
    Moderator

    Great
    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 15 posts - 1 through 15 (of 15 total)

The forum ‘Bugs & Issues’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?