@zudie
12 years, 4 months ago
Use this code in either your functions.php or bp_custom.php:
`add_filter( ‘bp_blogs_activity_new_post_content’, ‘my_activity_content’, 2, 10 ); function my_activity_content($activity_content, $post, $post_permalink){ $postid=$post->ID; $activity_content = get_the_post_thumbnail( $postid ); $activity_content .= bp_create_excerpt( $post->post_content, 25 ); return $activity_content; }`
This creates the content block of your activity stream. In the example it adds the thumbnail for the featured image and it creates an excerpt.
12 years, 6 months ago
I think I got the right direction for you:
In bp-custom.php add:
`/Change wording in Activity Stream and use post_type iso of ‘post’ add_filter( ‘bp_blogs_activity_new_post_action’, ‘im_activity_content’, 2, 10 );
function im_activity_content($activity_content, $post, $post_permalink){
$activity_content = sprintf( __( ‘%s submitted a new ‘.$post->post_type.’: %s’, ‘buddypress’ ), bp_core_get_userlink( (int)$post->post_author ), ‘‘ . $post->post_title . ‘‘ ); $activity_content .= bp_create_excerpt( $post->post_content, 25 );
return $activity_content; }`