• Resolved dassoubarna

    (@dassoubarna)


    Thanks Justin for a great plugin.

    Presently I am working on a Buddypress community forum. In buddypress avatars stores in a directory named with the ID of the member at “wp-content/upload/avatars” and avatar images suffix with -bpthumb/-bpfull.

    I have seen that FB-Connect caches FB Avatar and stores them in a pre-defined directory at “wp-content/upload/facebook-avatars” with the file name starts with user ID and end with -Full or -Thumb.

    My question is, is it possible to create a directory named as User’s ID and avatars images end with -bpfull/-bpthumb instead of _Full/_Thumb?

    I have found the code in “_process_login.php” which may stores the FB Profile pictures as WP Avatars.

    if( $fbuser['pic_square'] )
    {
        if( isset($fbuser['pic_square']['data']['url']) ) $avatarThumb = $fbuser['pic_square']['data']['url'];
    	else 											  $avatarThumb = $fbuser['pic_square'];
        if( isset($fbuser['pic_big']['data']['url']) )    $avatarFull = $fbuser['pic_big']['data']['url'];
    	else 											  $avatarFull = $fbuser['pic_big'];
    	update_user_meta($user_login_id, 'facebook_avatar_full', $avatarFull);
    	update_user_meta($user_login_id, 'facebook_avatar_thumb', $avatarThumb);
    	$jfb_log .= "WP: Updated small avatar ($avatarThumb)\n";
    	$jfb_log .= "WP: Updated large avatar ($avatarFull)\n";
    }
    else
    {
        update_user_meta($user_login_id, 'facebook_avatar_thumb', '');
        update_user_meta($user_login_id, 'facebook_avatar_full', '');
        $jfb_log .= "FB: User does not have a profile picture; clearing cached avatar (if present).\n";
    }

    I am not an expert in PHP coding but I can understand it little bit. I think if I modify this section then I may able to fulfill my requirement.

    Could you please help me to guide how can I do that? Pleas!!

    And sorry for my bad english as I am not a english speaking person.

    https://www.ads-software.com/extend/plugins/wp-fb-autoconnect/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘FB Avatar for Buddypress with WP-FB-Autoconnect’ is closed to new replies.