Advertisement
Guest User

Untitled

a guest
Oct 7th, 2010
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. <?php if(!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) : ?>
  2. <?php die('You can not access this page directly!'); ?>
  3. <?php endif; ?>
  4.  
  5. <?php if(!empty($post->post_password)) : ?>
  6. <?php if($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
  7. <p>This post is password protected. Enter the password to view comments.</p>
  8. <?php endif; ?>
  9. <?php endif; ?>
  10.  
  11. <?php if($comments) : ?>
  12. <ol>
  13. <?php foreach($comments as $comment) : ?>
  14. <li id="comment-<?php comment_ID(); ?>">
  15. <?php if ($comment->comment_approved == '0') : ?>
  16. <p>Your comment is awaiting approval</p>
  17. <?php endif; ?>
  18. <?php comment_text(); ?>
  19. <p class="meta"><?php comment_type(); ?> by <?php comment_author_link(); ?> on <?php comment_date(); ?> at <?php comment_time(); ?></p>
  20. </li>
  21. <?php endforeach; ?>
  22. </ol>
  23. <?php else : ?>
  24. <p>No comments yet</p>
  25. <?php endif; ?>
  26.  
  27. <?php if(comments_open()) : ?>
  28. <?php if(get_option('comment_registration') && !$user_ID) : ?>
  29. <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><?php else : ?>
  30. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  31. <?php if($user_ID) : ?>
  32. <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out &raquo;</a></p>
  33. <?php else : ?>
  34. <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
  35. <label for="author"><small>Name <?php if($req) echo "(required)"; ?></small></label></p>
  36. <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
  37. <label for="email"><small>Mail (will not be published) <?php if($req) echo "(required)"; ?></small></label></p>
  38. <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
  39. <label for="url"><small>Website</small></label></p>
  40. <?php endif; ?>
  41. <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
  42. <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
  43. <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>
  44. <?php do_action('comment_form', $post->ID); ?>
  45. </form>
  46. <?php endif; ?>
  47. <?php else : ?>
  48. <p>The comments are closed.</p>
  49. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement