Skip to:
Content
Pages
Categories
Search
Top
Bottom

Notify user when a reply goes into moderation


  • Chuckie
    Participant

    @ajtruckle

    I had a look at the code in 2.6.1.

    Lines 618 – 622 in functions.php in replies folder:

    /** Reply Bad Words *******************************************************/
    
    if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) {
    	bbp_add_error( 'bbp_reply_moderation', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
    }

    Notice that it makes use of the bbp_add_error call to notify the user? Well, look at lines 624 – 636:

    /** Reply Status **********************************************************/

    // Maybe put into moderation
    if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    
    	// Set post status to pending if public
    	if ( bbp_get_public_status_id() === $reply->post_status ) {
    		$reply_status = bbp_get_pending_status_id();
    	}
    
    // Use existing post_status
    } else {
    	$reply_status = $reply->post_status;
    }

    There does not appear to be any code to flag the user. Either way, if a “reply” is flagged as pending (for example, I insert 3 images) it just vanishes with no feedback to the user. This also happens here in this forum.

    I confess I don’t know the code enough and could be barking up the wrong tree.

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

  • Clivesmith
    Participant

    @clivesmith

    I have seen that users (all guests) do not get any indication what happened to their post (all go to moderation). If it is blocked a message is shown, if it is OK all they get is the form going blank.
    this was happening before the update to 2.6.0. I have not updated yet as on my development site I still cannot see sub forums.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Pending content is a funny thing.

    If you tell someone why it’s pending, they’ll post again to try and skirt the filter.

    If you tell them nothing, they’ll post again thinking something is wrong.

    If we can come up with some verbiage, that’s step one.

    Step 2, is where to redirect them. If a topic is pending, you can’t really show them their own pending topic, because it’s not visible to them, at least not the way bbPress works currently.


    Chuckie
    Participant

    @ajtruckle

    If I create a topic, not a reply, and it goes to moderation, I am given a message at the top of the screen saying it has gone for moderation.

    It should do exactly the same for a reply and zoom to the top of the topic to show the same message.

    It should be the same behaviour. Except this time it is saying the reply has gone to moderation.

    They are not redirected anywhere.

    I had sent you screen shots about this and my posts in your own forum vanished. They must be in your own pending list.

    See?


    Chuckie
    Participant

    @ajtruckle

    In the template.php file it has the following code:

    	// Get the topic status
    	switch ( $topic_status ) {
    
    		// Spam notice
    		case bbp_get_spam_status_id() :
    			$notice_text = esc_html__( 'This topic is marked as spam.', 'bbpress' );
    			break;
    
    		// Trashed notice
    		case bbp_get_trash_status_id() :
    			$notice_text = esc_html__( 'This topic is in the trash.', 'bbpress' );
    			break;
    
    		// Pending notice
    		case bbp_get_pending_status_id() :
    			$notice_text = esc_html__( 'This topic is pending moderation.', 'bbpress' );
    			break;
    
    		// Standard status
    		default :
    			$notice_text = '';
    			break;
    	}

    As you can see, it has specific notices for feedback to the user.

    The above work when it is a “topic” they are creating. What we now need is exactly the same code, but for “replies”. In addition though, this warning needs to be placed just above the empty editor and just after the previous reply.

    It is this code that is lacking for replies. So IMHO your comments don’t apply here. It is not about redirection or anything. It is about consistency with informing the user just like it does for a new topic.

    I hope this helps you in resolving this issue and thank you so much for your time in looking into this.

    The above begins on line 3029:

    /**
     * Displays topic notices
     *
     * @since 2.0.0 bbPress (r2744)
     */
    function bbp_topic_notices() {

    Chuckie
    Participant

    @ajtruckle

    I created a trac ticket here in the hopes this might get progressed more easily:

    https://bbpress.trac.wordpress.org/ticket/3284#ticket

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar