Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

BuddyPress multisite Blog Comment Stream (3 posts)

Started 10 months ago by: nicholmikey

  • Profile picture of nicholmikey nicholmikey said 10 months ago:

    Hello,

    I have many sites and many different themes on my my multisite install, I was wondering how to replace blog comments functionality with the BuddyPress stream on these themes.

    Thanks,

  • Profile picture of nicholmikey nicholmikey said 10 months ago:

    I can just remove displaying and entering WordPress comments, display an activity stream for only that blog, and create a text box that submits to the stream, but if there is already a proper way that integrates with WordPress I would prefer that. With my method the dashboard view would show no comments while the site view would show a stream of comments.

  • Profile picture of nicholmikey nicholmikey said 10 months ago:

    Tried this plugin and it worked ok : http://buddypress.org/community/groups/buddypress-activity-as-blog-comments/

    It did not work on sub blogs as it was making bad links for the reply, favorite, and remove favorite buttons. I type this out into my bp-custom.php file and now it all works fine :

    //fix  replying to activity streams on sub blogs
    add_filter('bp_get_activity_favorite_link','fix_activity_link',10,2);
    add_filter('bp_get_activity_unfavorite_link','fix_activity_link',10,2);
    add_filter('bp_get_activity_comment_form_action','fix_activity_link',10,1);
    
    function fix_activity_link($link,$setting='none'){
    
    	$root = $_SERVER['HTTP_HOST'];
    	$pos = strpos($link, '/activity/');
    	$length = strlen($link);
    	$fixed_link = 'HTTP://' . $root . substr($link,$pos,$length);
    	return $fixed_link;
    }