PHP Code:
<?php // Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments-paged.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="alt clearfix" ';
global $options;
foreach ($options as $value) {
if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } }
?>
<!-- You can start editing below: -->
<?php // If there are any comments
if ($comments) : ?>
<h3 id="comments"><?php // Comment Area Title
comments_number('No Responses', 'One Response', '% Responses' );?> to <?php the_title(); ?></h3>
<!-- Comment page numbers -->
<?php if ($paged_comments->pager->num_pages() > 1): ?>
<p class="comment-page-numbers"><?php _e("Pages:"); ?> <?php paged_comments_print_pages(); ?></p>
<?php endif; ?>
<!-- End comment page numbers -->
<!-- Comment List -->
<ol class="commentlist">
<?php
// Do this for every comment -->
foreach ($comments as $comment) :
if ( ($ata_separate_trackbacks == "Yes" AND get_comment_type() == 'comment') OR $ata_separate_trackbacks == "No" ) {
?>
<li <?php if ( $ata_author_highlight == "Yes" AND $comment->comment_author_email == get_the_author_email() ) { echo 'class="authorcomment clearfix" '; } else { echo $oddcomment; } ?>id="comment-<?php comment_ID() ?>">
<?php // GRAVATAR
if (get_comment_type() == 'comment') {
if ($ata_avatar_size != 0 AND $ata_avatar_size != "") {
if (function_exists('get_avatar')) {
echo get_avatar($comment -> comment_author_email, $size=$ata_avatar_size);}
# if this WP version has no gravatars, use the theme's custom gravatar function:
else { if(!empty($comment -> comment_author_email)) {
$md5 = md5($comment -> comment_author_email);
$default = urlencode(get_bloginfo('template_directory') . '/images/no-gravatar.gif');
echo "<img class=\"avatar\" src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=" . $ata_avatar_size . "&default=$default' alt='Gravatar' />";
}
}
}
}
?>
<div class="comment-number"><a href="<?php echo paged_comments_url('comment-'.get_comment_ID()); ?>" title=""><?php echo $comment_number; $comment_number += $comment_delta; ?></a></div>
<span class="authorname"><?php // Comment Author
comment_author_link() ?></span>
<?php // Awaiting Moderation Text
if ($comment->comment_approved == '0') : ?>
Your comment is awaiting moderation.
<?php endif; ?>
<br />
<span class="commentdate">
<?php // Comment Date and Time
comment_date('F jS, Y') ?> at <?php comment_time() ?>
</span>
<?php // Comment Text
comment_text() ?>
<?php // Edit Comment Link
edit_comment_link('edit','<span class="editcomment">','</span>'); ?>
</li>
<?php $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt clearfix" ' : 'class="clearfix" ';
}
endforeach;
// END of "Do this for every comment "
?>
</ol>
<!-- / Comment List -->
<!-- Comment page numbers -->
<?php if ($paged_comments->pager->num_pages() > 1): ?>
<p class="comment-page-numbers"><?php _e("Pages:"); ?> <?php paged_comments_print_pages(); ?></p>
<?php endif; ?>
<!-- End comment page numbers -->
<?php
// END of "If there ARE any comments"
else :
// START of "If there are NO comments"
?>
<?php
// If comments are open, but there are no comments:
if ('open' == $post->comment_status) :
?>
<!-- .... -->
<?php
// END of "If comments are open, but there are no comments"
else :
// If comments are closed:
?>
<p>Comments are closed.</p>
<?php endif; ?>
<?php
// END of "If there are NO comments"
endif;
?>
<?php // If comments are open
if ('open' == $post->comment_status) : ?>
<h3>Leave a Reply</h3>
<?php // If Login is required and User is not logged in
if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
<?php // If Login is not required, or User is logged in
else : ?>
<!-- Comment Form -->
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php // If User is logged in
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 // If User is not logged in: Display the form fields "Name", "Email", "URL"
else : ?>
<p>
<input class="text author" type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="30" tabindex="1" />
<label for="author">Name <?php if ($req) echo "(required)"; ?></label>
</p>
<p>
<input class="text email" type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2" />
<label for="email">Mail (will not be published) <?php if ($req) echo "(required)"; ?></label>
</p>
<p>
<input class="text url" type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3" />
<label for="url">Website</label>
</p>
<?php endif; ?>
<!-- Display Quicktags or allowed XHTML Tags -->
<?php if (function_exists('lmbbox_comment_quicktags_display')) { lmbbox_comment_quicktags_display(); }
else { ?>
<p><strong>XHTML:</strong> You can use these tags:</p>
<p><code><?php echo allowed_tags(); ?></code></p>
<?php } ?>
<!-- Comment Textarea -->
<p><textarea name="comment" id="comment" rows="10" cols="20" tabindex="4"></textarea></p>
<!-- Submit -->
<p>
<input name="submit" type="submit" class="button" 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); ?>
</form>
<!-- / Comment Form -->
<?php endif; ?>
<!-- / If Login is not required, or User is logged in -->
<?php endif; ?>
<!-- If comments are open -->