Advertisement
Darvil

Untitled

Jan 14th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.87 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
  8.  
  9. comments.</p>
  10.     <?php
  11.         return;
  12.     }
  13. ?>
  14.  
  15. <!-- You can start editing here. -->
  16.  
  17. <?php if (have_comments()) { ?>
  18. <?php do_action("comment_form_before");?>
  19. <div class="box">
  20.   <div id="commentspost"><a name="commentspost"></a>
  21.     <h2 class="title"><?php comment_type_count();?> <?php _e('Comments', 'wpzoom'); ?></h2>
  22.     <ol class="normalComments"><?php wp_list_comments('type=all&avatar_size=40');?></ol>
  23.     </div><!-- end #commentspost -->
  24.  
  25. <?php if ('closed' == $post->comment_status) : ?>
  26. </div>
  27. <?php endif; ?>
  28.    
  29.  <?php }
  30.  else { // this is displayed if there are no comments so far ?>
  31.  
  32.     <?php if ('open' == $post->comment_status) { ?>
  33.         <!-- If comments are open, but there are no comments. -->
  34. <div class="box">
  35. <div id="commentspost">
  36.     <h2 class="title">0 <?php _e('Comments', 'wpzoom'); ?></h2>
  37.   <p><?php _e('You can be the first one to leave a comment', 'wpzoom'); ?>.</p>
  38. </div>
  39.      <?php } else { // comments are closed ?>
  40.         <!-- If comments are closed. -->
  41.     <?php } ?>
  42. <?php } ?>
  43.  
  44. <?php if ('open' == $post->comment_status) : ?>
  45.  
  46.  
  47. <div id="respond">
  48.  
  49. <h2 class="title"><?php comment_form_title( __('Leave a Comment', 'wpzoom'), __('Leave a Reply to %s',
  50.  
  51. 'wpzoom') ); ?></h2>
  52. <div class="cleaner">&nbsp;</div>
  53. <div class="cancel-comment-reply"><p><?php cancel_comment_reply_link(); ?></p></div>
  54.  
  55. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  56. <p><?php _e('You must be', 'wpzoom'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?
  57.  
  58. redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('logged in', 'wpzoom'); ?></a> <?php _e('to
  59.  
  60. post a comment.', 'wpzoom'); ?></p>
  61. <?php else : ?>
  62.  
  63. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  64.  
  65. <?php if ( $user_ID ) : ?>
  66.  
  67. <p><?php _e('Logged in as', 'wpzoom'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-
  68.  
  69. admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?
  70.  
  71. >" title="Log out of this account"><?php _e('Log out', 'wpzoom'); ?> &raquo;</a></p>
  72.  
  73. <?php else : ?>
  74. <div id="formLabels">
  75. <label for="author"><?php _e('Name', 'wpzoom'); ?> <?php if ($req) _e('required', 'wpzoom'); ?>:</label>
  76. <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1"
  77.  
  78. <?php if ($req) echo "aria-required='true'"; ?> /><br />
  79.  
  80. <label for="email"><?php _e('E-Mail', 'wpzoom'); ?> <?php if ($req) _e('required', 'wpzoom'); ?>:</label>
  81. <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22"
  82.  
  83. tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /><br />
  84.  
  85. <label for="url"><?php _e('Website', 'wpzoom'); ?>:</label>
  86. <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3"
  87.  
  88. /><br />
  89. </div>
  90. <?php endif; ?>
  91. <div id="formContent">
  92. <label for="comment"><?php _e('Comment', 'wpzoom'); ?>:</label>
  93. <textarea name="comment" id="comment" tabindex="4" cols="140" rows="8"></textarea><br />
  94. <input name="submit" type="submit" id="submit" value="<?php _e('Add Comment', 'wpzoom'); ?>" />
  95. <!--<p><strong>XHTML:</strong> You can use these tags: <br /><code><?php echo allowed_tags(); ?
  96.  
  97. ></code></p>-->
  98. </div>
  99. <div class="cleaner">&nbsp;</div>
  100. <?php comment_id_fields(); ?>
  101. <?php do_action('comment_form', $post->ID); ?>
  102. <?php do_action("comment_form_after");?>
  103. </form>
  104. <?php endif; // If registration required and not logged in ?>
  105. </div>
  106. </div>
  107. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement