Advertisement
Guest User

show comment box above comments

a guest
Jan 1st, 2011
1,246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Default_Theme
  5. */
  6.  
  7. // Do not delete these lines
  8. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  9. die ('Please do not load this page directly. Thanks!');
  10.  
  11. if ( post_password_required() ) { ?>
  12. <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
  13. <?php
  14. return;
  15. }
  16. ?>
  17.  
  18. <!-- You can start editing here. -->
  19.  
  20. <?php if ('open' == $post->comment_status) : ?>
  21.  
  22. <div id="respond">
  23.  
  24. <h3><?php comment_form_title( 'Leave a Comment', 'Leave a Reply to %s' ); ?></h3>
  25.  
  26. <div class="cancel-comment-reply">
  27. <small><?php cancel_comment_reply_link(); ?></small>
  28. </div>
  29.  
  30. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  31.  
  32. <?php if ( $user_ID ) : ?>
  33.  
  34. <p>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="Log out of this account">Log out &raquo;</a></p>
  35. <?php else : ?>
  36.  
  37. <?php endif; ?>
  38. <?php
  39. global $user_login, $user_identity;
  40. get_currentuserinfo();
  41. if ($user_login) :
  42. ?>
  43. <?php else : ?>
  44. <div class="mydiv">
  45. <b><p>You must be <a href="http://bbleaks.com/login">logged in</a> to post a comment.</p></b>
  46. </div>
  47. <?php endif; ?>
  48. <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
  49.  
  50. <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
  51.  
  52. <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
  53. <?php comment_id_fields(); ?>
  54. </p>
  55. <?php do_action('comment_form', $post->ID); ?>
  56.  
  57. </form>
  58.  
  59. <?php if ( have_comments() ) : ?>
  60. <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
  61.  
  62. <ol class="commentlist">
  63. <?php wp_list_comments(); ?>
  64. </ol>
  65.  
  66. <div class="navigation">
  67. <div class="alignleft"><?php previous_comments_link() ?></div>
  68. <div class="alignright"><?php next_comments_link() ?></div>
  69. </div>
  70. <?php else : // this is displayed if there are no comments so far ?>
  71.  
  72. <?php if ('open' == $post->comment_status) : ?>
  73. <!-- If comments are open, but there are no comments. -->
  74.  
  75. <?php else : // comments are closed ?>
  76. <!-- If comments are closed. -->
  77. <p class="nocomments">Comments are closed.</p>
  78.  
  79. <?php endif; ?>
  80. <?php endif; ?>
  81. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  82. <p>You must be <a href="http://bbleaks.com/login">logged in</a> to post a comment.</p>
  83. <?php else : ?>
  84. <?php endif; // If registration required and not logged in ?>
  85. </div>
  86.  
  87. <?php endif; // if you delete this the sky will fall on your head ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement