<?php
	if (!empty($_SERVER[ 'SCRIPT_FILENAME' ]) && 'comments.php' == basename($_SERVER[ 'SCRIPT_FILENAME' ]))
		die ( 'Please do not load this page directly. Thanks!' );
	if ( post_password_required() ) { ?>
		<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
	<?php
		return;
	}
?>
<?php if ( have_comments() ) : ?>
	<?php paginate_comments_links(); ?>
	<?php if ( ! empty($comments_by_type[ 'comment' ]) ) : ?>
		<h3 style="margin-top:15px;" id="comments"><?php comments_number( 'No Opinions have', 'One Opinion has', '% Opinions have' );?> been expressed on &#8220;<?php the_title(); ?>&#8221;</h3>
		<ol class="commentlist">
			<?php wp_list_comments( 'type=comment&callback=mytheme_comment' ); ?>
		</ol>
	<?php endif; ?>
	<?php if ( ! empty($comments_by_type[ 'pings' ]) ) : ?>
		<h5 id="pings">Trackbacks/Pingbacks</h5>
		<ol class="commentlist">
			<?php wp_list_comments( 'type=pings&callback=mytheme_comment' ); ?>
		</ol>
	<?php endif; ?>
	<?php paginate_comments_links(); ?>
 <?php else : ?>
	<?php if ( 'open' == $post->comment_status ) : ?>
	 <?php else : ?>
	 	<?php if (is_page()): ?>
		<?php else: ?>
			<p class="nocomments">Comments are closed.</p>
		<?php endif; ?>
	<?php endif; ?>
<?php endif; ?>
<?php if ( 'open' == $post->comment_status ) : ?>
	<?php comment_form(array('comment_notes_after' => '')); ?>
<?php endif; ?>