Advertisement
Guest User

Untitled

a guest
Oct 28th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.39 KB | None | 0 0
  1. <?php if ( comments_open() ) : ?>
  2. <div class="comments">
  3.   <?php if ( post_password_required() ) : ?>
  4.   <p class="nopassword">
  5.     <?php _e('This post is password protected. Enter the password to view any comments.','templatic'); ?>
  6.   </p>
  7. </div>
  8. <!-- #comments -->
  9. <?php  return; endif; ?>
  10. <div id="comments">
  11.   <?php if (have_comments()) : ?>
  12.   <h3><?php printf(_n('1 comment', '%1$s comments', get_comments_number()), number_format_i18n( get_comments_number() ), '' ); ?></h3>
  13.   <div class="comment_list">
  14.     <ol>
  15.       <?php wp_list_comments(array('callback' => 'commentslist')); ?>
  16.     </ol>
  17.   </div>
  18.   <?php endif; // end have_comments() ?>
  19. </div>
  20. <?php if ('open' == $post->comment_status) : ?>
  21. <div id="respond">
  22.   <h3><?php _e('What do you think?','templatic');?></h3>
  23.   <div class="comment_form">
  24.     <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  25.     <p class="comment_message">You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
  26.     <?php else : ?>
  27.     <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  28.       <?php if ( $user_ID ) : ?>
  29.       <p class="comment_message"><?php _e('Logged in as','templatic');?> <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"><?php _e('Log out &raquo;','templatic');?></a></p>
  30.       <table>
  31.         <tr>
  32.           <td><div class="commform-textarea">
  33.               <textarea name="comment" id="comment" cols="50" rows="7" tabindex="1"></textarea>
  34.             </div></td>
  35.         </tr>
  36.       </table>
  37.       <?php else : ?>
  38.      
  39.       <table>
  40.         <tr>
  41.           <td><div class="commform-textarea">
  42.               <textarea name="comment" id="comment" cols="50" rows="7" tabindex="1"></textarea>
  43.             </div></td>
  44.         </tr>
  45.       </table>
  46.      
  47.       <table>
  48.          <tr>
  49.           <td class="commform-author"><p><?php _e('Name','templatic');?> <span><?php _e('required','templatic');?></span></p>
  50.             <div>
  51.               <input type="text" name="author" id="author" tabindex="2" />
  52.             </div></td>
  53.           <td class="commform-email"><p><?php _e('Email','templatic');?> <span><?php _e('required','templatic');?></span></p>
  54.             <div>
  55.               <input type="text" name="email" id="email" tabindex="3" />
  56.             </div></td>
  57.           <td class="commform-url"><p><?php _e('Website','templatic');?></p>
  58.             <div>
  59.               <input type="text" name="url" id="url" tabindex="4" />
  60.             </div></td>
  61.         </tr>
  62.       </table>
  63.       <?php endif; ?>
  64.       <div class="submit clear">
  65.         <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit','templatic');?>" />
  66.         <p id="cancel-comment-reply">
  67.           <?php cancel_comment_reply_link() ?>
  68.         </p>
  69.       </div>
  70.       <div>
  71.         <?php comment_id_fields(); ?>
  72.         <?php do_action('comment_form', $post->ID); ?>
  73.       </div>
  74.     </form>
  75.     <?php endif; // If registration required and not logged in ?>
  76.   </div>
  77.   <?php endif; // if you delete this the sky will fall on your head ?>
  78. </div>
  79. </div>
  80. <?php endif; // end ! comments_open() ?>
  81. <!-- #comments -->
  82.  
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement