M
comments.php—————————-
<?php if (!empty($_SERVER['SCRIPT_FILENAME']) &&
'comments.php' ==
basename($_SERVER['SCRIPT_FILENAME'] ) ) die ('Please do not load
this page directly. Thanks!'); ?>
<?php if ( !empty($post->post_password) && $_COOKIE[
'wp-postpass_' . COOKIEHASH ] != $post->post_password ) { ?>
<p>
<?php _e('Enter your password to view comments.');?>
</p>
<?php return; } $oddcomment='class="alt"'; ?>
<?php if( get_comments_number()>0 ): ?>
<h3 id="cheader">
<?php _e('Comments');?> </h3>
<?php endif; ?>
<?php if($comments): ?>
<ol class="commentlist">
<?php foreach($comments as $comment): ?>
<li <?php echo $oddcomment; ?> id="comment-<?php
comment_ID();?>">
<div class="avatar">
<?php echo get_avatar($comment, 48); ?>
</div>
<div class="comm">
<?php comment_text(); ?>
</div>
<p>
<cite>
<?php if ($comment->comment_approved =='0') : ?>
<?php _e('Your comment is awaiting moderation.'); endif;?>
<?php comment_author_link(); ?> -
<a href="#comment-<?php comment_ID(); ?>">
<?php comment_date(); ?>
<?php comment_time(); ?></a>
</cite>
<?php edit_comment_link(__('Edit'), ' ' ); ?>
</p></li>
<?php $oddcomment=(empty($oddcomment))? 'class="alt"':'';
endforeach; ?>
</ol>
<?php endif; ?>
<?php if(comments_open()): ?>
<?php if(get_option('comment_registratiron')&& !$user_ID ): ?>
<p>
<?php printf(__('You must be <a href="%s">logged in</a>
to post a comment.'), get_option('siteurl')."/wp-login.php?
redirect_to=".urlencode(get_permalink())); ?>
</p>
<?php else: ?>
<form action="<?php echo get_option('siteurl'); ?>
/wp-comments-post.php" method="post" id="formset">
<fieldset>
<legend>
<?php _e('Leave a comment'); ?>
</legend>
<?php if($user_ID): ?>
<p>
<?php printf(__('Logged in as %s.'), '<a href="'
.get_option('siteurl').'/wp-admin/profile.php">'
.$user_identity.'</a>' ); ?>
<a href="<?php echo get_option('siteurl');?>
/wp-login.php?action=logout" title="<?php
_e('Log out of this account'); ?>">
<?php _e('Log Out'); ?> »</a>
</p>
<?php else : ?>
<div id="fset">
<div id="fname"> <small>
<?php _e('Name'); ?>
<?php if($req) _e('(required)'); ?></small><br />
<label for="author">
<input type="text" name="author" id="author"
value="<?php echo $comment_author;?>" size="24" tabindex="1" />
</label>
</div>
<div id="fposta"> <small>
<?php _e('Mail (will not be published)'); ?>
<?php if ($req) _e('(required)'); ?></small><br />
<label for="email">
<input type="text" name="email" id="email"
value="<?php echo $comment_author_email; ?>" size="24"
tabindex="2" />
</label>
</div>
<div id="fsite"> <small>
<?php _e('Website'); ?></small><br />
<label for="url">
<input type="text" name="url" id="url" value="<?php
echo $comment_author_url; ?>" size="24" tabindex="3" />
</label>
</div>
</div>
<?php endif;?>
<textarea name="comment" id="comment" cols="70" rows="10"
tabindex="4"></textarea>
<p>
<input name="submit" type="submit" id="submit" tabindex="5"
value="<?php echo attribute_escape(__('Submit Comment'));
?>" />
<input type="hidden" name="comment_post_ID" value="<?php
echo $id; ?>" />
</p>
<p id="allowedtags"><small><strong>XHTML: </strong>
<?php printf(__('You can use these tags: %s'),
allowed_tags()); ?></small>
</p>
<?php do_action('comment_form', $post->ID); ?>
</fieldset>
</form>
<?php endif; //if reg. required and not logged in ?>
<?php /* else ://comments are closed ?>
<p>
<?php _e('Sorry, the comment form is closed at
this time.'); ?>
</p>
<?php */ endif; ?>
<div id="ads">
<!-- AdSense line
--><!-- AdSense line
-->
</div>