|
1 <?php |
|
2 |
|
3 |
|
4 |
|
5 // Do not delete these lines |
|
6 |
|
7 if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) |
|
8 |
|
9 die ('Please do not load this page directly. Thanks!'); |
|
10 |
|
11 |
|
12 |
|
13 if ( post_password_required() ) { ?> |
|
14 |
|
15 <p class="nocomments">This post is password protected. Enter the password to view comments.</p> |
|
16 |
|
17 <?php |
|
18 |
|
19 return; |
|
20 |
|
21 } |
|
22 |
|
23 ?> |
|
24 |
|
25 |
|
26 |
|
27 <!-- You can start editing here. --> |
|
28 |
|
29 |
|
30 |
|
31 <?php if ( have_comments() ) : ?> |
|
32 |
|
33 <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to “<?php the_title(); ?>”</h3> |
|
34 |
|
35 |
|
36 |
|
37 <div class="navigation"> |
|
38 |
|
39 <div class="alignleft"><?php previous_comments_link() ?></div> |
|
40 |
|
41 <div class="alignright"><?php next_comments_link() ?></div> |
|
42 |
|
43 </div> |
|
44 |
|
45 |
|
46 |
|
47 <ol class="commentlist"> |
|
48 |
|
49 <?php wp_list_comments('avatar_size=40'); ?> |
|
50 |
|
51 </ol> |
|
52 |
|
53 |
|
54 |
|
55 <div class="navigation"> |
|
56 |
|
57 <div class="alignleft"><?php previous_comments_link() ?></div> |
|
58 |
|
59 <div class="alignright"><?php next_comments_link() ?></div> |
|
60 |
|
61 </div> |
|
62 |
|
63 <?php else : // this is displayed if there are no comments so far ?> |
|
64 |
|
65 |
|
66 |
|
67 <?php if ( comments_open() ) : ?> |
|
68 |
|
69 <!-- If comments are open, but there are no comments. --> |
|
70 |
|
71 |
|
72 |
|
73 <?php else : // comments are closed ?> |
|
74 |
|
75 <!-- If comments are closed. --> |
|
76 |
|
77 <p class="nocomments">Comments are closed.</p> |
|
78 |
|
79 |
|
80 |
|
81 <?php endif; ?> |
|
82 |
|
83 <?php endif; ?> |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 <?php if ( comments_open() ) : ?> |
|
90 |
|
91 |
|
92 |
|
93 <div id="respond"> |
|
94 |
|
95 |
|
96 |
|
97 <h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3> |
|
98 |
|
99 |
|
100 |
|
101 <div class="cancel-comment-reply"> |
|
102 |
|
103 <small><?php cancel_comment_reply_link(); ?></small> |
|
104 |
|
105 </div> |
|
106 |
|
107 |
|
108 |
|
109 <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?> |
|
110 |
|
111 <p>You must be <a href="<?php echo wp_login_url( get_permalink() ); ?>">logged in</a> to post a comment.</p> |
|
112 |
|
113 <?php else : ?> |
|
114 |
|
115 |
|
116 |
|
117 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> |
|
118 |
|
119 |
|
120 |
|
121 <?php if ( is_user_logged_in() ) : ?> |
|
122 |
|
123 |
|
124 |
|
125 <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 »</a></p> |
|
126 |
|
127 |
|
128 |
|
129 <?php else : ?> |
|
130 |
|
131 |
|
132 |
|
133 <p><label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label><br/><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /></p> |
|
134 |
|
135 |
|
136 |
|
137 <p><label for="email">Mail (will not be published) <?php if ($req) echo "(required)"; ?></label><br/><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /></p> |
|
138 |
|
139 |
|
140 |
|
141 <p><label for="url">Website</label><br/><input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="22" tabindex="3" /></p> |
|
142 |
|
143 |
|
144 |
|
145 <?php endif; ?> |
|
146 |
|
147 |
|
148 |
|
149 <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>--> |
|
150 |
|
151 |
|
152 |
|
153 <p><label for="comment">Your Message</label><br /><textarea name="comment" id="comment" rows="10" cols="20" tabindex="4"></textarea></p> |
|
154 |
|
155 |
|
156 |
|
157 <p class="no-border"><input class="button" name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /> |
|
158 |
|
159 <?php comment_id_fields(); ?> |
|
160 |
|
161 </p> |
|
162 |
|
163 <?php do_action('comment_form', $post->ID); ?> |
|
164 |
|
165 |
|
166 |
|
167 </form> |
|
168 |
|
169 |
|
170 |
|
171 <?php endif; // If registration required and not logged in ?> |
|
172 |
|
173 </div> |
|
174 |
|
175 |
|
176 |
|
177 <?php endif; // if you delete this the sky will fall on your head ?> |