<?php if (!empty($post->post_password) && $_COOKIE['wp-postpass_'.COOKIEHASH
]!=$post->post_password) : ?> <p id="comments-locked">Articolo protetto da password</p>
<?php return; endif; ?>
<?php if ($comments) : ?>
<?php
/* Author values for author highlighting */
/* Enter your email and name as they appear in the admin options */
"highlight" => "highlight",
"email" => "YOUR EMAIL HERE",
"name" => "YOUR NAME HERE"
);
/* Count the totals */
$numPingBacks = 0;
$numComments = 0;
/* Loop throught comments to count these totals */
foreach ($comments as $comment) {
if (get_comment_type() != "comment") { $numPingBacks++; }
else { $numComments++; }
}
/* Used to stripe comments */
$thiscomment = 'odd';
?>
<?php
/* This is a loop for printing comments */
if ($numComments != 0) : ?>
<div class="titolo"><?php if($numComments == 1) echo "1 Commento"; else echo $numComments." Commenti"; ?></div>
<ol id="comments">
<?php foreach ($comments as $comment) : ?>
<?php if (get_comment_type()=="comment") : ?>
<li id="comment-<?php comment_ID(); ?>" class="comment-li">
<div class="comment-meta">
<b><?php comment_author_link() ?></b> il <?php comment_date('l j F Y')?> alle <?php comment_date('G:i')?> scrive:
</div>
<div class="comment-text">
<?php comment_text(); ?>
</div>
</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 */
?>
<div class="titolo">Nessun commento ancora</div>
<?php endif; ?>
<?php if (comments_open()) : ?>
<div id="comments-form">
<div class="titolo">Lascia un commento</div>
<?php if (get_option('comment_registration') && !$user_ID ) : ?>
<p>Devi essere <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=
<?php the_permalink(); ?>">collegato</a> per lasciare un commento.</p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ($user_ID) : ?>
<p>Collegato come<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="Log out of this account">Logout</a>
</p>
<?php else : ?>
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" />
<label for="author">Name<?php if ($req) _e(' (required)'); ?></label></p>
<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" />
<label for="email">E-mail (will not be published)<?php if ($req) _e(' (required)'); ?></label></p>
<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" />
<label for="url">Website</label></p>
<?php endif; ?>
<p><textarea name="comment" id="comment" rows="7" cols="60"></textarea></p>
<p><input type="submit" name="submit" id="submit" value="Invia"/>
<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 ?>
</div>
<?php else : // Comments are closed ?>
<?php endif; ?>