rendered paste body<?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="nocomments">This post is password protected. Enter the password to view comments.</p> <?php return; } } /* This variable is for alternating comment background */ $oddcomment = 'class="alternate" ';?><!-- You can start editing here. --><div id="comments"><h2>This post has <?php comments_number('no comments yet. Why not kick start the discussion?','1 comment.','% comments.'); ?> </h2><?php if ($comments) : // this is displayed if comments exist ?> <ol class="commentlist"> <?php foreach ($comments as $comment) : ?> <?php if ($comment->comment_author_email == "admin@howtotuts.com") { ?> <li class="authorcomment" id="comment-<?php comment_ID() ?>"> <?php } else { ?> <li <?php echo $oddcomment; ?> id="comment-<?php comment_ID() ?>"> <?php } ?> <div class="commentdata"> <?php comment_author_link() ?><br /> <?php comment_date('d M y') ?><br /> <a href="#comment-<?php comment_ID() ?>" title="Permalink to this comment"> <?php comment_time() ?></a> </div> <div class="commenttext"><?php comment_text() ?></div> <div style="float:right;"><?php edit_comment_link('edit','',''); ?></div> <div class="clear"></div> </li> <?php /* Changes every other comment to a different class */ $oddcomment = ( empty( $oddcomment ) ) ? 'class="alternate" ' : ''; ?> <?php endforeach; /* end for each comment */ ?> </ol> <!-- End of code that gets executed when there are comments --><?php else : // this is displayed if there are no comments so far ?> <?php if ('open' == $post-> comment_status) : ?> <?php else : // comments are closed ?> <p class="nocomments">Comments are closed.</p> <?php endif; ?><?php endif; ?><?php if ('open' == $post-> comment_status) : ?><div id="formsection"> <form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <div class="columnform"> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> <input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" /> <?php if ( $user_ID ) : ?> <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p> <?php else : ?> <label>Name</label> <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /></p> <label>Email</label> <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /></p> <label>Website</label> <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /></p> <?php endif; ?> <label>Comment</label> <p><textarea name="comment" cols="40" rows="20" id="commentarea" tabindex="4"></textarea></p> <?php if ('none' != get_settings("comment_moderation")) { ?> <?php /*show_subscription_checkbox();*/ ?> <p><input name="submit" type="submit" id="submit" tabindex="5" value="SUBMIT COMMENT" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p> <?php do_action('comment_form', $post->ID); ?> </div> <div class="clear"></div> </form></div><?php } ?><?php // if you delete this the sky will fall on your headendif; ?>