Advertisement
Guest User

Untitled

a guest
May 8th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.41 KB | None | 0 0
  1. <?php
  2. /*
  3. The comments page for E-simple
  4. */
  5.  
  6. // Do not delete these lines
  7. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  8. die ('Please do not load this page directly. Thanks!');
  9.  
  10. if ( post_password_required() ) { ?>
  11. <div class="alert alert-info"><?php _e("This post is password protected. Enter the password to view comments."); ?></div>
  12. <?php
  13. return;
  14. }
  15. ?>
  16.  
  17. <!-- You can start editing here. -->
  18. <?php do_action( 'comment_form_before' ); ?>
  19. <?php do_action( 'comment_form_after' ); ?>
  20.  
  21. <?php if ( have_comments() ) : ?>
  22. <?php if ( ! empty($comments_by_type['comment']) ) : ?>
  23. <h3 id="comments"><?php comments_number('<span>' . __("No") . '</span> ' . __("Responses") . '', '<span>' . __("One") . '</span> ' . __("Response") . '', '<span>%</span> ' . __("Responses") );?> <?php _e("to"); ?> &#8220;<?php the_title(); ?>&#8221;</h3>
  24.  
  25. <nav id="comment-nav">
  26. <ul class="clearfix">
  27. <li><?php previous_comments_link( __("Older comments") ) ?></li>
  28. <li><?php next_comments_link( __("Newer comments") ) ?></li>
  29. </ul>
  30. </nav>
  31.  
  32. <ol class="commentlist">
  33. <?php wp_list_comments('type=comment&callback=bones_comments'); ?>
  34. </ol>
  35.  
  36. <?php endif; ?>
  37.  
  38. <?php if ( ! empty($comments_by_type['pings']) ) : ?>
  39. <h3 id="pings">Trackbacks/Pingbacks</h3>
  40.  
  41. <ol class="pinglist">
  42. <?php wp_list_comments('type=pings&callback=list_pings'); ?>
  43. </ol>
  44. <?php endif; ?>
  45.  
  46. <nav id="comment-nav">
  47. <ul class="clearfix">
  48. <li><?php previous_comments_link( __("Older comments") ) ?></li>
  49. <li><?php next_comments_link( __("Newer comments") ) ?></li>
  50. </ul>
  51. </nav>
  52.  
  53. <?php else : // this is displayed if there are no comments so far ?>
  54.  
  55. <?php if ( comments_open() ) : ?>
  56. <!-- If comments are open, but there are no comments. -->
  57.  
  58. <?php else : // comments are closed
  59. ?>
  60.  
  61. <?php
  62. $suppress_comments_message = of_get_option('suppress_comments_message');
  63.  
  64. if (is_page() && $suppress_comments_message) :
  65. ?>
  66.  
  67. <?php else : ?>
  68.  
  69. <!-- If comments are closed. -->
  70. <p class="alert alert-info"><?php _e("Comments are closed"); ?>.</p>
  71.  
  72. <?php endif; ?>
  73.  
  74. <?php endif; ?>
  75.  
  76. <?php endif; ?>
  77.  
  78.  
  79. <?php if ( comments_open() ) : ?>
  80.  
  81. <section id="respond" class="respond-form">
  82.  
  83. <h3 id="comment-form-title"><?php comment_form_title( __("Leave a Reply"), __("Leave a Reply to") . ' %s' ); ?></h3>
  84.  
  85. <div id="cancel-comment-reply">
  86. <p class="small"><?php cancel_comment_reply_link( __("Cancel") ); ?></p>
  87. </div>
  88.  
  89. <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
  90. <div class="help">
  91. <p><?php _e("You must be"); ?> <a href="<?php echo wp_login_url( get_permalink() ); ?>"><?php _e("logged in"); ?></a> <?php _e("to post a comment"); ?>.</p>
  92. </div>
  93. <?php else : ?>
  94.  
  95. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" class="form-vertical" id="commentform">
  96.  
  97. <?php if ( is_user_logged_in() ) : ?>
  98.  
  99. <p class="comments-logged-in-as"><?php _e("Logged in as"); ?> <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="<?php _e("Log out of this account"); ?>"><?php _e("Log out"); ?> &raquo;</a></p>
  100.  
  101. <?php else : ?>
  102.  
  103. <ul id="comment-form-elements" class="clearfix">
  104.  
  105. <li>
  106. <div class="control-group">
  107. <label for="author"><?php _e("Name"); ?> <?php if ($req) echo "(required)"; ?></label>
  108. <div class="input-prepend">
  109. <span class="add-on"><i class="icon-user"></i></span><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" placeholder="<?php _e("Your Name"); ?>" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
  110. </div>
  111. </div>
  112. </li>
  113.  
  114. <li>
  115. <div class="control-group">
  116. <label for="email"><?php _e("Mail"); ?> <?php if ($req) echo "(required)"; ?></label>
  117. <div class="input-prepend">
  118. <span class="add-on"><i class="icon-envelope"></i></span><input type="email" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" placeholder="<?php _e("Your Email"); ?>" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
  119. <span class="help-inline">(<?php _e("will not be published"); ?>)</span>
  120. </div>
  121. </div>
  122. </li>
  123.  
  124. <li>
  125. <div class="control-group">
  126. <label for="url"><?php _e("Website"); ?></label>
  127. <div class="input-prepend">
  128. <span class="add-on"><i class="icon-home"></i></span><input type="url" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" placeholder="<?php _e("Your Website"); ?>" tabindex="3" />
  129. </div>
  130. </div>
  131. </li>
  132.  
  133. </ul>
  134.  
  135. <?php endif; ?>
  136.  
  137. <div class="clearfix">
  138. <div class="input">
  139. <textarea style="width:94%;height: 230px;" name="comment" id="comment" placeholder="<?php _e("Your Comment Here…"); ?>" tabindex="4"></textarea>
  140. </div>
  141. </div>
  142.  
  143. <div class="comment-submit">
  144. <input class="su-button" name="submit" type="submit" id="submit" tabindex="5" value="<?php _e("Submit Comment"); ?>" />
  145. <?php comment_id_fields(); ?>
  146. </div>
  147.  
  148. <?php
  149. //comment_form();
  150. do_action('comment_form()', $post->ID);
  151.  
  152. ?>
  153.  
  154. </form>
  155.  
  156. <?php endif; // If registration required and not logged in ?>
  157. </section>
  158.  
  159. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement