+1, updated to 1.2.7 but my theme isnt
template pack is outdated
No, I do not wish to update template pack because I have so many customizations that it would take me an hour to back it up
It would probably take some transferring of code from the bp-default theme to the template pack but i don’t know where that code would be right off hand
I looked at template pack and it should be getting the group image. You say you edited the template pack files that could be the problem.
@modemlooper, are you the template pack owner? The image has never been there even before i made customizations.
Is the image defined in the CSS?
The code you’re looking for is this:
`if ( !function_exists( ‘bp_dtheme_activity_secondary_avatars’ ) ) :
function bp_dtheme_activity_secondary_avatars( $action, $activity ) {
switch ( $activity->component ) {
case ‘groups’ :
case ‘friends’ :
// Only insert avatar if one exists
if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) {
$reverse_content = strrev( $action );
$position = strpos( $reverse_content, ‘a<' );
$action = substr_replace( $action, $secondary_avatar, -$position – 2, 0 );
}
break;
}
return $action;
}
add_filter( ‘bp_get_activity_action_pre_meta’, ‘bp_dtheme_activity_secondary_avatars’, 10, 2 );
endif;`
Add to your theme’s functions.php.
*Sidenote: I’m working on my own “template pack” plugin, tentatively titled “BuddyPress Theme Unite!”, which will make it way easier for theme developers to add support for BuddyPress to their WP theme.
@r-a-y, when I put your code inside, I get `Parse error: syntax error, unexpected T_FUNCTION`
@bigjimmysisco, remove
`if ( !function_exists( ‘bp_dtheme_activity_secondary_avatars’ ) :`
And
`edif;`
Awesome! thanks r-a-y, and Savannah
@r-a-y looking forward to “BuddyPress Theme Unite!”
@bigjimmysisco – Please try the amended code; I was typing on the fly and forgot to end the conditional statement!
The function_exists() conditional is important because if you ever upgrade BP Template Pack, you’ll get an error.
—
@mercime – Yeah, I’m looking forward to the release as well
Actually BuddyPress core should be amended to work with any WP theme
@r-a-y, fixed it and got:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
it’s the colon at the end of the line: “:” you need a semicolon “;”