Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Got it. I had to remove the media rule, then the css tweak worked.

    Thanks!

    Hello and thank you for the quick reply. I added that to css, cleared cache, and there is no change.

    edited question above.

    • This reply was modified 9 months, 1 week ago by jemar707.

    It’s also impractical to look at each topic and gazillion replies to remove user moderation flags. If I flag someone, is there a way to see a list of who has been flagged? We have multiple moderators and the left-hand needs to know what the right-hand is doing.

    Worked beautifully! Thank you so much for the help!

    Confirmed directory name is wpdatatables, cleared server and local cache.
    I have no idea what I am looking for in the HTML source to see what is being excluded. The particular plugin has a ton of .js files, that’s why I hoped to block the entire directory. There are ~15 js errors, but I honestly driving blind when it comes to inspecting js errors.

    Could you lend an eye?
    http://staging-igotmyrefund.kinsta.com/archivedcomments/2017-archived-discussion/

    What’s happening is that a search box presumably being loaded by js should be appearing above the table.

    That didn’t seem to work.

    Here is a screenshot of how I put it in settings:

    http://staging-igotmyrefund.kinsta.com/wp-content/uploads/2018/02/Screen-Shot-2018-02-15-at-2.28.55-AM.png

    • This reply was modified 1 year, 9 months ago by jemar707.

    Ok cool. I didn’t realize I could list it that way.

    Thanks. Although I’m confused. Put that where?

    I only know enough to be dangerous with this stuff, I patched that together from another source, not sure where.

    //We want to force entering a user name on the comment form, but can’t use the regular Discussion Settings because it then also requires email address. So that setting is left off and this function make just Comment Author required. Need this so Impostercize will work. Uses preprocess_comment’ filter to make Name field required

    function require_comment_name($fields) {
     
    if ($fields['comment_author'] == '')
    wp_die('Error: please enter a valid name.');
     
    return $fields;
    }
    add_filter('preprocess_comment', 'require_comment_name');
    
    //new functions to add placeholders for comment form fields
    
    function my_update_comment_fields( $fields ) {
    
    	$commenter = wp_get_current_commenter();
    	$req       = get_option( 'require_name_email' );
    	$label     = $req ? '*' : ' ' . __( '(optional)', 'text-domain' );
    	$aria_req  = $req ? "aria-required='true'" : '';
    
    	$fields['author'] =
    		'<p class="comment-form-author">
    			<label for="author">' . __( "Name", "text-domain" ) . $label . '</label>
    			<input id="author" name="author" type="text" placeholder="' . esc_attr__( "Pick A Nickname", "text-domain" ) . '" value="' . esc_attr( $commenter['comment_author'] ) .
    		'" size="30" ' . $aria_req . ' />
    		</p>';
    
    /* We don't want email to appear on comment form
    	$fields['email'] =
    		'<p class="comment-form-email">
    			<label for="email">' . __( "Email", "text-domain" ) . $label . '</label>
    			<input id="email" name="email" type="email" placeholder="' . esc_attr__( "name@email.com", "text-domain" ) . '" value="' . esc_attr( $commenter['comment_author_email'] ) .
    		'" size="30" ' . $aria_req . ' />
    		</p>';
    */
    
    /* We don't want URL to appear on comment form
    	$fields['url'] =
    		'<p class="comment-form-url">
    			<label for="url">' . __( "Website", "text-domain" ) . '</label>
    			<input id="url" name="url" type="url"  placeholder="' . esc_attr__( "http://google.com", "text-domain" ) . '" value="' . esc_attr( $commenter['comment_author_url'] ) .
    		'" size="30" />
    			</p>';
    */
    
    	return $fields;
    }
    add_filter( 'comment_form_default_fields', 'my_update_comment_fields' );

    Yes the above code works to require only name. We have name placeholder set to Anonymous. If Anonymous, Impostercize triggers and works because we have an existing Anonymous user. If name is left blank it produces the error: please enter a valid name.

    Prior to that without that function, the user could leave the name field blank but the comment would appear as Anonymous, somehow bypassing Impostercize. My guess is that when the user name was left blank, the default behavior is for WP to assign the commenter_name Anonymous, but perhaps it wasn’t happening until after Impostercize checks passed because it was blank.

    Currently have the discussion settings to allow users to comment without a name and email. And, then adding this function to force name

    function require_comment_name($fields) {
     
    if ($fields['comment_author'] == '')
    wp_die('Error: please enter a valid name.');
     
    return $fields;
    }
    add_filter('preprocess_comment', 'require_comment_name');

    I figured it out. We didn’t require users to enter a name, so if the field was left blank it would pass Impostercide check and then still display Anonymous when comment posted. Problem was we didn’t want to require email address as per the Diacussiom settings where it is both Name & Email. So I required comment_author in a preprocess function and then it works well if they try to use Anonymous.

    • This reply was modified 2 years, 10 months ago by jemar707.

    Hello again! I never realized you replied to my message until now. oops. Yes we created a user named Anonymous to prevent this and somehow users are still bypassing the plugin and can using the name Anonymous.

    • This reply was modified 2 years, 10 months ago by jemar707.
Viewing 15 replies - 1 through 15 (of 19 total)