Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to Change Mystery Man Graphic without Overwriting Core Image File [Trac Denied]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Avatar of aces
    aces
    Participant

    @aces

    It’s not quite the same thing but with bp version 1.5.6, I use the following in bp-custom.php:
    `
    // see: http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/1-5-group-avatars-using-mystery-man-default#post-109448
    function my_avatar_defaults() {
    global $bp;
    // change ‘identicon’ to anything listed here:
    // http://en.gravatar.com/site/implement/images/#default-image
    $bp->grav_default->group = ‘identicon’;
    $bp->grav_default->user = ‘monsterid’;
    }
    add_action( ‘bp_init’, ‘my_avatar_defaults’ );
    `

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    @aces. I am looking through your response. Where do I define the location of my Mystery Man graphic inside your code solution?

    I have it located at `../wp-content/themes/my-theme/images/mystery-man.jpg`

    Avatar of aces
    aces
    Participant

    @aces

    The link within the post above ( http://en.gravatar.com/site/implement/images/#default-image ) has more information about what you want to do….

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    Awesome @aces…I think we are getting closer…Do you know where I insert `` ?

    Do I place it all by itself in my `functions.php file`? If I do (being a PHP coder) I know a stray html tag will show that image on every page. I need to somehow wrap it around a `do_action()` or and `add-action()` or an `add-filter()` or an `add_filters()` — I believe, as I learn more about hooking in WordPress/BuddyPress.

    Thanks for guiding me on what to most out there is such a simple replacement to the out-of-the-box Mystery Man image graphic.

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    any BP mystery men experts out there?

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    Sarah Gooding’s example should work. Though it’s missing one step, you have to login to the WP admin dashboard and navigate to “Settings > Discussion”.

    Next, under “Avatars”, select “Mystery Man” and save. Now, the code snippet should take effect.

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    My Avatar Default was set already to Mystery Man.

    So let me ask this…

    Maybe it is not overwriting because it already saved the mystery man avatar to their profile? Is that what is happening?

    I am trying to get BuddyPress to use my default avatar for all instances where the member has not yet loaded a picture (or avatar). But maybe my thinking is wrong…

    Please confirm that I can or cannot overwrite the mystery man avatar, at anytime, on the fly?

    Thanks @r-a-y !!

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    Has anyone had any success substituting the `Mystery Man` graphic by placing it in non-core or non-plugin directory without actually replacing the actual out-of-the box graphic?

    I am trying to avoid having my custom Mystery Man graphic get overwritten if/when I do an upgrade to BuddyPress.

    Thanks.

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    Any Guru’s out there? I think the ability does not exist so I created a Trac enhancement ticket request.

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    Ok, I got to the bottom of this (sort of).

    My need and request ends up being a duplicated need requested 3 years ago (see http://buddypress.trac.wordpress.org/ticket/501)

    So it looks like we have to live with the static Mystery Man graphic hard coded into BP.

    The work around is to overwrite the BP Mystery Man graphic each and every time you upgrade your BP.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.