1 <?php // Do not delete these lines
2 if ('comments-paged.php' == basename($_SERVER['SCRIPT_FILENAME']))
3 die ('Please do not load this page directly. Thanks!');
4
5 if (!empty($post->post_password)) { // if there's a password
6 if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
7 ?>
8
9 <p class="nocomments">This post is password protected. Enter the password to view comments.<p>
10
11 <?php
12 return;
13 }
14 }
15
16 /* This variable is for alternating comment background */
17 $oddcomment = 'alt';
18 ?>
19
20 <!-- You can start editing here. -->
21
22 <?php if ($comments) : ?>
23 <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3>
24
25 <!-- Comment page numbers -->
26 <?php if ($paged_comments->pager->num_pages() > 1): ?>
27 <p class="comment-page-numbers"><?php _e("Pages:"); ?> <?php paged_comments_print_pages(); ?></p>
28 <?php endif; ?>
29 <!-- End comment page numbers -->
30
31 <ol class="commentlist" style="list-style-type: none;">
32
33 <?php foreach ($comments as $comment) : ?>
34
35 <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
36 <div class="comment-number"><?php echo $comment_number; $comment_number += $comment_delta;?></div>
37 <cite><?php comment_author_link() ?></cite> Says:
38 <?php if ($comment->comment_approved == '0') : ?>
39 <em>Your comment is awaiting moderation.</em>
40 <?php endif; ?>
41 <br />
42
43 <small class="commentmetadata"><a href="<?php echo paged_comments_url('comment-'.get_comment_ID()); ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?></small>
44
45 <?php comment_text() ?>
46
47 </li>
48
49 <?php /* Changes every other comment to a different class */
50 if ('alt' == $oddcomment) $oddcomment = '';
51 else $oddcomment = 'alt';
52 ?>
53
54 <?php endforeach; /* end for each comment */ ?>
55
56 </ol>
57
58 <!-- Comment page numbers -->
59 <?php if ($paged_comments->pager->num_pages() > 1): ?>
60 <p class="comment-page-numbers"><?php _e("Pages:"); ?> <?php paged_comments_print_pages(); ?></p>
61 <?php endif; ?>
62 <!-- End comment page numbers -->
63
64 <?php else : // this is displayed if there are no comments so far ?>
65
66 <?php if ('open' == $post->comment_status) : ?>
67 <!-- If comments are open, but there are no comments. -->
68
69 <?php else : // comments are closed ?>
70 <!-- If comments are closed. -->
71 <p class="nocomments">Comments are closed.</p>
72
73 <?php endif; ?>
74 <?php endif; ?>
75
76
77 <?php if ('open' == $post->comment_status) : ?>
78
79 <h3 id="respond">Leave a Reply</h3>
80
81 <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
82 <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
83 <?php else : ?>
84
85 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
86
87 <?php if ( $user_ID ) : ?>
88
89 <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">Logout »</a></p>
90
91 <?php else : ?>
92
93 <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
94 <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
95
96 <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
97 <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
98
99 <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
100 <label for="url"><small>Website</small></label></p>
101
102 <?php endif; ?>
103
104 <!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
105
106 <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
107
108 <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
109 <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
110 </p>
111 <?php do_action('comment_form', $post->ID); ?>
112
113 </form>
114
115 <?php endif; // If registration required and not logged in ?>
116
117 <?php endif; // if you delete this the sky will fall on your head ?>