|
1 <?php |
|
2 |
|
3 // Do not delete these lines |
|
4 |
|
5 if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) |
|
6 |
|
7 die (esc_attr_e('Please do not load this page directly. Thanks!','Tharsis')); |
|
8 |
|
9 |
|
10 |
|
11 if ( post_password_required() ) { ?> |
|
12 |
|
13 |
|
14 |
|
15 <p class="nocomments"><?php esc_attr_e('This post is password protected. Enter the password to view comments.','Tharsis') ?></p> |
|
16 |
|
17 <?php |
|
18 |
|
19 return; |
|
20 |
|
21 } |
|
22 |
|
23 ?> |
|
24 |
|
25 <!-- You can start editing here. --> |
|
26 |
|
27 |
|
28 |
|
29 <div id="comment-wrap"> |
|
30 |
|
31 |
|
32 |
|
33 <?php if ( have_comments() ) : ?> |
|
34 |
|
35 |
|
36 |
|
37 <h3 id="comments"><?php comments_number(esc_attr__('No comments','Tharsis'), esc_attr__('One comment','Tharsis'), '% '.esc_attr__('comments','Tharsis') );?></h3> |
|
38 |
|
39 |
|
40 |
|
41 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> |
|
42 |
|
43 <div class="comment_navigation_top clearfix"> |
|
44 |
|
45 <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'Tharsis' ) ); ?></div> |
|
46 |
|
47 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'Tharsis' ) ); ?></div> |
|
48 |
|
49 </div> <!-- .navigation --> |
|
50 |
|
51 <?php endif; // check for comment navigation ?> |
|
52 |
|
53 <?php if ( ! empty($comments_by_type['comment']) ) : ?> |
|
54 |
|
55 <ol class="commentlist clearfix"> |
|
56 |
|
57 <?php wp_list_comments( array('type'=>'comment','callback'=>'vp_comment') ); ?> |
|
58 |
|
59 </ol> |
|
60 |
|
61 <?php endif; ?> |
|
62 |
|
63 |
|
64 |
|
65 <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> |
|
66 |
|
67 <div class="comment_navigation_bottom clearfix"> |
|
68 |
|
69 <div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'Tharsis' ) ); ?></div> |
|
70 |
|
71 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'Tharsis' ) ); ?></div> |
|
72 |
|
73 </div> <!-- .navigation --> |
|
74 |
|
75 <?php endif; // check for comment navigation ?> |
|
76 |
|
77 |
|
78 |
|
79 <?php if ( ! empty($comments_by_type['pings']) ) : ?> |
|
80 |
|
81 <div id="trackbacks"> |
|
82 |
|
83 <h3 id="trackbacks-title"><?php esc_html_e('Trackbacks/Pingbacks','Tharsis') ?></h3> |
|
84 |
|
85 <ol class="pinglist"> |
|
86 |
|
87 <?php //wp_list_comments('type=pings&callback=vp_pings'); ?> |
|
88 |
|
89 </ol> |
|
90 |
|
91 </div> |
|
92 |
|
93 <?php endif; ?> |
|
94 |
|
95 <?php else : // this is displayed if there are no comments so far ?> |
|
96 |
|
97 <div id="comment-section" class="nocomments"> |
|
98 |
|
99 <?php if ('open' == $post->comment_status) : ?> |
|
100 |
|
101 <!-- If comments are open, but there are no comments. --> |
|
102 |
|
103 |
|
104 |
|
105 <?php else : // comments are closed ?> |
|
106 |
|
107 <!-- If comments are closed. --> |
|
108 |
|
109 <div id="respond"> |
|
110 |
|
111 |
|
112 |
|
113 </div> <!-- end respond div --> |
|
114 |
|
115 <?php endif; ?> |
|
116 |
|
117 </div> |
|
118 |
|
119 <?php endif; ?> |
|
120 |
|
121 <?php if ('open' == $post->comment_status) : ?> |
|
122 |
|
123 <?php |
|
124 |
|
125 $commenter = wp_get_current_commenter(); |
|
126 |
|
127 $req = get_option( 'require_name_email' ); |
|
128 |
|
129 $aria_req = ( $req ? " aria-required='true'" : '' ); |
|
130 |
|
131 if($commenter['comment_author'] != '') |
|
132 |
|
133 $name = esc_attr($commenter['comment_author']); |
|
134 |
|
135 else |
|
136 |
|
137 $name = ''; |
|
138 |
|
139 if($commenter['comment_author_email'] != '') |
|
140 |
|
141 $email = esc_attr($commenter['comment_author_email']); |
|
142 |
|
143 else |
|
144 |
|
145 $email = ''; |
|
146 |
|
147 if($commenter['comment_author_url'] != '') |
|
148 |
|
149 $url = esc_attr($commenter['comment_author_url']); |
|
150 |
|
151 else |
|
152 |
|
153 $url = ''; |
|
154 |
|
155 $fields = array( |
|
156 |
|
157 'author' => '<input id="author" placeholder="Name *" name="author" type="text" value="' . $name . '" size="30"' . $aria_req . ' />', |
|
158 |
|
159 'email' => '<input id="email" placeholder="E-mail *" name="email" type="text" value="' . $email . '" size="30"' . $aria_req . ' />', |
|
160 |
|
161 'url' => '<input id="url" placeholder="Website" name="url" type="text" value="' . $url . '" size="30" /> <div class="clear"></div>' |
|
162 |
|
163 ); |
|
164 |
|
165 $comment_textarea = '<textarea placeholder="Message..." cols="40" rows="3" id="comment" name="comment" aria-required="true"></textarea> <div class="clear"></div>'; |
|
166 |
|
167 comment_form( array( 'fields' => $fields, 'comment_field' => $comment_textarea, 'label_submit' => esc_attr__( 'Submit Comment', 'Tharsis' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a Reply', 'Tharsis' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Tharsis' )) ); ?> |
|
168 |
|
169 <div class="clear"></div> |
|
170 |
|
171 <?php else: ?> |
|
172 |
|
173 |
|
174 |
|
175 <?php endif; // if you delete this the sky will fall on your head ?> |
|
176 |
|
177 </div> |