Skip to:
Content
Pages
Categories
Search
Top
Bottom

Question: how to receive updates, not original post?

  • Avatar of Andreas Karsten
    Andreas Karsten
    Participant

    @sospetto

    I have a question related to the dilemma so cunningly resolved by Boone here:

    Scenario: (1) a forum thread, within which Person A posts a new message. (2) Second Person B sees the message in the activity stream, and because the forums do not allow for direct replies (why not?!), B presses reply in the activity stream.

    We are using a plugin to make these B-replies visible in the forum thread, to keep conversations together, but my dilemma is this:

    With every new B-reply via the method described in (2) above, notifications go out that read: “Person A posted on the forum topic ‘What a wonderful forum thread’ in the group Replies & Responses,” quoting the original message text from (1).

    What it should be doing is rather: “Person B responded to the post of Person A in the forum thread ‘What a wonderful forum thread’ in the group Replies & Responses,” quoting the text from the B-reply in (2).

    Is this a problem coming from the notifications plugin at all, and (how) can it be resolved?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    i’m not sure how helpful this is, but i solve the problem this way. we don’t allow people to reply to the forum topic using the activity update. The benefit is that the conversation is always in one place, united.

    i think the problem you are encountering is a bug in our plugin. people have mentioned that activity replies are not handled correctly.

    because activity replies are missing some vital data, we don’t actually send emails out for them (or perhaps the email that goes out is wrongly named). so we could fix this i’m sure. boone, do you have time as you are currently working on the plugin? I could look into fixing this if you want, but not for another two weeks, because i’m busy at the moment.

    Avatar of Andreas Karsten
    Andreas Karsten
    Participant

    @sospetto

    I let Boone answer for himself of course, but one quick question back: how do I not allow people to reply in the activity stream, and how do I then make it possible for people to properly respond in the forums? We allow the stream-reply because the forums don’t have a reply-function…

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    All of this may become moot in the future if the “new” bbpress plugin allows for threaded posts. But for now it doesn’t and that’s what we have to work with.

    To turn off posting replies to forum topic activity posts go to BuddyPress > general settings > Disable activity stream commenting on blog and forum posts?

    then if people want to comment, they have to click the post link in the activity stream, and their comment goes at the end of the discussion. It’s entirely workable. and in fact, some might find it better than threaded.

    if you wanted to make it even clearer, you could add a button at the bottom that says [reply to this topic] that links to the forum topic post form. (as long as it’s not paginated).

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    I will try to have a look at the plugin issue sometime soon, hopefully in the next week or so.

    I had a chat with John just this weekend about the bbPress plugin and threading. He said it’s not there, but I really need it for a project, so I will probably build it for bbPress. That won’t be relevant until BP 1.4, though.

    Avatar of Andreas Karsten
    Andreas Karsten
    Participant

    @sospetto

    “It’s entirely workable. and in fact, some might find it better than threaded.”

    Not really, it’s too much contents — we had an online session with 10 people discussing for an hour, and the non-threaded, linear and then non-responsive format of the forums just creaked and cracked at all ends. But yes, we need to work with what we have. In any case, disabling activity stream commenting is no option, in principle not until threaded replies work in the forum and probably more importantly because people are now used to doing it this way. So I will just see what Boone says about his time for tinkering with it :)

    Avatar of Andreas Karsten
    Andreas Karsten
    Participant

    @sospetto

    Thank you Boone!

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    Karsten, I added a new feature to the plugin that has been missing for a while. Now when people reply to group activity updates, an email notification goes out (or it is digested depending on the user’s selection). Previously, replies to group activity updates where ignored by the plugin.

    However I don’t think this will help your situation, because all the email will say is:
    ‘user1 posted a new activity comment in the group group2′.
    it is not going to politely tell you what the reply was for.

    We could add that in, but it might look strange because updates do not have titles. In practice it will probably look like this:
    ‘user1 replied to the update “Maecenas sed diam eget risus varius blandit sit amet non magna. Etiam porta sem malesuada magna mollis euismod. Sed posuere consectetur est at lobortis. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas sed diam eget risus varius blandit sit amet non magna. Etiam porta sem malesuada magna mollis euismod. Sed posuere consectetur est at lobortis. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.” in the group group2:’

    I guess we could truncate it so it read like this:
    ‘user1 replied to the update “Maecenas sed diam eget risus varius blandit sit amet non magn…” in the group group2:’

    thoughts?

    Avatar of Andreas Karsten
    Andreas Karsten
    Participant

    @sospetto

    Hiya Deryk, many thanks for adding that feature! I am gonna install 2.8 in a moment and see how it plays out in our environment. I think the truncated version would be totally fine; it would give everyone a good enough hint at what is being replied to! Andreas

    Avatar of Andreas Karsten
    Andreas Karsten
    Participant

    @sospetto

    Installed it, and works without a glitch, but indeed it doesn’t help with my situation. When replying to an update in the activity stream, a notification is triggered that repeats the original post that is being replied to:

    User posted an update in the group: “Testing the updated notification system.”

    Ideally it would say:

    User replied to the update “Testing the updated notification…” with “And testing the updated notification system once more.”

    Let me know if I can help somehow. (I will also be happy to cover some of the time it takes to work on this.)

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    yes, I can help. but the *reply* to the update should have said
    ‘user1 posted a new activity comment in the group group2′. just making sure we’re talking about the same thing here.

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    Ok, I believe your problem is solved.

    before, the activity for any activity replies was this generic:
    User1 posted a new activity comment:

    now for replies to discussion topics it is:
    user1 replied to the discussion topic {link}my lovely topic{/link}:

    and for discussion posts it is:
    user1 replied to the post {link}Sed posuere consectetur est at lobortis. Duis mollis, est non commodo luctus, nisi erat porttitor li…{/link} in the discussion topic “new discussion topic”:

    here’s the code, just put in functions.php or I can make it a plugin if others find it useful.

    `// change the activity update text to be much more informative when activity stream replies are regarding forum topics and posts
    function add_forum_topic_info_to_group_activity_replies( $content ) {
    global $bp;

    if ( $content->type == ‘activity_comment’ && $bp->current_component == ‘groups’ && $content->component == ‘activity’ ) {
    $parent = BP_Activity_Activity::get_specific( array( $content->item_id ) ); // for nexted replies secondary_item_id is the prev activity comemnt, we don’t want that
    $parent = $parent[0];

    if ( $parent->type == ‘new_forum_post’ || $parent->type == ‘new_forum_topic’ ) {

    if ( $parent->type == ‘new_forum_post’ ) {
    $post_id = $parent->secondary_item_id;
    $post_details = bp_forums_get_post( $post_id );
    $post_text = $post_details->post_text;
    if ( strlen( $post_text ) > 100 )
    $post_text = substr( $post_text, 0, 100 ) . ‘…’;
    $topic_id = $post_details->topic_id;
    } else {
    $topic_id = $parent->secondary_item_id;
    }

    $topic_details = bp_forums_get_topic_details( $topic_id );
    $topic_title = $topic_details->topic_title;
    $new_action = str_replace( ‘posted a new activity comment:’, ”, $content->action );
    $new_action .= ‘replied to ‘;

    if ( $post_text ) {
    $new_action .= ‘the post primary_link . ‘”>’ . $post_text . ‘ in the discussion topic “‘ . $topic_title . ‘”:’;
    } else {
    $new_action .= ‘the discussion topic primary_link . ‘”>’. $topic_title . ‘:’;
    }

    $content->action = $new_action;
    $content->primary_link = $parent->primary_link;

    } // end if forum topic or post

    } // end if is activity_comment in group

    }
    //add_action( ‘bp_activity_before_save’, ‘add_forum_topic_info_to_group_activity_replies’ ); // this changes the activity output permanently
    add_action( ‘bp_activity_after_save’, ‘add_forum_topic_info_to_group_activity_replies’, 5 ); // this just changes it for the BuddyPress Group Email Subscription Plugin`

    At the end here you can hook this before the activity is saved to the database, thus permanently changing the activity, or hook it in after so it just gets used by the BuddyPress Group Email Subscription plugin. By default I’ve set it to just affect the plugin. But change it to the other way and see how you like it. It might be more useful, but perhaps a little repetitive.

    also, I could add ‘in the group My Group’ at the end, but it might bet long.

    Cheers!

    Avatar of Andreas Karsten
    Andreas Karsten
    Participant

    @sospetto

    Cool, cool, cool. Thanks a million Deryk, this is great!

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

You must be logged in to reply to this topic.