Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #255993

    Hi,

    i use enfold with buddypress. It works great!

    I have one thing i can’t find a solution for.
    In the group there is the activity stream. I want to remove the group avatar from the activity stream. I found an answer with this code.

    function bp_dtheme_activity_secondary_avatars( $action, $activity ) {
        if ( $activity->component = 'friends' ) {
        // Only insert avatar if one exists
        if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) {
        $reverse_content = strrev( $action );
        $position = strpos( $reverse_content, 'a<' );
        $action = substr_replace( $action, $secondary_avatar, -$position - );
    }
     break;
     }
    
     return $action;
     }
     add_filter( 'bp_get_activity_action_pre_meta', 'bp_dtheme_activity_secondary_avatars', 10, 2 );

    But this does not work when i put it in the child themes function.php . I get a white page.

    It would be great if someone has an idea how to solve that problem”

    Thanks Simon

    #256038

    Hey simonac!

    Thank you for using the theme!

    Please try this:

    function bp_dtheme_activity_secondary_avatars( $action, $activity ) {
    switch ( $activity->component ) {
    case 'friends' :
    // Only insert avatar if one exists
    if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) {
    $reverse_content = strrev( $action );
    $position = strpos( $reverse_content, 'a<' );
    $action = substr_replace( $action, $secondary_avatar, $position);
    }
    break;
    }
    
    return $action;
    }
    add_filter( 'bp_get_activity_action_pre_meta', 'bp_dtheme_activity_secondary_avatars', 10, 2 );

    We would like to see an example of the page where the avatar is showing.

    Regards,
    Ismael

    #256040
    This reply has been marked as private.
    #256503

    Hi!

    Thank you for the update.

    Are you trying to remove the images or avatar on the comments or feed area? I don’t understand the language so I’m not sure what it is. Please try this on Quick CSS or custom.css:

    .groups img.avatar {
    display: none;
    }

    Cheers!
    Ismael

    #256548

    Hi Ismael,

    just the avatar on the feed. Your codes deletes the group avatar images of the feed but also the big group image on the top of the group. The main group image should not be deleted.

    Kind Regards, Simon

    #256549

    http://www.directupload.net/file/d/3604/bfcpu4vt_jpg.htm
    here is a sshot

    • This reply was modified 10 years, 7 months ago by simonac.
    #256945

    Hi!

    Try this code:

    
    #top .activity-header img.avatar {
    display: none;
    }
    

    Cheers!
    Peter

    #257078

    Perfekt. That did the Job! Thanks guys!

    Great support!

    Simon

    #257080

    Do you also have an idea how i can custmize the size of the group image on top?

    #257536

    Hi!

    No, unfortunately I’m not familiar with buddypress and I don’t know how you can replace the image with a bigger thumbnail.

    Cheers!
    Peter

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