|
1 <?php thematic_abovecomments() ?> |
|
2 <div id="comments"> |
|
3 <?php |
|
4 $req = get_option('require_name_email'); // Checks if fields are required. |
|
5 if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) ) |
|
6 die ( 'Please do not load this page directly. Thanks!' ); |
|
7 if ( ! empty($post->post_password) ) : |
|
8 if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) : |
|
9 ?> |
|
10 <div class="nopassword"><?php _e('This post is password protected. Enter the password to view any comments.', 'thematic') ?></div> |
|
11 </div><!-- .comments --> |
|
12 <?php |
|
13 return; |
|
14 endif; |
|
15 endif; |
|
16 ?> |
|
17 |
|
18 <?php if ( have_comments() ) : ?> |
|
19 |
|
20 <?php /* numbers of pings and comments */ |
|
21 $ping_count = $comment_count = 0; |
|
22 foreach ( $comments as $comment ) |
|
23 get_comment_type() == "comment" ? ++$comment_count : ++$ping_count; |
|
24 ?> |
|
25 |
|
26 <?php if ( ! empty($comments_by_type['comment']) ) : ?> |
|
27 |
|
28 <?php thematic_abovecommentslist() ?> |
|
29 |
|
30 <div id="comments-list" class="comments"> |
|
31 <h3><?php printf($comment_count > 1 ? __(thematic_multiplecomments_text(), 'thematic') : __(thematic_singlecomment_text(), 'thematic'), $comment_count) ?></h3> |
|
32 |
|
33 <ol> |
|
34 <?php wp_list_comments(list_comments_arg()); ?> |
|
35 </ol> |
|
36 |
|
37 <div id="comments-nav-below" class="comment-navigation"> |
|
38 <div class="paginated-comments-links"><?php paginate_comments_links(); ?></div> |
|
39 </div> |
|
40 |
|
41 </div><!-- #comments-list .comments --> |
|
42 |
|
43 <?php thematic_belowcommentslist() ?> |
|
44 |
|
45 <?php endif; /* if ( $comment_count ) */ ?> |
|
46 |
|
47 <?php if ( ! empty($comments_by_type['pings']) ) : ?> |
|
48 |
|
49 <?php thematic_abovetrackbackslist() ?> |
|
50 |
|
51 <div id="trackbacks-list" class="comments"> |
|
52 <h3><?php printf($ping_count > 1 ? __('<span>%d</span> Trackbacks', 'thematic') : __('<span>One</span> Trackback', 'thematic'), $ping_count) ?></h3> |
|
53 |
|
54 <ol> |
|
55 <?php wp_list_comments('type=pings&callback=thematic_pings'); ?> |
|
56 </ol> |
|
57 |
|
58 </div><!-- #trackbacks-list .comments --> |
|
59 |
|
60 <?php thematic_belowtrackbackslist() ?> |
|
61 |
|
62 <?php endif /* if ( $ping_count ) */ ?> |
|
63 <?php endif /* if ( $comments ) */ ?> |
|
64 |
|
65 <?php if ( 'open' == $post->comment_status ) : ?> |
|
66 <div id="respond"> |
|
67 <h3><?php comment_form_title( __(thematic_postcomment_text(), 'thematic'), __(thematic_postreply_text(), 'thematic') ); ?></h3> |
|
68 |
|
69 <div id="cancel-comment-reply"><?php cancel_comment_reply_link() ?></div> |
|
70 |
|
71 <?php if ( get_option('comment_registration') && !$user_ID ) : ?> |
|
72 <p id="login-req"><?php printf(__('You must be <a href="%s" title="Log in">logged in</a> to post a comment.', 'thematic'), |
|
73 get_option('siteurl') . '/wp-login.php?redirect_to=' . get_permalink() ) ?></p> |
|
74 |
|
75 <?php else : ?> |
|
76 <div class="formcontainer"> |
|
77 |
|
78 <?php thematic_abovecommentsform() ?> |
|
79 |
|
80 <form id="commentform" action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post"> |
|
81 |
|
82 <?php if ( $user_ID ) : ?> |
|
83 <p id="login"><?php printf(__('<span class="loggedin">Logged in as <a href="%1$s" title="Logged in as %2$s">%2$s</a>.</span> <span class="logout"><a href="%3$s" title="Log out of this account">Log out?</a></span>', 'thematic'), |
|
84 get_option('siteurl') . '/wp-admin/profile.php', |
|
85 wp_specialchars($user_identity, true), |
|
86 wp_logout_url(get_permalink()) ) ?></p> |
|
87 |
|
88 <?php else : ?> |
|
89 |
|
90 <p id="comment-notes"><?php _e('Your email is <em>never</em> published nor shared.', 'thematic') ?> <?php if ($req) _e('Required fields are marked <span class="required">*</span>', 'thematic') ?></p> |
|
91 |
|
92 <div id="form-section-author" class="form-section"> |
|
93 <div class="form-label"><label for="author"><?php _e('Name', 'thematic') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'thematic') ?></div> |
|
94 <div class="form-input"><input id="author" name="author" type="text" value="<?php echo $comment_author ?>" size="30" maxlength="20" tabindex="3" /></div> |
|
95 </div><!-- #form-section-author .form-section --> |
|
96 |
|
97 <div id="form-section-email" class="form-section"> |
|
98 <div class="form-label"><label for="email"><?php _e('Email', 'thematic') ?></label> <?php if ($req) _e('<span class="required">*</span>', 'thematic') ?></div> |
|
99 <div class="form-input"><input id="email" name="email" type="text" value="<?php echo $comment_author_email ?>" size="30" maxlength="50" tabindex="4" /></div> |
|
100 </div><!-- #form-section-email .form-section --> |
|
101 |
|
102 <div id="form-section-url" class="form-section"> |
|
103 <div class="form-label"><label for="url"><?php _e('Website', 'thematic') ?></label></div> |
|
104 <div class="form-input"><input id="url" name="url" type="text" value="<?php echo $comment_author_url ?>" size="30" maxlength="50" tabindex="5" /></div> |
|
105 </div><!-- #form-section-url .form-section --> |
|
106 |
|
107 <?php endif /* if ( $user_ID ) */ ?> |
|
108 |
|
109 <div id="form-section-comment" class="form-section"> |
|
110 <div class="form-label"><label for="comment"><?php _e(thematic_commentbox_text(), 'thematic') ?></label></div> |
|
111 <div class="form-textarea"><textarea id="comment" name="comment" cols="45" rows="8" tabindex="6"></textarea></div> |
|
112 </div><!-- #form-section-comment .form-section --> |
|
113 |
|
114 <div id="form-allowed-tags" class="form-section"> |
|
115 <p><span><?php _e('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:', 'thematic') ?></span> <code><?php echo allowed_tags(); ?></code></p> |
|
116 </div> |
|
117 |
|
118 <?php do_action('comment_form', $post->ID); ?> |
|
119 |
|
120 <div class="form-submit"><input id="submit" name="submit" type="submit" value="<?php _e(thematic_commentbutton_text(), 'thematic') ?>" tabindex="7" /><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></div> |
|
121 |
|
122 <?php comment_id_fields(); ?> |
|
123 |
|
124 </form><!-- #commentform --> |
|
125 |
|
126 <?php thematic_belowcommentsform() ?> |
|
127 |
|
128 </div><!-- .formcontainer --> |
|
129 <?php endif /* if ( get_option('comment_registration') && !$user_ID ) */ ?> |
|
130 |
|
131 </div><!-- #respond --> |
|
132 <?php endif /* if ( 'open' == $post->comment_status ) */ ?> |
|
133 |
|
134 </div><!-- #comments --> |
|
135 <?php thematic_belowcomments() ?> |