Content of comments.php from minimalissimplistic.zip

without / with line numbers
  1. <?php // Do not delete these lines
    
  2.     if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    
  3.         die ('Please do not load this page directly. Thanks!');
    
  4. 
    
  5.         if (!empty($post->post_password)) { // if there's a password
    
  6.             if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
    
  7.                 ?>
    
  8.                 
    
  9.                 <p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments."); ?><p>
    
  10.                 
    
  11.                 <?php
    
  12.                 return;
    
  13.             }
    
  14.         }
    
  15. ?>
    
  16. 
    
  17. <!-- You can start editing here. -->
    
  18. 
    
  19. <?php if ($comments) : ?>
    
  20.     <h3 id="comments"><?php comments_number('No comment', 'One comment', '% comments' );?> to &#8220;<?php the_title(); ?>&#8221;</h3> 
    
  21. 
    
  22.     <ol class="commentlist">
    
  23. 
    
  24.     <?php foreach ($comments as $comment) : ?>
    
  25. 
    
  26.         <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
    
  27.             <small class="commentmetadata">On <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?>,<br/></small>
    
  28. 
    
  29.             <cite><?php comment_author_link() ?></cite> <?php mytheme_says() ?>:
    
  30.             <?php if ($comment->comment_approved == '0') : ?>
    
  31.             <strong>Your comment is awaiting moderation.</strong>
    
  32.             <?php endif; ?>
    
  33.             <br />
    
  34. 
    
  35.             <?php comment_text() ?>
    
  36. 
    
  37.         </li>
    
  38. 
    
  39.     <?php endforeach; /* end for each comment */ ?>
    
  40. 
    
  41.     </ol>
    
  42. 
    
  43.  <?php else : // this is displayed if there are no comments so far ?>
    
  44. 
    
  45.   <?php if ('open' == $post-> comment_status) : ?> 
    
  46.         <!-- If comments are open, but there are no comments. -->
    
  47.         
    
  48.      <?php else : // comments are closed ?>
    
  49.         <!-- If comments are closed. -->
    
  50.         <p class="nocomments">Comments are closed.</p>
    
  51.         
    
  52.     <?php endif; ?>
    
  53. <?php endif; ?>
    
  54. 
    
  55. 
    
  56. <?php if ('open' == $post-> comment_status) : ?>
    
  57. 
    
  58. <h3 id="respond">Leave a Reply</h3>
    
  59. 
    
  60. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    
  61. <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
    
  62. <?php else : ?>
    
  63. 
    
  64. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
  65. 
    
  66. <?php if ( $user_ID ) : ?>
    
  67. 
    
  68. <p>Logged in as <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="<?php _e('Log out of this account') ?>">Logout &raquo;</a></p>
    
  69. 
    
  70. <?php else : ?>
    
  71. 
    
  72. <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    
  73. <label for="author"><small>Name <?php if ($req) _e('(required)'); ?></small></label></p>
    
  74. 
    
  75. <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    
  76. <label for="email"><small>Mail (will not be published) <?php if ($req) _e('(required)'); ?></small></label></p>
    
  77. 
    
  78. <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    
  79. <label for="url"><small>Website</small></label></p>
    
  80. 
    
  81. <?php endif; ?>
    
  82. 
    
  83. <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    
  84. 
    
  85. <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
    
  86. <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    
  87. </p>
    
  88. <?php do_action('comment_form', $post->ID); ?>
    
  89. 
    
  90. </form>
    
  91. 
    
  92. <?php endif; // If registration required and not logged in ?>
    
  93. 
    
  94. <?php endif; // if you delete this the sky will fall on your head ?>
  95.  

Return to listing of minimalissimplistic.zip