<?php
// Do not delete these lines
	if (isset($_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() ) : ?>
	<h3 id="comments"><?php comments_number('No Responses','One Response', 'Responses');?> <?php printf('to &#8220;%s&#8221;', the_title('', '', false)); ?></h3>
	<ol class="commentlist">
	<?php 
	ob_start();
	wp_list_comments();
	$comments = ob_get_contents();
	ob_end_clean();
	$comments = preg_replace('|<img[^>]*class=\"avatar[^\']*\"[^>]*\/>|', '', $comments);
	$comments = str_replace('&nbsp;', ' ', $comments);
	echo preg_replace('|<img[^>]*class=\'avatar[^\']*\'[^>]*\/>|', '', $comments);?>
	</ol>
	<div class="navigation">
		<div class="alignleft"><?php previous_comments_link('Older comments') ?></div>
		<div class="alignright"><?php next_comments_link('Newer comments') ?></div>
	</div>
 <?php else : // this is displayed if there are no comments so far ?>
	<?php if ( comments_open() ) : ?>
	<?php else : // comments are closed ?>
		<p class="nocomments">Comments are closed.</p>
	<?php endif; ?>
<?php endif; ?>
<?php if ( comments_open() ) : ?>
<div id="respond">
<h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply for %s'); ?></h3>
	<div id="cancel-comment-reply"> 
		<div class="small"><?php cancel_comment_reply_link() ?></div>
	</div>
	<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
		<p><?php printf('You must be <a href="%s">logged in</a> to post a comment.', wp_login_url( get_permalink() )); ?></p>
	<?php else : ?>
		<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
	<?php if ( is_user_logged_in() ) : ?>
		<p><?php printf('Logged in as <a href="%1$s">%2$s</a>.', get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out</a></p>
	<?php else : ?>
	
	<div><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" />
	<div class="small"><label for="author">Name<?php if ($req) echo "(required)"; ?></label></div></div>
	
	<div><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" />
	<div class="small"><label for="email">'Mail (will not be published)<?php if ($req) echo "(required)"; ?></label></div></div>
	
	<div><input type="text" name="url" id="url" value="<?php echo  esc_attr($comment_author_url); ?>" size="22" tabindex="3" />
	<div class="small"><label for="url">'Website</label></div></div>
	
	<?php endif; ?>	
	<div><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></div>
	
	<div><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
	<?php comment_id_fields(); ?> 
	</div>
	<?php do_action('comment_form', $post->ID); ?>
	
	</form>
	
	<?php endif; // If registration required and not logged in ?>
</div>

<?php endif; // if you delete this the sky will fall on your head ?>