Does anyone know how to do this?
To change BuddyPress avatars use_
define ( 'BP_AVATAR_THUMB_WIDTH', 50 );
define ( 'BP_AVATAR_THUMB_HEIGHT', 50 );
define ( 'BP_AVATAR_FULL_WIDTH', 150 );
define ( 'BP_AVATAR_FULL_HEIGHT', 150 );
you can define custom sizes for your BP avatar, replace 50 or 150 with the size in pixel you want
I’m trying to replace the size of the default bbPress forums avatar from 80 to 150px to match my BP_AVATAR_FULL size… bbPress 2.1 plugin is using 80by80px avatars by default apparently, do you know where to change that value to match 150px?
You can change the size of the avatar in bbpress in bp-reply-template.php on line 953. However, you will run into the same problem as I have. Even if you make it 150px it will still pull the thumb image which is 50px resulting in a fuzzy avatar. If you change the size of the thumb image to 150px your avatars in Buddypress will not look good. Solution? Make bbpress pull the BP_AVATAR_FULL instead of BP_AVATAR_THUMB. But how?
I’ve made some progress here:
[bbpress 2 plugin] – How to change default avatar size? (to match Buddypress)
but I haven’t come with the right solution yet so far…
ps – avoid hacking bbp core template files, you should use filters
Still haven’t found a solution either. I can’t imagine no one has run into this before, especially considering the number of people who use Bbpress and Buddypress together. Even if you use the standard setup it won’t look good as it will scale a 50px image to a 80px image.
Any news? I’m still stuck with this
Oh my goodness, this was driving me CRAZY! I figured out a solution that I hope will help you budddypress + bbress users out too!
Go to loop-single-reply.php in the bbpress theme files.
Find the line:
<?php bbp_reply_author_link( array( 'sep' => '<br />' ) ); ?>
This seems to be what is generating the avatar by default, so I commented it out and used the following code instead:
<?php // bbp_reply_author_link( array( 'sep' => '<br />' ) ); ?>
<?php
$replyauthor = bbp_get_reply_author_id();
if ( function_exists( 'bp_core_fetch_avatar' ) ) :
echo bp_core_fetch_avatar( array(
'item_id' => $replyauthor,
'type' => 'full',
'width' => 100,
'height' => 100
));
endif;
?>
My forums are happy and unfuzzy now. Hope it works for you too!
not working for me guys. anyone please…
craftcore, your way works partially because the name and role are removed. I’m looking for this like forever, and I never found a way to fix it…
Hi! I have solution of this problem.
Open file `/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php` and find there this lines of code:
`
function bp_core_set_avatar_constants() {
global $bp;
if ( !defined( ‘BP_AVATAR_THUMB_WIDTH’ ) )
define( ‘BP_AVATAR_THUMB_WIDTH’, 50 );
if ( !defined( ‘BP_AVATAR_THUMB_HEIGHT’ ) )
define( ‘BP_AVATAR_THUMB_HEIGHT’, 50 );
`
Just replace 50 to required size.
P.S. Sorry for my English…