If this is a stupid question, and the answer is hidden in a FAQ or previous topic, etc., please let me know – as I have searched and can not find anything relating to this topic….
Side conversation – it is possible to replace the default avatars with something custom? Not Gravatar but our own folder of images from which to randomly apply avatars?
That’s what I am try to ask actually Brian. It looks like we’re not going to get an answer.
“Is there anyway to override this, so that we can just keep the ones that users uploaded already?”
Uploaded to *where*? What plugin?
seobrien –
Read this: http://wpmu.org/how-to-add-a-custom-default-avatar-for-buddypress-members-and-groups/
iamnorthwind –
If you’re using another plugin to upload avatars, you’ll need to override the way BuddyPress fetches avatars.
Specifically, you’ll need to override the “bp_core_fetch_avatar” filter located in /buddypress/bp-core-avatars.php file.
Need a primer on filters? Read this:
https://codex.wordpress.org/Plugin_API#Filters
@R-a-y:
Many thanks! I will give it a go (noticed you’re credited in the first article you mentioned nicely done and let ya know.
@R-a-y:
Works like a charm. Thanks again!
I take it that gwu123 individual did indeed move his post cuz I don’t see what you’re referring to
What if I want to do more than just replace the one default avatar?
What if I want to provide a gallery of avatars users can choose from (by uploading a bunch of avatars to a folder)?
Ideally I’d like to allow users to select from the avatars I’ve uploaded, as well as allow them to upload one of their own.
I want to keep my site’s theme consistent. I’m making a site for a Star Wars: The Old Republic guild. I’ve got 156 avatars. Ideally, I’d like users to be able to choose from these avatars in addition to uploading one of their own. But let’s start with something even easier. If they don’t have a custom avatar, instead of default to Mystery Man, I’d like to default to one randomly chosen from the 156. Could I just do something like this:
`$tmp = glob(‘avatars/*.gif’);
if (is_array($tmp))
{
$flist = array_merge($flist,$tmp);
}
$default_avatar = $flist[array_rand($flist)];
add_filter( ‘bp_core_mysteryman_src’, $default_avatar );`
My fear in trying this out, is that every time it displayed any default avatar if would pick one at random. What I’d like is to do the randomization once in assigning an avatar to a user if they don’t have one.
Bump for great justice!
Is there any way to provide a gallery of avatars to choose from, or to randomly pick from the pre-provided avatars for people who don’t upload their own?
i too have been searchin for this since some time now… why is this so hard… cannot believe this has not been addressed by anyone thus far.
@enderandrew…. hey guys.. i think i found something that should work. If you want a custom set of pics to replace the default buddypress avatars and be assigned by random to members… here goes:
https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/custom-set-of-avatar-pics/#post-101775