<?php // Do not delete these lines



	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die (__('Do not load this page directly please','BlogOne'));

	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"><?php _e('You need to be logged in to comment','BlogOne'); ?><p>

	<?php return; }} ?>



<!-- ew. liczba komentarzy -->



<div id="comments">

<?php if ($comments) : ?>

<h2><?php comments_number(__('بی نظر','BlogOne'),__('یک نظر ','BlogOne'),__('% نظر','BlogOne'));?>
<?php _e('برای ','BlogOne'); ?> &#8220;<?php the_title(); ?>&#8221;</h2>


<ul>

<?php foreach ($comments as $comment) : 
	
	$comment_type = get_comment_type();
	if($comment_type == 'comment') {
	
	$bgColor = '';
	if($comment->comment_author_email == get_the_author_email()) { $bgColor = 'combyauthor'; } else { $bgColor = 'comcolor';}
	
	
	?>

	<li class="commentbody <?php echo $bgColor; ?>">
	
		<div class="commentsmeta">
	
			<div class="alignright commentsdate">
				<?php comment_date(); ?>
			</div>
			
			<?php if(function_exists('get_avatar')){ echo get_avatar($comment, '30'); } ?>
		
			<strong><?php comment_author_link(); ?></strong> <?php _e('wrote','BlogOne'); ?>
		
		</div>

		<?php comment_text() ?>
		
	</li>

<?php } ?><?php endforeach; ?>

</ul>

<?php endif; ?>



</div>



<?php if ( comments_open() ) : ?>



<h2><?php _e('Leave a comment','BlogOne'); ?></h2>



<?php if ( get_option('comment_registration') && !$user_ID ) : ?>

<p><?php _e('You need to','BlogOne'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>"><?php _e('log in','BlogOne'); ?></a>.<?php _e('to comment','BlogOne'); ?></p>

<?php else : ?>

<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

<?php if ( $user_ID ) : ?>

<p><?php _e('Logged in as','BlogOne'); ?> <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="<?php _e('Log out of this account','BlogOne') ?>"><?php _e('Log out','BlogOne'); ?> &raquo;</a></p>

<?php else : ?>

<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" tabindex="1" />

<label for="author"> <small><?php _e('Name','BlogOne'); ?></small></label></p>

<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" />

<label for="email"> <small><?php _e('Email','BlogOne'); ?></small></label></p>

<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" tabindex="3" />

<label for="url"> <small><?php _e('Webpage','BlogOne'); ?></small></label></p>

<?php endif; ?>

<p><textarea name="comment" id="commenting" cols="40" rows="10" tabindex="4"></textarea></p>

<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit','BlogOne'); ?>" />

<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />

</p>

<?php do_action('comment_form', $post->ID); ?>

</form>

<?php

$i = 1;

foreach ($comments as $comment) :

	$comment_type = get_comment_type();
	
	if($comment_type != 'comment') {
		
		if($i == 1) { echo "<h3>Track / Pingbacks</h3>"; }

			 comment_author_link();
			 echo " &bull; ";

		 }

	 $i++;

endforeach;

?>

<?php endif; endif; ?>