Home Forums Weaver for bbPress Feature request_ Private reply for reply between users

This topic contains 2 replies, has 2 voices, and was last updated by  wp-henne 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #52364

    wp-henne
    Participant

    Hello,

    I had wondered how the private answers works: that it only worked on the theme creator.

    I’ve changed it now, that there can also be private answers between users.

    Here are my changes in the wvrbbp-private-reply.php.

    After Line 42 $reply_author = bbp_get_reply_author_id( $reply_id );

    paste:

    $reply_to_id = bbp_get_reply_to( $reply_id );
    if ( $reply_to_id === 0 ) {
    $reply_to_id = bbp_get_topic_id();
    }
    $reply_to_author = bbp_get_reply_author_id( $reply_to_id );
    $reply_to_authorname = get_the_author_meta(‘display_name’, $reply_to_author);

    and after

    if ( ! empty( $current_user ) && $reply_author === $current_user->ID ) {
    // Let the reply author view their own reply
    $can_view = true;
    }

    paste:

    if ( ! empty( $current_user ) && $reply_to_author === $current_user->ID ) {
    // Let the author view the private reply of his reply
    $can_view = true;
    }

    Maybe this can be done in a new version. Maybe with option in the backend?

    In addition, I let indicate to whom the private answer is directed to:

    after  $content = __( ‘This reply has been marked as private.’, ‘weaver-for-bbpress’ );

    paste

    $content .= __( ‘ (For ‘.$reply_to_authorname.’ to reply #’.$reply_to_id.’)’, ‘weaver-for-bbpress’ );

    Thank you and regards,
    Henry

    #52365

    Weaver
    Keymaster

    Question: You said: I had wondered how the private answers works: that it only worked on the theme creator.

     

    Did you mean: THREAD creator instead of THEME creator?

    I’m not 100% sure how to describe what you are attempting.

    Could you please describe how your proposed change modifies the behavior more completely?

    #52366

    wp-henne
    Participant

    Sorry, I have prescribed myself.

    I said that the private answer is only from respondents against the topic starter.
    But I also need that users can answer each other privately.

    Now with my changes this works.

    Now I’m still looking for some code that it is already displayed when selecting ANSWER:

    “Set as Private Reply for (#reply_id) readable only by you, to xxx (Reply-User-Display-Name) and Moderators”

     

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.