WordPress.org

Ready to get started?Download WordPress

Forums

SI CAPTCHA Anti-Spam
[resolved] SI CAPTCHA Anti-Spam position under Submit Commet (3 posts)

  1. Pattaya_Web
    Member
    Posted 3 years ago #

    SI CAPTCHA Anti-Spam is appearing under the submit comment button and I'm unsure of what to move and where to move it.

    Any assistance will be appreciated. I believe it involves this section of the comment.php

    <?php } ?>
    <?php if ( $comment->comment_author_url ) { ?>
    <tr>
    <th scope="row"><?php _e('URL'); ?></th>
    <td><a href="<?php echo $comment->comment_author_url; ?>"><?php echo $comment->comment_author_url; ?></a></td>
    </tr>
    <?php } ?>
    <tr>
    <th scope="row" valign="top"><?php /* translators: field name in comment form */ _ex('Comment', 'noun'); ?></th>
    <td><?php echo $comment->comment_content; ?></td>
    </tr>
    </table>
    
    <p><?php _e('Are you sure you want to do this?'); ?></p>
    
    <form action='comment.php' method='get'>
    
    <table width="100%">
    <tr>
    <td><a class="button" href="<?php echo admin_url('edit-comments.php'); ?>"><?php esc_attr_e('No'); ?></a></td>
    <td class="textright"><?php submit_button( $button, 'button' ); ?></td>
    </tr>
    </table>
    
    <?php wp_nonce_field( $nonce_action ); ?>
    <input type='hidden' name='action' value='<?php echo esc_attr($formaction); ?>' />
    <input type='hidden' name='c' value='<?php echo esc_attr($comment->comment_ID); ?>' />
    <input type='hidden' name='noredir' value='1' />
    </form>
    
    </div>
    </div>
    <?php
    	break;
  2. Mike Challis
    Member
    Plugin Author

    Posted 3 years ago #

    You are using WP3?

    You may have a theme that has a not properly coded comments.php

    When diagnosing missing or misplaced CAPTCHA field on comment form....
    The version of WP makes a difference...

    (WP2 series)
    Your theme must have a
    <?php do_action('comment_form', $post->ID); ?>
    tag inside your /wp-content/themes/[your_theme]/comments.php form. Most WP2 themes do. The best place to locate the tag is before the comment textarea, you may want to move it if it is below the comment textarea.

    (WP3 series)
    Since WP3 there is new function comment_form inside
    /wp-includes/comment-template.php
    Your is theme probably not up to current code to call that function from inside comments.php.
    WP3 theme does not need the do_action('comment_form'... code line inside
    /wp-content/themes/[your_theme]/comments.php.
    Instead, it uses a new function call inside comments.php:
    <?php comment_form(); ?>
    If you have WP3 and still have the missing captcha, make sure your theme has
    <?php comment_form(); ?>
    inside /wp-content/themes/[your_theme]/comments.php
    (look inside Twenty Ten theme for proper example)

    Was this any help?

  3. Pattaya_Web
    Member
    Posted 3 years ago #

    Hi Mike,
    Thanks. I had read that int he FAQs but was looking in the wrong place.

    Works like a charm.

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic