|
1 <?php // Do not delete these lines |
|
2 |
|
3 if (!empty($_SERVER['SCRIPT_FILENAME']) AND 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) |
|
4 die (__('Please do not load this page directly. Thanks!','atahualpa')); |
|
5 |
|
6 if ( post_password_required() ) { |
|
7 _e('This post is password protected. Enter the password to view comments.','atahualpa'); |
|
8 return; |
|
9 } |
|
10 |
|
11 global $bfa_ata; |
|
12 // You can start editing below: |
|
13 ?> |
|
14 |
|
15 <?php // If there are any comments |
|
16 $bfa_page_comment_open = 0; |
|
17 if ( is_page() and ('open' == $post->comment_status)) { |
|
18 $bfa_page_comment_open = 1; } |
|
19 else { |
|
20 $bfa_page_comment_open = 0;} |
|
21 |
|
22 if ( have_comments() ) : ?> |
|
23 |
|
24 <a name="comments"></a><!-- named anchor for skip links --> |
|
25 <h3 id="comments"><?php // Comment Area Title |
|
26 comments_number(__('No comments yet to ', 'atahualpa'), |
|
27 __('1 comment to ', 'atahualpa'), __('% comments to ', 'atahualpa')); |
|
28 echo get_the_title(); ?></h3> |
|
29 |
|
30 <?php bfa_next_previous_comments_links('Above'); ?> |
|
31 |
|
32 <!-- Comment List --> |
|
33 <ul class="commentlist"> |
|
34 |
|
35 <?php // Do this for every comment |
|
36 if ($bfa_ata['separate_trackbacks'] == "Yes") { |
|
37 |
|
38 wp_list_comments(array( |
|
39 'avatar_size'=>$bfa_ata['avatar_size'], |
|
40 'reply_text'=>__(' · Reply','atahualpa'), |
|
41 'login_text'=>__('Log in to Reply','atahualpa'), |
|
42 'callback' => 'bfa_comments', |
|
43 'type' => 'comment' |
|
44 )); |
|
45 |
|
46 wp_list_comments(array( |
|
47 'avatar_size'=>$bfa_ata['avatar_size'], |
|
48 'reply_text'=>__(' · Reply','atahualpa'), |
|
49 'login_text'=>__('Log in to Reply','atahualpa'), |
|
50 'callback' => 'bfa_comments', |
|
51 'type' => 'pings' |
|
52 )); |
|
53 |
|
54 } else { |
|
55 |
|
56 wp_list_comments(array( |
|
57 'avatar_size'=>$bfa_ata['avatar_size'], |
|
58 'reply_text'=>__(' · Reply','atahualpa'), |
|
59 'login_text'=>__('Log in to Reply','atahualpa'), |
|
60 'callback' => 'bfa_comments', |
|
61 'type' => 'all' |
|
62 )); |
|
63 |
|
64 } ?> |
|
65 |
|
66 </ul> |
|
67 <!-- / Comment List --> |
|
68 |
|
69 <?php bfa_next_previous_comments_links('Below'); ?> |
|
70 |
|
71 <?php else : // If there are NO comments ?> |
|
72 |
|
73 <?php // If comments are open, but there are no comments: |
|
74 if ( ('open' == $post->comment_status) ) : ?> |
|
75 <!-- .... --> |
|
76 |
|
77 <?php else : // If comments are closed: ?> |
|
78 |
|
79 <?php echo $bfa_ata['comments_are_closed_text'] ; ?> |
|
80 |
|
81 <?php endif; ?> |
|
82 |
|
83 <?php endif; // END of "If there are NO comments" ?> |
|
84 |
|
85 <?php |
|
86 // Since 3.6.1: Configuring the new comment_form() function, |
|
87 // instead of using it with the default settings. See also http://codex.wordpress.org/Function_Reference/comment_form |
|
88 ?> |
|
89 |
|
90 <?php |
|
91 // These values aren't available else: |
|
92 global $aria_req, $post_id, $required_text; |
|
93 // author, email and url fields are set in a separate variable first: |
|
94 $fields = array( |
|
95 'author' => '<p><input class="text author" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' tabindex="1" />' . |
|
96 ' <label for="author"><strong>' . __( 'Name ' ,'atahualpa') . '</strong> ' . ( $req ? __('(required)','atahualpa') : '' ) . '</label></p>', |
|
97 'email' => '<p><input class="text email" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' tabindex="2" />' . |
|
98 ' <label for="email"><strong>' . __( 'Email' ,'atahualpa') . '</strong> ' . ( $req ? __('(will not be published) (required)','atahualpa') : '' ) . '</label></p>', |
|
99 'url' => '<p><input class="text url" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" />' . |
|
100 ' <label for="url">' . __( 'Website','atahualpa' ) . '</label></p>' |
|
101 ); |
|
102 |
|
103 if ($bfa_ata['show_xhtml_tags'] == "Yes") { |
|
104 $comment_notes_after = ' |
|
105 <p class="thesetags clearfix">' . |
|
106 sprintf(__('You can use %1$sthese HTML tags</a>','atahualpa'), |
|
107 '<a class="xhtmltags" href="#" onclick="return false;">') . '</p> |
|
108 <div class="xhtml-tags"><p><code>' . allowed_tags() . ' |
|
109 </code></p></div>'; |
|
110 } else { |
|
111 $comment_notes_after = ''; |
|
112 } |
|
113 |
|
114 // The rest is set here: |
|
115 $comment_form_settings = array( |
|
116 'fields' => apply_filters( 'comment_form_default_fields', $fields ), |
|
117 'comment_field' => '<p><textarea name="comment" id="comment" rows="10" cols="10" tabindex="4"></textarea></p>', |
|
118 'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'atahualpa' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', |
|
119 'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>', 'atahualpa' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>', |
|
120 'comment_notes_before' => '', |
|
121 'comment_notes_after' => $comment_notes_after, |
|
122 'id_form' => 'commentform', |
|
123 'id_submit' => 'submit', |
|
124 'title_reply' => __( 'Leave a Reply','atahualpa' ), |
|
125 'title_reply_to' => __( 'Leave a Reply to %s','atahualpa' ), |
|
126 'cancel_reply_link' => __( 'Cancel reply','atahualpa' ), |
|
127 'label_submit' => __( 'Post Comment' ,'atahualpa') |
|
128 ); |
|
129 ?> |
|
130 |
|
131 <?php // Using the new function comment_form() with the custom settings $comment_form_settings |
|
132 comment_form($comment_form_settings); |
|
133 ?> |