Guest User

intredipity theme wordpress comments

a guest
Dec 6th, 2011
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. <?php
  2. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  3. die (_e('Please do not load this page directly. Thanks!'));
  4.  
  5. if ( post_password_required() ) { ?>
  6. <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.')?></p>
  7. <?php
  8. return;
  9. }
  10. ?>
  11.  
  12. <?php if ( have_comments() ) : ?>
  13. <h3 class="commentheading"><?php comments_number('Be the first to comment on', '1 Response to', '% Responses to' );?> "<?php the_title(); ?>"</h3>
  14.  
  15. <ul id="comments" class="commentlist">
  16. <?php wp_list_comments('callback=tbf1_comment'); ?>
  17. </ul>
  18.  
  19. <div class="navigation">
  20. <div class="alignleft"><?php previous_comments_link(__('Older Comments')) ?></div>
  21. <div class="alignright"><?php next_comments_link(__('Newer Comments')) ?></div>
  22. <div class="recover"></div>
  23. </div>
  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.  
  29. <?php else : // comments are closed ?>
  30. <!-- If comments are closed. -->
  31. <?php echo (!is_page()) ? '<p class="nocomments">Comments are closed.</p>' : '' ?>
  32.  
  33. <?php endif; ?>
  34. <?php endif; ?>
  35.  
  36.  
  37. <?php if ('open' == $post->comment_status) : ?>
  38. <div id="respond">
  39. <h5><?php comment_form_title( 'Leave a Comment', 'Leave a Comment to %s' ); ?></h5>
  40. <div class="cancel-comment-reply">
  41. <?php cancel_comment_reply_link(); ?>
  42. </div>
  43.  
  44. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  45. <p><?php _e('You must be')?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"><?php _e('logged in')?></a> <?php _e('to post a comment.')?></p>
  46. <?php else : ?>
  47.  
  48. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  49.  
  50. <?php if ( $user_ID ) : ?>
  51.  
  52. <p><?php _e('Logged in as')?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php" class="usr-meta"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account')?>" class="comment-reply-login"><?php _e('Log out')?> &raquo;</a></p>
  53.  
  54. <?php else : ?>
  55.  
  56. <p><input type="text" name="author" id="author" class="formfield" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
  57. <label for="author"><small><?php _e('Name')?> <?php if ($req) echo "(required)"; ?></small></label></p>
  58.  
  59. <p><input type="text" name="email" id="email" class="formfield" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
  60. <label for="email"><small><?php _e('Email (will not be published)')?> <?php if ($req) echo "(required)"; ?></small></label></p>
  61.  
  62. <p><input type="text" name="url" id="url" class="formfield" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
  63. <label for="url"><small><?php _e('Website URL')?></small></label></p>
  64.  
  65. <?php endif; ?>
  66.  
  67. <p><textarea name="comment" id="comment" class="formfield" cols="60" rows="10" tabindex="4"></textarea></p>
  68.  
  69. <p><span class="button"><span><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment')?>" /></span></span>
  70. <?php comment_id_fields(); ?>
  71. </p>
  72. <?php do_action('comment_form', $post->ID); ?>
  73.  
  74. </form>
  75.  
  76. <?php endif; // If registration required and not logged in ?>
  77.  
  78. </div>
  79. <?php endif; ?>
  80.  
Advertisement
Add Comment
Please, Sign In to add comment