[buddypress-trac] [BuddyPress] #4252: Avatars are (erroneously) stored locally when running BP_ENABLE_MULTIBLOG

buddypress-trac noreply at wordpress.org
Mon Jan 14 14:44:57 UTC 2013


#4252: Avatars are (erroneously) stored locally when running BP_ENABLE_MULTIBLOG
-----------------------------------------+-----------------------------
 Reporter:  douglance                    |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Future Release
Component:  Core                         |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  reporter-feedback has-patch  |
-----------------------------------------+-----------------------------
Changes (by lrv):

 * cc: lrv (added)
 * keywords:  reporter-feedback => reporter-feedback has-patch


Comment:

 Here is the code fixed for me avatar and group avatar problem that
 appeared after BP_ENABLE_MULTIBLOG had been activated.

 {{{
 /* This fixes the BP_ENABLE_MULTIBLOG avatar problem */
 function nfm_bp_avtar_upload_path_correct($path){
     if ( bp_core_is_multisite() ){
      //   $path = ABSPATH . get_blog_option( BP_ROOT_BLOG, 'upload_path'
 );
                 $path = ABSPATH . 'wp-content/uploads/';
     }
     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);

 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4252#comment:10>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list