csburdick

Comments.php with Comments Plus

Dec 21st, 2011
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. <?php global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } } ?>
  2. <?php
  3. /**
  4. * @package WordPress
  5. * @subpackage Default_Theme
  6. */
  7.  
  8. // Do not delete these lines
  9. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  10. die ('Please do not load this page directly. Thanks!');
  11.  
  12. if ( post_password_required() ) { ?>
  13. <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
  14. <?php
  15. return;
  16. }
  17. ?>
  18.  
  19. <!-- You can start editing here. -->
  20.  
  21. <?php if ( have_comments() ) : ?>
  22.  
  23. <div class="allcomments">
  24.  
  25. <h3 id="comments"><?php _e("Comments"); ?> (<?php comments_number('0', '1', '%');?>)</h3>
  26.  
  27. <p class="comments-number"><a href="<?php trackback_url(); ?>" title="<?php _e("Trackback URL"); ?>"><?php _e("Trackback URL"); ?></a> | <a title="<?php _e("Comments RSS Feed for This Entry"); ?>" href="<?php the_permalink() ?>feed"><?php _e("Comments RSS Feed"); ?></a></p>
  28.  
  29. <ol class="commentlist">
  30. <?php
  31. $avsize = $wp_genius_grav_size;
  32. wp_list_comments('avatar_size='.$avsize);
  33. ?>
  34. </ol>
  35.  
  36. <div class="comments-navigation clearfix">
  37. <div class="alignleft"><?php previous_comments_link() ?></div>
  38. <div class="alignright"><?php next_comments_link() ?></div>
  39. </div>
  40.  
  41. </div>
  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"><?php _e("Comments are closed."); ?></p>
  51.  
  52. <?php endif; ?>
  53.  
  54. <?php endif; ?>
  55.  
  56. <?php if ('open' == $post->comment_status) : ?>
  57.  
  58. <div id="respond">
  59.  
  60. <h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
  61.  
  62. <div class="cancel-comment-reply">
  63. <small><?php cancel_comment_reply_link(); ?></small>
  64. </div>
  65.  
  66. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  67. <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
  68. <?php else : ?>
  69.  
  70. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  71.  
  72. <?php do_action('comment_form_before'); ?>
  73.  
  74. <?php if ( $user_ID ) : ?>
  75.  
  76. <p><?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="Logout"><?php _e("Logout"); ?></a></p>
  77.  
  78. <?php else : ?>
  79.  
  80. <p><label for="author">Name <?php if ($req) echo "(required)"; ?></label><br />
  81. <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="40" tabindex="1" /></p>
  82.  
  83. <p><label for="email">Email <?php if ($req) echo "(required)"; ?> (will not be published)</label><br />
  84. <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="40" tabindex="2" /></p>
  85.  
  86. <p><label for="url">Website</label><br />
  87. <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="40" tabindex="3" /></p>
  88.  
  89. <?php endif; ?>
  90.  
  91. <p><strong><?php _e("If you want a picture to show with your comment, go get a"); ?> <a rel="nofollow" href="http://en.gravatar.com/">Gravatar</a></strong>.</p>
  92.  
  93. <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
  94.  
  95. <p><?php do_action('bwp_recaptcha_add_markups'); ?></p>
  96.  
  97. <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
  98. <?php comment_id_fields(); ?>
  99. </p>
  100. <?php do_action('comment_form', $post->ID); ?>
  101.  
  102. <?php do_action('comment_form_after'); ?>
  103.  
  104. </form>
  105.  
  106. <?php endif; // If registration required and not logged in ?>
  107. </div>
  108.  
  109. <?php endif; // if you delete this the sky will fall on your head ?>
Add Comment
Please, Sign In to add comment