Don't like ads? PRO users don't see any ads ;-)
Guest

asxdv

By: a guest on Apr 28th, 2012  |  syntax: PHP  |  size: 4.23 KB  |  hits: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. // Do not delete these lines
  3.    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  4.       die ('Por favor no cargues esta p&aacute;gina directamente. Gracias!');
  5.    if ( post_password_required() ) { ?>
  6.       <p class="nocomments">Este art&iacute;culo est&aacute; protegido con contrase&ntilde;a. Ingresa la contrase&ntilde;a para ver los comentarios.</p>
  7.    <?php
  8.       return;
  9.    }
  10. ?>
  11. <!-- You can start editing here. -->
  12. <div id="comments_wrap">
  13. <?php if ( have_comments() ) : ?>
  14.    <h2><?php comments_number('No hay Comentarios, se el primero en dejar tus opiniones e ideas', 'Hay un Comentario', 'Hay % Comentarios' );?> en &#8220;<?php the_title(); ?>&#8221;</h2>
  15.    <ol class="commentlist">
  16.    <?php wp_list_comments('avatar_size=48&callback=custom_comment&type=comment'); ?>
  17.    </ol>    
  18.    <div class="navigation">
  19.       <div class="alignleft"><?php previous_comments_link() ?></div>
  20.       <div class="alignright"><?php next_comments_link() ?></div>
  21.       <div class="fix"></div>
  22.    </div>
  23.    <br />
  24.    <?php if ( $comments_by_type['pings'] ) : ?>
  25.     <h2 id="pings">Trackbacks/Pingbacks</h2>
  26.     <ol class="pinglist">
  27.     <?php wp_list_comments('callback=custom_comment&type=pings'); ?>
  28.     </ol>
  29.     <?php endif; ?>
  30. <?php else : // this is displayed if there are no comments so far ?>
  31.    <?php if ('open' == $post->comment_status) : ?>
  32.       <!-- If comments are open, but there are no comments. -->
  33.     <?php else : // comments are closed ?>
  34.       <!-- If comments are closed. -->
  35.       <p class="nocomments">Los comentarios est&aacute;n cerrados.</p>
  36.    <?php endif; ?>
  37. <?php endif; ?>
  38. </div> <!-- end #comments_wrap -->
  39. <?php if ('open' == $post->comment_status) : ?>
  40. <div id="respond">
  41. <h2><?php comment_form_title( 'Deja un Comentario', 'D&eacute;jale un Comentario a %s' ); ?></h2>
  42. <div class="cancel-comment-reply">
  43.    <p><small><?php cancel_comment_reply_link(); ?></small></p>
  44. </div>
  45. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  46. <p>Debes <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">ingresar</a> para publicar un comentario.</p>
  47. <?php else : ?>
  48. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  49. <?php if ( $user_ID ) : ?>
  50. <p>Has ingresado como <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(); ?>" title="Salir de esta cuenta">Salir &raquo;</a></p>
  51. <?php else : ?>      
  52.  
  53. <div id="comment-input">
  54.          <label for="author"><?php _e('Nombre', 'pyre'); ?> <span class="req"><?php if ($req) echo __("(required)", 'pyre'); ?></span></label>
  55.          <input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> class="input-name" />
  56.  
  57.  
  58.  
  59.  
  60.          <label for="email"><?php _e('Email', 'pyre'); ?> <span class="req"><?php if ($req) echo __("(required)", 'pyre'); ?></span></label>
  61.          <input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> class="input-email"  />
  62.      
  63.          <label for="url"><?php _e('Sitio web', 'pyre'); ?></label>
  64.          <input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="22" tabindex="3" class="input-website" />
  65.          
  66.       </div>
  67.  
  68. <?php } // if function_exists... ?>
  69. <?php endif; ?>
  70. <!--<p><small><strong>XHTML:</strong> Puedes utilizar las siguientes etiquetas: <?php echo allowed_tags(); ?></small></p>-->
  71. <p><textarea name="comment" id="comment" style="width:97%;" rows="10" tabindex="4"></textarea></p>
  72. <p><input name="submit" type="submit" id="submit" style="width:30%;" tabindex="5" value="Publica tu Comentario" />
  73. <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  74. </p>
  75. <?php comment_id_fields(); ?>
  76. <?php do_action('comment_form', $post->ID); ?>
  77. </form>
  78. <?php endif; // If logged in ?>
  79. <div class="fix"></div>
  80. </div> <!-- end #respond -->
  81. <?php endif; // if you delete this the sky will fall on your head ?>