Index: bp-blogs/bp-blogs-functions.php
===================================================================
--- bp-blogs/bp-blogs-functions.php	(revision 7591)
+++ bp-blogs/bp-blogs-functions.php	(working copy)
@@ -278,6 +278,45 @@
 add_action( 'transition_post_status', 'bp_blogs_catch_published_post', 10, 3 );
 
 /**
+ * Callback function to build the permalink to the post type
+ * 
+ * @param  integer $post_id the post type id
+ * @param  integer $blog_id the blog id
+ * @param  WP_Post  $post    Post object.
+ * @uses   add_query_arg()   To add custom args to the url
+ * @uses   get_home_url()
+ * @return string           the post type permalink
+ */
+function bp_blogs_activity_permalink_post_callback( $post_id = 0, $blog_id = 0, $post = null ) {
+	$post_permalink = add_query_arg(
+		'p',
+		$post_id,
+		trailingslashit( get_home_url( $blog_id ) )
+	);
+
+	return $post_permalink;
+}
+
+/**
+ * Callback function to build the action for the post type
+ * 
+ * @param  array  $args the available arguments
+ * @uses   bp_core_get_userlink() to build the post author profile link
+ * @uses   get_blog_option() WordPress function to fetch blog meta.
+ * @return string the activity action
+ */
+function bp_blogs_activity_action_post_callback( $args = array() ) {
+	extract( $args, EXTR_SKIP );
+
+	if ( !empty( $blog_id ) )
+		$activity_action  = sprintf( __( '%1$s wrote a new post, %2$s, on the site %3$s', 'buddypress' ), bp_core_get_userlink( (int) $post_author ), '<a href="' . $post_permalink . '">' . $post_title . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
+	else
+		$activity_action  = sprintf( __( '%1$s wrote a new post, %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post_author ), '<a href="' . $post_permalink . '">' . $post_title . '</a>' );
+
+	return $activity_action;
+}
+
+/**
  * Record a new blog post in the BuddyPress activity stream.
  *
  * @param int $post_id ID of the post being recorded.
@@ -311,8 +350,8 @@
 	if ( (int) $blog_id == $tags_blog_id && apply_filters( 'bp_blogs_block_sitewide_tags_activity', true ) )
 		return false;
 
-	// Don't record this if it's not a post
-	if ( !in_array( $post->post_type, apply_filters( 'bp_blogs_record_post_post_types', array( 'post' ) ) ) )
+	// Don't record this if the post type does not support bp_tracking
+	if ( ! post_type_supports( $post->post_type, 'bp_tracking' ) )
 		return false;
 
 	$is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
@@ -320,23 +359,37 @@
 	if ( 'publish' == $post->post_status && empty( $post->post_password ) ) {
 		if ( $is_blog_public || !is_multisite() ) {
 
-			// Record this in activity streams
-			$post_permalink = add_query_arg(
-				'p',
-				$post_id,
-				trailingslashit( get_home_url( $blog_id ) )
+			$post_type_object = get_post_type_object( $post->post_type );
+			extract( $post_type_object->bp_tracking, EXTR_SKIP );
+
+			// Builds the permalink to the post_type
+			if ( !empty( $activity_permalink_post_callback ) && is_callable( $activity_permalink_post_callback ) )
+				$post_permalink = call_user_func_array( $activity_permalink_post_callback, array( $post_id, $blog_id, $post ) );
+			else
+				$post_permalink = bp_blogs_activity_permalink_post_callback( $post_id, $blog_id, $post );
+
+			$action_args = array(
+				'post_author'    => $post->post_author,
+				'post_permalink' => $post_permalink,
+				'post_title'     => $post->post_title
 			);
 
-			if ( is_multisite() )
-				$activity_action  = sprintf( __( '%1$s wrote a new post, %2$s, on the site %3$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
+			if( is_multisite() )
+				$action_args['blog_id'] = $blog_id;
+
+			// Builds the activity action for the post type
+			if( !empty( $activity_action_post_callback ) && is_callable( $activity_action_post_callback ) )
+				$activity_action = call_user_func_array( $activity_action_post_callback, array( $action_args ) );
 			else
-				$activity_action  = sprintf( __( '%1$s wrote a new post, %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
+				$activity_action = bp_blogs_activity_action_post_callback( $action_args );
 
+			$type_post = !empty( $type_post ) ? $type_post : 'new_blog_post';
+
 			// Make sure there's not an existing entry for this post (prevent bumping)
 			if ( bp_is_active( 'activity' ) ) {
 				$existing = bp_activity_get( array(
 					'filter' => array(
-						'action'       => 'new_blog_post',
+						'action'       => $type_post,
 						'primary_id'   => $blog_id,
 						'secondary_id' => $post_id,
 					)
@@ -351,10 +404,10 @@
 
 			bp_blogs_record_activity( array(
 				'user_id'           => (int) $post->post_author,
-				'action'            => apply_filters( 'bp_blogs_activity_new_post_action',       $activity_action,  $post, $post_permalink ),
-				'content'           => apply_filters( 'bp_blogs_activity_new_post_content',      $activity_content, $post, $post_permalink ),
-				'primary_link'      => apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_permalink,   $post_id               ),
-				'type'              => 'new_blog_post',
+				'action'            => apply_filters( "bp_blogs_activity_new_{$post->post_type}_action",       $activity_action,  $post, $post_permalink ),
+				'content'           => apply_filters( "bp_blogs_activity_new_{$post->post_type}_content",      $activity_content, $post, $post_permalink ),
+				'primary_link'      => apply_filters( "bp_blogs_activity_new_{$post->post_type}_primary_link", $post_permalink,   $post_id               ),
+				'type'              => $type_post,
 				'item_id'           => $blog_id,
 				'secondary_item_id' => $post_id,
 				'recorded_time'     => $post->post_date_gmt,
@@ -371,6 +424,25 @@
 }
 
 /**
+ * Callback function to build the action for the comment on the post type
+ * 
+ * @param  array  $args the available arguments
+ * @uses   bp_core_get_userlink() to build the post author profile link
+ * @uses   get_blog_option() WordPress function to fetch blog meta.
+ * @return string the activity action
+ */
+function bp_blogs_activity_action_comment_callback( $args = array() ) {
+	extract( $args, EXTR_SKIP );
+
+	if ( !empty( $blog_id ) )
+		$activity_action = sprintf( __( '%1$s commented on the post, %2$s, on the site %3$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $post_title ) . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
+	else
+		$activity_action = sprintf( __( '%1$s commented on the post, %2$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $post_title ) . '</a>' );
+
+	return $activity_action;
+}
+
+/**
  * Record a new blog comment in the BuddyPress activity stream.
  *
  * Only posts the item if blog is public and post is not password-protected.
@@ -422,8 +494,8 @@
 	if ( !empty( $recorded_comment->post->post_password ) )
 		return false;
 
-	// Don't record activity if the comment's associated post isn't a WordPress Post
-	if ( !in_array( $recorded_comment->post->post_type, apply_filters( 'bp_blogs_record_comment_post_types', array( 'post' ) ) ) )
+	// Don't record this if the comment's associated post does not support bp_tracking
+	if ( ! post_type_supports( $recorded_comment->post->post_type, 'bp_tracking' ) )
 		return false;
 
 	$is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
@@ -431,25 +503,48 @@
 	// If blog is public allow activity to be posted
 	if ( $is_blog_public ) {
 
-		// Get activity related links
-		$post_permalink = get_permalink( $recorded_comment->comment_post_ID );
-		$comment_link   = get_comment_link( $recorded_comment->comment_ID );
+		$post_type_object = get_post_type_object( $recorded_comment->post->post_type );
+		extract( $post_type_object->bp_tracking, EXTR_SKIP );
 
-		// Prepare to record in activity streams
-		if ( is_multisite() )
-			$activity_action = sprintf( __( '%1$s commented on the post, %2$s, on the site %3$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
+		// Builds the permalink to the post_type
+		if ( !empty( $activity_permalink_post_callback ) && is_callable( $activity_permalink_post_callback ) )
+			$post_permalink = call_user_func_array( $activity_permalink_post_callback, array( $recorded_comment->comment_post_ID, $blog_id, $recorded_comment->post ) );
 		else
-			$activity_action = sprintf( __( '%1$s commented on the post, %2$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>' );
+			$post_permalink = get_permalink( $recorded_comment->comment_post_ID );
 
+		$action_args = array(
+			'user_id'        => $user_id,
+			'post_permalink' => $post_permalink,
+			'post_title'     => $recorded_comment->post->post_title
+		);
+
+		if( is_multisite() )
+			$action_args['blog_id'] = $blog_id;
+
+		// Builds the activity action for the post type
+		if( !empty( $activity_action_comment_callback ) && is_callable( $activity_action_comment_callback ) )
+			$activity_action = call_user_func_array( $activity_action_comment_callback, array( $action_args ) );
+		else
+			$activity_action = bp_blogs_activity_action_comment_callback( $action_args );
+
+		// Get the activity type
+		$type_comment = !empty( $type_comment ) ? $type_comment : 'new_blog_comment';
+
+		// Get comment link
+		$comment_link   = get_comment_link( $recorded_comment->comment_ID );
+			
+		// Get the comment content
 		$activity_content	= $recorded_comment->comment_content;
 
+		$comment_post_type = ( 'post' == $recorded_comment->post->post_type ) ? 'comment' : $recorded_comment->post->post_type . '_comment';
+
 		// Record in activity streams
 		bp_blogs_record_activity( array(
 			'user_id'           => $user_id,
-			'action'            => apply_filters_ref_array( 'bp_blogs_activity_new_comment_action',       array( $activity_action,  &$recorded_comment, $comment_link ) ),
-			'content'           => apply_filters_ref_array( 'bp_blogs_activity_new_comment_content',      array( $activity_content, &$recorded_comment, $comment_link ) ),
-			'primary_link'      => apply_filters_ref_array( 'bp_blogs_activity_new_comment_primary_link', array( $comment_link,     &$recorded_comment                ) ),
-			'type'              => 'new_blog_comment',
+			'action'            => apply_filters_ref_array( "bp_blogs_activity_new_{$comment_post_type}_action",       array( $activity_action,  &$recorded_comment, $comment_link ) ),
+			'content'           => apply_filters_ref_array( "bp_blogs_activity_new_{$comment_post_type}_content",      array( $activity_content, &$recorded_comment, $comment_link ) ),
+			'primary_link'      => apply_filters_ref_array( "bp_blogs_activity_new_{$comment_post_type}_primary_link", array( $comment_link,     &$recorded_comment                ) ),
+			'type'              => $type_comment,
 			'item_id'           => $blog_id,
 			'secondary_item_id' => $comment_id,
 			'recorded_time'     => $recorded_comment->comment_date_gmt
Index: bp-blogs/bp-blogs-actions.php
===================================================================
--- bp-blogs/bp-blogs-actions.php	(revision 7591)
+++ bp-blogs/bp-blogs-actions.php	(working copy)
@@ -32,3 +32,25 @@
 	}
 }
 add_action( 'bp_actions', 'bp_blogs_redirect_to_random_blog' );
+
+/**
+ * Early hooks bp_init to extend the post post type arguments and add to it the "bp_tracking" support
+ *
+ * @global $wp_post_types the different registered post types
+ * @uses add_post_type_support() to add the "bp_tracking" support to the post post type
+ */
+function bp_blogs_extend_initial_post_types() {
+	global $wp_post_types;
+
+	$wp_post_types['post']->bp_tracking = array( 
+		'type_post'                           => 'new_blog_post',
+		'activity_permalink_post_callback'    => 'bp_blogs_activity_permalink_post_callback',
+		'activity_action_post_callback'       => 'bp_blogs_activity_action_post_callback',
+		'type_comment'                        => 'new_blog_comment',
+		'activity_action_comment_callback'    => 'bp_blogs_activity_action_comment_callback',
+	);
+
+	add_post_type_support( 'post', 'bp_tracking' );
+}
+
+add_action( 'bp_init', 'bp_blogs_extend_initial_post_types', 5 );
