Skip to:
Content
Pages
Categories
Search
Top
Bottom

[New Plugin] BuddyPress Activity Stream as Blog Comments

  • hot off the svn…

    Download from WordPress Plugin Repo: BuddyPress Activity Stream as Blog Comments

    be forewarned – this may not be for everyone depending on the control you like with wp comments admin or previous BP blog comments/postings

    How does this work?

    Simple, the plugin will look for the corresponding activity record for the new_blog_post (or new_blog_comment) and pull the threaded activity data. Includes the same reply/favorite meta information and nested replies. An added bonus, the loop theme template includes the same bp_activity_ action hooks.

    Which leads to the next point:

    IMPORTANT NOTE for Existing BP Blog:

    You MUST run this plugin BP Import Blog Activity which tags each blog post and comment with activity stream data. This is a requirement in order to pull in activity stream data on a blog post.

    (fwiw – i have not tested this yet – as only develop on a new install – any helpers would be great – always backup the db)

    WPMU

    This is only intended for the main BP blog for which it is activated on.

    The activity template query uses (so in theory – it should work if the subblogs have the new theme files from this plugin)

    $object = $bp->blogs->id;
    $primary_id = (int) $wpdb->blogid;

    If anyone wants to see how this could work on subblogs – please post up.

    See it action: (my demo site)

    http://etivite.com/2010/04/what-does-it-mean/

    i’ll be awaiting the bug reports :-)

    FWIW – this is a simple plugin – much easier than the forum extras, in fact so much that i’m considering converting the forums to the activity stream.

Viewing 11 replies - 1 through 11 (of 11 total)
  • must have been the early morning – but i forgot to place in a failsafe catch for removing activity stream records if the type was a match for new_blog_comment and new_blog_post. (as this must exists in order to pull in activity comments)

    i’ll add this to the next update.

    The BP Import Blog Activity plugin only works with WPMU and not single WP installs. :(

    I got this after trying to download and install from the WP admin:


    Downloading install package from http://downloads.wordpress.org/plugin/buddypress-activity-as-blog-comments.0.1.0.zip.

    Unpacking the package.

    Could not create directory /xxx/xxx/xxx/wp-content/upgrade/buddypress-activity-as-blog-comments.tmp


    Uploading via ftp and activating worked fine.

    for some reason “Sorry, there was no comments found.” keeps showing up after posting a comment.

    The BP Import Blog Activity plugin only works with WPMU and not single WP installs. :(

    oh shoot – maybe i can look into an importer for this plugin then. not sure about the file permission thing (maybe your server configuration)

    for some reason “Sorry, there was no comments found.” keeps showing up after posting a comment.

    just fixed that one (give the development version about 15 or so to update the file – blogactivity-loop.php

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Unfortunately I don’t have time right now to update the import plugin for single WP. But *I think* it should work with just a simple fix.

    In brief, the plugin loops through all the blogs on an MU install and then loops through all posts on that install. You should just need to remove the outer loop. There’s a block of code starting around line 34 in bp-import-blog-activity-bp-functions.php that says

    $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";

    Remove the block of code that starts with that line and ends with

    switch_to_blog( $blog['blog_id'] );

    Make sure you leave the query_posts(‘order=ASC’); – that code should work with regular WP.

    Further down in that same file, find and remove

    restore_current_blog();

    }

    Make sure you remove that bracket (which closes the foreach loop).

    This is untested, but it should work in theory. Always do backups first!!!

    I made the edits and didn’t receive any errors, but it didn’t seem to work. There where no posts or comments in the activity stream.

    This is what it displayed after hitting “import:”

    Blog name: Test

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Importing: “”

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Oh. You might try changing this line

    if ( (int)get_blog_option( $blog['blog_id'], 'blog_public' ) ) {

    to

    if ( (int)get_option( 'blog_public' ) ) {

    Again, untested.

    same results :(

    This does not work for non-admin users when there are no comments. The space where the comment section goes is blank.

    On a similar subject, there should be a login form for non logged in users (“You Must Be Logged In To Comment”).

    This does not work for non-admin users when there are no comments. The space where the comment section goes is blank.

    this plugin takes away the traditional comment reply section – only the admin will see that.

    Users should only see the activity stream (reply) (favorite) links under a blog post – BUT it will only work IF the blog post has an activity->type “new_blog_post” – otherwise the plugin won’t hook – the main activity action has to exist for that blog post (or comment)

    On a similar subject, there should be a login form for non logged in users (“You Must Be Logged In To Comment”).

    i’ll add in a log in link

Viewing 11 replies - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.