Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP 1.1.3: Display non-member comments in site-wide activity stream?


  • paulhastings0
    Participant

    @paulhastings0

    I’m using WPMU 2.8.6 and BP 1.1.3 with the default BP theme here.

    Forgive me for displaying my ignorance again, but how do I get the sitewide activity stream widget to show non-member comments made on my my users blogs?

    For example. If someone who’s not signed in leaves a comment on http://jibenow.com/christinahastings their comment only displays on that one blog. It doesn’t show up in the sitewide activity stream widget on the main page of http://jibenow.com .

    I think someone else tried addressing this here, but all that does is just show comments for <i>registered</i> users. I’d like to show <i>every</i> comment made on <i>every</i> blog in the sitewide activity stream widget… not just the comments of registered users.

    Thanks,

    Paul

    :)

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

  • guristu
    Participant

    @guristu

    This may be something to do in a plugin. The activity stream is only for the registered members. I suggest creating a widget called “Non-member comments”


    guristu
    Participant

    @guristu

    correction: if you use the filter that Andy indicated at the link you mentioned, it DOES display comments made by unregistered users. I just tested it. Make sure that the comments are not in moderation. However, I still think that this would be better in a plugin.


    paulhastings0
    Participant

    @paulhastings0

    The comments are <i>not</i> in moderation, I just checked.

    In the file: wp-content/plugins/buddypress/bp-activity/bp-activity-widgets.php

    I made the following change around line 30:

    <?php if ( /*bp_has_activities( 'type=sitewide&max=' . $instance['max_items'] . '&per_page=' . $instance['per_page'] )*/ bp_has_activities( 'object=blogs&action=new_blog_comment' ) ) : ?>

    And the unregisterd user comments are still not showing up. This is the “site wide activity” widget I’m using. Any ideas?


    guristu
    Participant

    @guristu

    instead of “objects=blogs” put “type=sitewide” It works on my test server, but it only shows the new blog comments and nothing else. If i understand this right you want to show the regular site wide activity plus the unregistered members’ comments. I’m going to take a look at the way you can tweak the filters but right now I have nothing. Sorry.


    paulhastings0
    Participant

    @paulhastings0

    So here’s my line of new code:

    <?php if ( /*bp_has_activities( 'type=sitewide&max=' . $instance['max_items'] . '&per_page=' . $instance['per_page'] ) */ bp_has_activities( 'type=sitewide&action=new_blog_comment' ) ) : ?>

    But it hasn’t made a difference. Like you said, it’s only showing the comments sitewide. It’s killed the rest of the activity stream (posts, wires, status updates, etc). But it’s still not showing comments made by unregistered users.

    Are we both running the same versions? WPMU 2.8.6 and BP 1.1.3?


    guristu
    Participant

    @guristu

    Yes I am running the same. I have done some thinking on this. I do believe tat the answer is a plugin. If I come up with anything I’ll let you know.


    paulhastings0
    Participant

    @paulhastings0

    I’m upgrading to WPMU 2.9.1 as I type.


    Boone Gorges
    Keymaster

    @boonebgorges

    The problem with this project is that one of the crucial pieces of data stored with activity items is the user_id, and for non-logged-in-users there is obviously no user_id. So you have to fake it somehow.

    One thought is to have a plugin create a dummy user. All comments from non-logged-in users will be assigned to that user. Then filter the activity content on the way out to detect that user’s ID and rewrite the activity item with the correct commenter name/email address.

    It’s something I’ve been mulling over for a little while, and I will tackle it when I get a few spare hours. If anyone else wants to make it happen, that would be cool too :)


    Andy Peatling
    Keymaster

    @apeatling

    The user_id is not required to record in the activity stream. Check how bp-group-twitter does it.


    Boone Gorges
    Keymaster

    @boonebgorges

    Oops. Well that makes it much easier. I would really like something like this myself, so maybe I’ll get to it soon.


    Boone Gorges
    Keymaster

    @boonebgorges

    By “maybe I’ll get to it soon” I meant “I’ll use this as a way to procrastinate this afternoon”.

    https://buddypress.org/forums/topic/new-plugin-include-non-member-comments


    paulhastings0
    Participant

    @paulhastings0

    Worked like a charm. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘BP 1.1.3: Display non-member comments in site-wide activity stream?’ is closed to new replies.
Skip to toolbar