› Foros › PC › Software libre
<?php if (!empty($_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"><br /><br />ESte artículo está protegido con contraseña. Introduce la contraseña correcta para leer los comentarios.</p>
<?php
return;
}
?>
<?php if ( have_comments() ) : ?>
<div id="commentspost">
<a name="commentspost"></a>
<h3><?php comments_number(__('Sin Comentarios'), __('1 Comentario'), __('% Comentarios')); ?>
</h3>
<ol class="comments">
<?php wp_list_comments('type=comment&avatar_size=50');?>
</ol>
<div class="navigation">
<div class="alignleft"><?php previous_comments_link('Comentarios anteriores') ?></div>
<div class="alignright"><?php next_comments_link('Comentarios siguientes') ?></div>
</div>
</div>
<ol class="commentlist">
<?php //Displays trackbacks only
foreach ($comments as $comment) : ?>
<?php $comment_type = get_comment_type(); ?>
<?php if($comment_type != 'comment') { ?>
<li><?php comment_author_link() ?></li>
<?php }
endforeach; ?>
</ol>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?><!-- If comments are open, but there are no comments. -->
<div id="commentspost">
<h3>Sin Comentarios</h3>
<br />
<br />
<p>Sé el primero en escribir un comentario.</p>
</div>
<?php else : // comments are closed ?><!-- If comments are closed. -->
<br />
<br />
<p class="nocomments">Comentarios desactivados.</p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post->comment_status) : ?>
<div id="respond">
<h3><?php comment_form_title( 'Deja tu comentario', 'Deja una respuesta' ); ?></h3>
<div class="cancel-comment-reply"><p><?php cancel_comment_reply_link(); ?></p></div>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>Debes de <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">iniciar sesión</a> para escribir un comentario.</p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p>Has iniciado sesión como <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Desconectar »</a></p>
<?php else : ?>
<div id="formLabels">
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="32" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /><label for="author">Nombre <?php if ($req) echo "(obligatorio)"; ?></label></p>
<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="32" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /><label for="email">E-Mail <?php if ($req) echo "(obligatorio)"; ?></label></p>
<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="32" tabindex="3" /><label for="url">Página web</label></p>
</div>
<?php endif; ?>
<div id="formContent">
<textarea name="comment" id="comment" tabindex="4" cols="140" rows="8"></textarea><br />
<input name="submit" type="submit" id="submit" value="Envía tu comentario" />
</div>
<?php comment_id_fields(); ?>
<?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 ?>
<?php //Displays trackbacks only
foreach ($comments as $comment) : ?>