<div id="commentsbox">
<?php if ($comments) : ?>
<?php
/* Count the totals */
$numPingBacks = 0;
$numComments = 0;
/* Loop through comments to count these totals */
foreach ($comments as $comment) {
if (get_comment_type() != "comment") { $numPingBacks++; }
else { $numComments++; }
}
?>
<?php
/* This is a loop for printing comments */
if ($numComments != 0) : ?>
<h2 style="
border:1px dashed #000;
background:#fff;
width:130;
padding:6px;
">
<?php comments_number(__('بدون دیدگاه','rhea'), __('تعداد دیدگاه : 1','rhea'), __('تعداد دیدگاه : %','rhea')); ?>
<?php _e('','rhea'); ?> </h2>
<ol class="commentlist">
<?php foreach ($comments as $comment) : ?>
<?php if (get_comment_type()=="comment") : ?>
<li class="<?php if ($comment->comment_author_email == "") echo 'mycomment'; else echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
<p style="margin-bottom:5px;
border-bottom:1px #000 dashed;
padding-bottom:5px;">
<strong><?php comment_author_link() ?></strong> <?php _e('','rhea'); ?> <a href="#comment-<?php comment_ID() ?>" title=""></a> </p>
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('Your comment is awaiting moderation.','rhea'); ?></em>
<?php endif; ?>
<?php comment_text() ?>
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'odd';
?>
<?php endif; endforeach; ?>
</ol>
<?php endif; ?>
<?php
/* This is a loop for printing trackbacks if there are any */
if ($numPingBacks != 0) : ?>
<ol class="tblist">
<li><h2><?php _e($numPingBacks); ?> Trackback(s)</h2></li>
<?php foreach ($comments as $comment) : ?>
<?php if (get_comment_type()!="comment") : ?>
<li id="comment-<?php comment_ID() ?>">
<?php comment_date('M j, Y') ?>: <?php comment_author_link() ?>
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('دیدگاه شما در حال بررسی برای تایید می باشد','rhea'); ?></em>
<?php endif; ?>
</li>
<?php if('odd'==$thiscomment) { $thiscomment = 'even'; } else { $thiscomment = 'odd'; } ?>
<?php endif; endforeach; ?>
</ol>
<?php endif; ?>
<?php else :
/* No comments at all means a simple message instead */
?>
<?php endif; ?>
<?php if (comments_open()) : ?>
<?php if (get_option('comment_registration') && !$user_ID ) : ?>
<p id="comments-blocked"><?php _e('You must be','rhea'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=
<?php the_permalink(); ?>"><?php _e('logged in','rhea'); ?></a> <?php _e('to post a comment.','rhea'); ?></p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<h2><?php _e('ارسال دیدگاه','rhea'); ?></h2>
<?php if ($user_ID) : ?>
<p><?php _e('شما با نام کاربری ','rhea'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php">
<?php echo $user_identity; ?></a> وارد شده اید<?php _e('. برای خروج,','rhea'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account','rhea'); ?>"><?php _e('اینجا کلیک نمایید','rhea'); ?></a>.
</p>
<?php else : ?>
<div style="
float:left:
width:370; ">
<p style="float:right; ">
<label for="author"><?php _e('* نام :','rhea'); ?> <?php if ($req) _e(__(' ','rhea')); ?></label>
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /></p>
<p style="float:right; "><label for="email"> <?php _e('* ایمیل :','rhea'); ?> <?php if ($req) _e(__(' ','rhea')); ?></label>
<input type="text" dir="ltr" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" size="22" /></p>
<p style="float:right; "><label for="url"><?php _e('وب سایت :','rhea'); ?></label>
<input type="text" dir="ltr" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /></p>
</div>
<?php
/****** Math Comment Spam Protection Plugin ******/
if ( function_exists('math_comment_spam_protection') ) {
$mcsp_info = math_comment_spam_protection();
?> <p><input type="text" name="mcspvalue" id="mcspvalue" value="" size="22" tabindex="4" />
<label for="mcspvalue"><small><?php _e('Spam protection: Sum of','rhea'); ?> <?php echo $mcsp_info['operand1'] . ' + ' . $mcsp_info['operand2'] . ' ?' ?></small></label>
<input type="hidden" name="mcspinfo" value="<?php echo $mcsp_info['result']; ?>" />
</p>
<?php } // if function_exists... ?>
<?php endif; ?>
<p><textarea name="comment" id="comment" cols="5" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('ارسال','rhea'); ?>" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
<?php else : // Comments are closed ?>
<p id="comments-closed"><?php _e('Sorry, comments for this entry are closed at this time.','rhea'); ?></p>
<?php endif; ?></div>