@foralien: changing that one line totally did it! Thanks so much for the help!!
@justbishop happy to hear that
@foralien – nice work. thk u!
Trying to understand if this solves the BP Avatar not showing in WP MS blogs.
@foralien: I have to say … HA HA HA The first time I tried this my site went way way south !! But it was just me being in a hurry and not adding
<?php tags to the file… A php file without php tags ? Hmm…
Your code works on WP 3.0.1 with BuddyPress 1.2.6
EDIT: Code works on WP 3.0.2 as well.
Many many thanks !!
I think you can use the User Avatar Plugin
https://wordpress.org/extend/plugins/user-avatar/
Cheers Enej
Thanks, this fixed it for me. Didn’t need to code in absolute path; using WP 3.0.1 and BP 1.2.6
Just starting a network at our College and trying work kinks out before unleashing the building team.
in case anyone’s interested, here’s the exact code that worked for me on wp multi site 3.0.1 and bp 1.2.6, sub blogs on sub domains (thanks to @foralien).
add this to a bp-custom.php file and place the file in /wp-content/plugins/ (if you already have a bp-custom file, then add the code to the same one between the php start/end)
worked like a charm. been searching for answer to this for several days! finally.
`
function nfm_bp_avtar_upload_path_correct($path){
if ( bp_core_is_multisite() ){
$path = ABSPATH . get_blog_option( BP_ROOT_BLOG,
‘upload_path’ );
}
return $path;
}
add_filter(‘bp_core_avatar_upload_path’,
‘nfm_bp_avtar_upload_path_correct’, 1);
function nfm_bp_avatar_upload_url_correct($url){
if ( bp_core_is_multisite() ){
$url = get_blog_option( BP_ROOT_BLOG, ‘siteurl’ ) .
“/wp-content/uploads/”;
}
return $url;
}
add_filter(‘bp_core_avatar_url’, ‘nfm_bp_avatar_upload_url_correct’,
1);
`
sorry. one correction. on the line with “/wp-content/uploads/” probably best to take the ending forward slash out. so now it’s “/wp-content/uploads”. still works the above way, but the url output seems to be technically more correct without the ending slash
In case anyone is still seeking answers to this challenge I have WP 3.0.4 MultiSite and BP 1.2.7 and @roberte ‘s solution works fine. However, I got so excited I forgot to make the “/” change but it still works fine. So, either solutions is good. Thanks @roberte
I suddenly lost my custom avatars…. after trying and searching for several hours (!) I discovered I had 2 files in my /upload directory: .htpasswd and .htaccess. I renamed both files and my custom avatars showed up again!
FYI this problem is fixed in BP 1.3
This code works on my WP 3.0.4 Multisite, BP 1.2.7 install, but unfortunately it breaks my chat function. I use cometchat for buddypress, and as soon as applying this code in bp-custom.php in the plugins folder, cometchat breaks (does not show up at all). Any idea what can be causing this?
in bp-custom.php, I defined both constant: BP_AVATAR_UPLOAD_PATH, BP_AVATAR_URL
Hey there, I tried uploading the bp-custom.php file to the plugins folder with this code, but it broke the site. Is it missing something?