Title: MyCaptcha
Last modified: August 19, 2016

---

# MyCaptcha

 *  [britchat](https://wordpress.org/support/users/britchat/)
 * (@britchat)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/mycaptcha/)
 * I have installed this plugin and get the following error when I try to comment:
 * “Parse error: syntax error, unexpected ‘<‘ in /mounted-storage/home43a/sub002/
   sc32306-YRBZ/in-business.org.uk/blog/wp-content/themes/cutline-3-column-split-
   11/comments.php on line 12”
 * I have a feeling that I haveput the code in the wrong place – please help.
 * This is my comments.php page
 * <?php // Do not delete these lines
    if (‘comments.php’ == basename($_SERVER[‘
   SCRIPT_FILENAME’])) die (‘Please do not load this page directly. Thanks!’);
 *  if (!empty($post->post_password)) { // if there’s a password
    if ($_COOKIE[‘
   wp-postpass_’ . COOKIEHASH] != $post->post_password) { // and it doesn’t match
   the cookie ?>
 *  <p class=”center”><?php _e(“This post is password protected. Enter the password
   to view comments.”); ?><p>
 * <?php return; } }
    <?php if (class_exists(‘MyCaptcha’)) { global $MyCaptcha; ?
   > Enter this code <!– or any text that fits you –> <?php $MyCaptcha->comment_form();?
   > <input type=”text” name=”securitycode” id=”securitycode” size=”30″ /> <?php}?
   >
 *  /* Function for seperating comments from track- and pingbacks. */
    function 
   k2_comment_type_detection($commenttxt = ‘Comment’, $trackbacktxt = ‘Trackback’,
   $pingbacktxt = ‘Pingback’) { global $comment; if (preg_match(‘|trackback|’, $
   comment->comment_type)) return $trackbacktxt; elseif (preg_match(‘|pingback|’,
   $comment->comment_type)) return $pingbacktxt; else return $commenttxt; }
 *  $templatedir = get_bloginfo(‘template_directory’);
 *  $comment_number = 1;
    ?>
 * <!– You can start editing here. –>
 * <?php if (($comments) or (‘open’ == $post-> comment_status)) { ?>
 * <div id=”comments”>
 *  <h3 class=”comments_headers”><?php comments_number(‘0 responses’, ‘1 response’,‘%
   responses’ );?> so far ↓</h3>
 *  <ul id=”comment_list”>
 *  <?php if ($comments) { ?>
 *  <?php $count_pings = 1; foreach ($comments as $comment) { ?>
 *  <li class=”comment <?php if (k2_comment_type_detection() != “Comment”) { echo(‘
   trackback’); } ?>” id=”comment-<?php comment_ID() ?>”>
    <p class=”comment_meta”
   > <span class=”comment_num”>” title=”Permalink to this comment”><?php echo($comment_number);?
   ></span> **<?php comment_author_link() ?> ** <span class=”comment_time”>// <?
   php comment_date(‘M j, Y’) ?> at <?php comment_time() ?></span> </p> <div class
   =”entry”> <?php comment_text() ?> <?php if ($comment->comment_approved == ‘0’):?
   > <p>**Your comment is awaiting moderation.**</p> <?php endif; ?> </div>
 *  <?php $comment_number++; } /* end for each comment */ ?>
 *  <?php } else { // this is displayed if there are no comments so far ?>
 *  <?php if (‘open’ == $post-> comment_status) { ?>
    <!– If comments are open, 
   but there are no comments. –> <li class=”comment”> <div class=”entry”> <p>There
   are no comments yet…Kick things off by filling out the form below.</p> </div>
 *  <?php } else { // comments are closed ?>
 *  <!– If comments are closed. –>
 *  <?php if (is_single) { // To hide comments entirely on Pages without comments?
   >
    <li class=”comment”> <div class=”entry”> <p>Like gas stations in rural Texas
   after 10 pm, comments are closed.</p> </div>
 *  <?php } ?>
 *  <?php } ?>
 *  <?php } ?>
 *  <!– Comment Form –>
    <?php if (‘open’ == $post-> comment_status) : ?>
 *  <?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>
 *  to post a comment.</p>
 *  <?php else : ?>
 *  <h3 id=”respond” class=”comments_headers”>Leave a Comment</h3>
    <form action
   =”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id
   =”comment_form”>
 *  <?php if ( $user_ID ) { ?>
 * </p>
 *  <?php } ?>
    <?php if ( !$user_ID ) { ?> <p><input class=”text_input” type=”text”
   name=”author” id=”author” value=”<?php echo $comment_author; ?>” tabindex=”1″/
   ><label for=”author”>**Name**</label></p> <p><input class=”text_input” type=”
   text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” tabindex
   =”2″ /><label for=”email”>**Mail**</label></p> <p><input class=”text_input” type
   =”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” tabindex
   =”3″ /><label for=”url”>**Website**</label></p> <?php } ?> <!–<p><small>**XHTML:**
   You can use these tags: <?php echo allowed_tags(); ?></small></p>–>
 *  <p><textarea class=”text_input text_area” name=”comment” id=”comment” rows=”
   7″ tabindex=”4″></textarea></p>
 *  <?php if (function_exists(‘show_subscription_checkbox’)) { show_subscription_checkbox();}?
   >
 *  <p>
    <input name=”submit” class=”form_submit” type=”submit” id=”submit” src=”
   <?php bloginfo(‘template_url’) ?>/images/submit_comment.gif” tabindex=”5″ value
   =”Submit” /> <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id;?
   >” /> </p>
 *  <?php do_action(‘comment_form’, $post->ID); ?>
 *  </form>
 *  <?php endif; // If registration required and not logged in ?>
 * <?php endif; // if you delete this the sky will fall on your head ?>
    </div> 
   <!– Close #comments container –> <div class=”clear flat”></div> <?php } ?>

The topic ‘MyCaptcha’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [britchat](https://wordpress.org/support/users/britchat/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/mycaptcha/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
