1 | <?php // Do not delete these lines
|
---|
2 | if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments-paged.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
---|
3 | die (__('Please do not load this page directly. Thanks!','atahualpa'));
|
---|
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"><?php _e('This post is password protected. Enter the password to view comments.','atahualpa'); ?></p>
|
---|
10 |
|
---|
11 | <?php
|
---|
12 | return;
|
---|
13 | }
|
---|
14 | }
|
---|
15 |
|
---|
16 | /* This variable is for alternating comment background */
|
---|
17 | $oddcomment = 'class="alt clearfix" ';
|
---|
18 |
|
---|
19 | global $options;
|
---|
20 | foreach ($options as $value) {
|
---|
21 | if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } }
|
---|
22 | ?>
|
---|
23 | <!-- You can start editing below: -->
|
---|
24 |
|
---|
25 | <?php // If there are any comments
|
---|
26 | if ($comments) : ?>
|
---|
27 |
|
---|
28 | <h3 id="comments"><?php // Comment Area Title
|
---|
29 | comments_number(__('No comments yet to ', 'atahualpa'), __('1 comment to ', 'atahualpa'), __('% comments to ', 'atahualpa')); echo get_the_title();
|
---|
30 | ?>
|
---|
31 | </h3>
|
---|
32 |
|
---|
33 | <!-- Comment page numbers -->
|
---|
34 | <?php if ($paged_comments->pager->num_pages() > 1): ?>
|
---|
35 | <p class="comment-page-numbers"><?php _e('Pages:','atahualpa'); ?> <?php paged_comments_print_pages(); ?></p>
|
---|
36 | <?php endif; ?>
|
---|
37 | <!-- End comment page numbers -->
|
---|
38 |
|
---|
39 | <!-- Comment List -->
|
---|
40 | <ol class="commentlist">
|
---|
41 |
|
---|
42 |
|
---|
43 | <?php
|
---|
44 | // Do this for every comment -->
|
---|
45 | foreach ($comments as $comment) :
|
---|
46 | if ( ($bfa_ata_separate_trackbacks == "Yes" AND get_comment_type() == 'comment') OR $bfa_ata_separate_trackbacks == "No" ) {
|
---|
47 | ?>
|
---|
48 |
|
---|
49 | <li <?php if ( $bfa_ata_author_highlight == "Yes" AND $comment->comment_author_email == get_the_author_email() ) { echo 'class="authorcomment clearfix" '; } else { echo $oddcomment; } ?>id="comment-<?php comment_ID() ?>">
|
---|
50 |
|
---|
51 | <?php // GRAVATAR
|
---|
52 | if (get_comment_type() == 'comment') {
|
---|
53 | if ($bfa_ata_avatar_size != 0 AND $bfa_ata_avatar_size != "") {
|
---|
54 | if (function_exists('get_avatar')) {
|
---|
55 | echo get_avatar($comment -> comment_author_email, $size=$bfa_ata_avatar_size);}
|
---|
56 | # if this WP version has no gravatars, use the theme's custom gravatar function:
|
---|
57 | else { if(!empty($comment -> comment_author_email)) {
|
---|
58 | $md5 = md5($comment -> comment_author_email);
|
---|
59 | $default = urlencode(get_bloginfo('template_directory') . '/images/no-gravatar.gif');
|
---|
60 | #echo "<img class=\"avatar\" src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=" . $bfa_ata_avatar_size . "&default=$default' alt='" . __('Gravatar','atahualpa') . "' />";
|
---|
61 | echo '<img class="avatar" src="http://www.gravatar.com/avatar.php?gravatar_id='.$md5.'&size='.$bfa_ata_avatar_size.'&default='.$default.' alt="'. __('Gravatar','atahualpa') .'" />';
|
---|
62 | }
|
---|
63 | }
|
---|
64 | }
|
---|
65 | }
|
---|
66 | ?>
|
---|
67 |
|
---|
68 | <div class="comment-number"><a href="<?php echo paged_comments_url('comment-'.get_comment_ID()); ?>" title=""><?php echo $comment_number; $comment_number += $comment_delta; ?></a></div>
|
---|
69 |
|
---|
70 | <span class="authorname"><?php // Comment Author
|
---|
71 | comment_author_link() ?></span>
|
---|
72 |
|
---|
73 | <?php // Awaiting Moderation Text
|
---|
74 | if ($comment->comment_approved == '0') :
|
---|
75 | _e('Your comment is awaiting moderation.','atahualpa');
|
---|
76 | endif; ?>
|
---|
77 |
|
---|
78 | <br />
|
---|
79 |
|
---|
80 | <span class="commentdate">
|
---|
81 | <?php // Comment Date and Time
|
---|
82 | printf(__('%1$s at %2$s'), get_comment_date(__('F jS, Y','atahualpa')), get_comment_time()) ?>
|
---|
83 | </span>
|
---|
84 |
|
---|
85 | <?php // Comment Text
|
---|
86 | comment_text() ?>
|
---|
87 |
|
---|
88 | <?php // Edit Comment Link
|
---|
89 | edit_comment_link(__('Edit','atahualpa'),'<span class="editcomment">','</span>'); ?>
|
---|
90 |
|
---|
91 |
|
---|
92 | </li>
|
---|
93 |
|
---|
94 | <?php $oddcomment = ( $oddcomment == 'class="clearfix" ' ) ? 'class="alt clearfix" ' : 'class="clearfix" ';
|
---|
95 |
|
---|
96 | }
|
---|
97 | endforeach;
|
---|
98 | // END of "Do this for every comment "
|
---|
99 | ?>
|
---|
100 |
|
---|
101 | <!-- Do this for every trackback / pingpack -->
|
---|
102 | <?php
|
---|
103 | if ($bfa_ata_separate_trackbacks == "Yes") {
|
---|
104 | foreach ($comments as $comment) :
|
---|
105 | if ( get_comment_type() != 'comment') {
|
---|
106 | ?>
|
---|
107 |
|
---|
108 | <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
|
---|
109 |
|
---|
110 | <div class="comment-number"><a href="<?php echo paged_comments_url('comment-'.get_comment_ID()); ?>" title=""><?php echo $comment_number; $comment_number += $comment_delta; ?></a></div>
|
---|
111 |
|
---|
112 | <?php // Comment Author
|
---|
113 | comment_author_link() ?>:
|
---|
114 |
|
---|
115 | <br />
|
---|
116 |
|
---|
117 | <?php // Comment Date and Time
|
---|
118 | printf(__('%1$s at %2$s'), get_comment_date(__('F jS, Y','atahualpa')), get_comment_time()) ?>
|
---|
119 |
|
---|
120 | <?php // Edit Comment Link
|
---|
121 | edit_comment_link(__('Edit','atahualpa'),' ',''); ?>
|
---|
122 |
|
---|
123 | <?php // Comment Text
|
---|
124 | comment_text() ?>
|
---|
125 |
|
---|
126 | </li>
|
---|
127 |
|
---|
128 | <?php $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
|
---|
129 |
|
---|
130 | }
|
---|
131 | endforeach;
|
---|
132 | }
|
---|
133 | // END of "Do this for every trackback / pingback "
|
---|
134 | ?>
|
---|
135 |
|
---|
136 | </ol>
|
---|
137 | <!-- / Comment List -->
|
---|
138 |
|
---|
139 | <!-- Comment page numbers -->
|
---|
140 | <?php if ($paged_comments->pager->num_pages() > 1): ?>
|
---|
141 | <p class="comment-page-numbers"><?php _e('Pages:','atahualpa'); ?> <?php paged_comments_print_pages(); ?></p>
|
---|
142 | <?php endif; ?>
|
---|
143 | <!-- End comment page numbers -->
|
---|
144 |
|
---|
145 | <?php
|
---|
146 | // END of "If there ARE any comments"
|
---|
147 | else :
|
---|
148 | // START of "If there are NO comments"
|
---|
149 | ?>
|
---|
150 |
|
---|
151 | <?php
|
---|
152 | // If comments are open, but there are no comments:
|
---|
153 | if ('open' == $post->comment_status) :
|
---|
154 | ?>
|
---|
155 | <!-- .... -->
|
---|
156 |
|
---|
157 | <?php
|
---|
158 | // END of "If comments are open, but there are no comments"
|
---|
159 | else :
|
---|
160 | // If comments are closed:
|
---|
161 | ?>
|
---|
162 | <p><?php _e('Comments are closed.','atahualpa'); ?></p>
|
---|
163 | <?php endif; ?>
|
---|
164 |
|
---|
165 | <?php
|
---|
166 | // END of "If there are NO comments"
|
---|
167 | endif; ?>
|
---|
168 |
|
---|
169 | <?php // If comments are open
|
---|
170 | if ('open' == $post->comment_status) : ?>
|
---|
171 |
|
---|
172 | <div id="respond">
|
---|
173 | <h3 class="reply"><?php _e('Leave a Reply','atahualpa'); ?></h3>
|
---|
174 |
|
---|
175 | <?php // If Login is required and User is not logged in
|
---|
176 | if ( get_option('comment_registration') && !$user_ID ) : ?>
|
---|
177 | <p><?php printf(__('You must be %slogged in</a> to post a comment.', 'atahualpa'), '<a href="' . get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink()) . '">')?></p>
|
---|
178 |
|
---|
179 | <?php // If Login is not required, or User is logged in
|
---|
180 | else : ?>
|
---|
181 |
|
---|
182 | <!-- Comment Form -->
|
---|
183 | <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
---|
184 |
|
---|
185 | <?php // If User is logged in
|
---|
186 | if ( $user_ID ) : ?>
|
---|
187 | <p>
|
---|
188 | <?php printf(__('Logged in as %s.', 'atahualpa'), '<a href="' . get_option('siteurl') . '/wp-admin/profile.php">' . $user_identity . '</a>')?>
|
---|
189 | <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account','atahualpa'); ?>"><?php _e('Logout »','atahualpa'); ?></a>
|
---|
190 | </p>
|
---|
191 |
|
---|
192 | <?php // If User is not logged in: Display the form fields "Name", "Email", "URL"
|
---|
193 | else : ?>
|
---|
194 | <p>
|
---|
195 | <input class="text author" type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="30" tabindex="1" />
|
---|
196 | <label for="<?php _e('author','atahualpa'); ?>"><?php _e('Name ','atahualpa'); if ($req) _e('(required)','atahualpa'); ?></label>
|
---|
197 | </p>
|
---|
198 | <p>
|
---|
199 | <input class="text email" type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2" />
|
---|
200 | <label for="<?php _e('email','atahualpa'); ?>"><?php _e('Mail (will not be published) ','atahualpa'); if ($req) _e('(required)','atahualpa'); ?></label>
|
---|
201 | </p>
|
---|
202 | <p>
|
---|
203 | <input class="text url" type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3" />
|
---|
204 | <label for="<?php _e('url','atahualpa'); ?>"><?php _e('Website','atahualpa'); ?></label>
|
---|
205 | </p>
|
---|
206 | <?php endif; ?>
|
---|
207 |
|
---|
208 | <!-- Display Quicktags or allowed XHTML Tags -->
|
---|
209 | <?php if (function_exists('lmbbox_comment_quicktags_display')) { echo "<p>"; lmbbox_comment_quicktags_display(); echo "</p>"; }
|
---|
210 | else { if ($bfa_ata_show_xhtml_tags == "Yes") { ?>
|
---|
211 | <p class="thesetags clearfix"><?php printf(__('You can use %1$sthese HTML tags</a>','atahualpa'), '<a class="xhtmltags" href="#" onclick="return false;">'); ?></p>
|
---|
212 | <div class="xhtml-tags"><p><code><?php echo allowed_tags(); ?></code></p></div>
|
---|
213 | <?php } } ?>
|
---|
214 |
|
---|
215 | <!-- Comment Textarea -->
|
---|
216 | <p><textarea name="comment" id="comment" rows="10" cols="10" tabindex="4"></textarea></p>
|
---|
217 | <?php do_action('comment_form', $post->ID); ?>
|
---|
218 |
|
---|
219 | <!-- Submit -->
|
---|
220 | <p><input name="submit" type="submit" class="button" id="submit" tabindex="5" value="<?php _e('Submit Comment','atahualpa'); ?>" />
|
---|
221 | <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
|
---|
222 | </p>
|
---|
223 |
|
---|
224 | </form>
|
---|
225 | </div><!-- / respond -->
|
---|
226 | <!-- / Comment Form -->
|
---|
227 |
|
---|
228 | <?php endif; ?>
|
---|
229 | <!-- / If Login is not required, or User is logged in -->
|
---|
230 |
|
---|
231 | <?php endif; ?>
|
---|
232 | <!-- If comments are open -->
|
---|