Advertisement
Guest User

diva

a guest
Dec 20th, 2012
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. <?php
  2. // Do not delete these lines
  3. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  4. die ('Please do not load this page directly. Thanks!');
  5.  
  6. if ( post_password_required() ) { ?>
  7. <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
  8. <?php
  9. return;
  10. }
  11. ?>
  12.  
  13. <!-- You can start editing here. -->
  14. <?php if (have_comments() ) : ?>
  15. <div class="sep sep-tall">&nbsp;</div><a name="comments"></a>
  16. <div id="comments">
  17.  
  18. <h2><?php comments_number( __('No Comments', 'wpzoom'), __('1 Comment', 'wpzoom'), __('% Comments', 'wpzoom')); ?></h2>
  19.  
  20. <div id="commentspost">
  21. <ol class="comments"><?php wp_list_comments('type=all&avatar_size=40');?></ol>
  22. </div><!-- #commentspost -->
  23.  
  24. <?php else : // this is displayed if there are no comments so far ?>
  25.  
  26. <?php if ('open' == $post->comment_status) : ?>
  27. <!-- If comments are open, but there are no comments. -->
  28. <div class="sep sep-tall">&nbsp;</div><a name="comments"></a>
  29. <div id="comments">
  30.  
  31. <h2><?php _e('No comments','wpzoom');?></h2>
  32.  
  33. <div id="commentspost">
  34. <p><?php _e('Be the first one to leave a comment.','wpzoom');?></p>
  35. </div>
  36. <?php else : // comments are closed ?>
  37.  
  38. <?php if (!is_page()) { ?>
  39. <div id="comments">
  40.  
  41. <h2><?php _e('Comments are closed','wpzoom');?></h2>
  42. <p><?php _e('Sorry, but you cannot leave a comment for this post.','wpzoom');?></p>
  43. </div><!-- end #comments -->
  44. <?php } ?>
  45. <?php endif; ?>
  46. <?php endif; ?>
  47.  
  48. <?php if ('open' == $post->comment_status) : ?>
  49.  
  50. <div id="respond">
  51.  
  52. <h2><?php comment_form_title( __('Post a Comment', 'wpzoom'), __('Leave a Reply to %s', 'wpzoom') ); ?></h2>
  53.  
  54. <div class="cancel-comment-reply"><p><?php cancel_comment_reply_link(); ?></p></div>
  55.  
  56. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  57. <p><?php _e('You must be','wpzoom');?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('logged in','wpzoom');?></a> <?php _e('to post a comment.','wpzoom');?></p>
  58. <?php else : ?>
  59.  
  60. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  61.  
  62. <?php if ( $user_ID ) : ?>
  63.  
  64. <p><?php _e('Logged in as','wpzoom');?> <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','wpzoom');?> &raquo;</a></p>
  65.  
  66. <?php else : ?>
  67. <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
  68. <label for="author"><?php _e('Name','wpzoom');?> <?php if ($req) { _e('required', 'wpzoom'); } ?></label>
  69.  
  70. <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
  71. <label for="email"><?php _e('E-Mail','wpzoom');?> <?php if ($req) { _e('required', 'wpzoom'); } ?></label>
  72.  
  73. <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
  74. <label for="url"><?php _e('Website','wpzoom');?></label>
  75. <?php endif; ?>
  76. <textarea name="comment" id="comment" tabindex="4" cols="140" rows="8"></textarea><br />
  77. <!-- <p><strong>XHTML:</strong> You can use these tags: <br /><code><?php echo allowed_tags(); ?></code></p> -->
  78. <input name="submit" type="submit" id="submit" value="<?php _e('submit','wpzoom');?>" />
  79. <div class="clear">&nbsp;</div>
  80. <?php comment_id_fields(); ?>
  81. <?php do_action('comment_form', $post->ID); ?>
  82.  
  83. </form>
  84.  
  85. <?php endif; // If registration required and not logged in ?>
  86.  
  87. </div><!-- end #respond -->
  88.  
  89. <?php endif; // if you delete this the sky will fall on your head ?>
  90.  
  91. <?php if ('open' == $post->comment_status || have_comments()){ ?>
  92. </div><!-- #comments -->
  93. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement