1
|
1 |
<div id="comments"><h3><?php comments_number('No Comments Yet - be the First!', 'One Comment So Far...', '% Comments Already!' );?></h3></div> |
|
2 |
|
|
3 |
<?php // Do not delete these lines |
|
4 |
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) |
|
5 |
die ('Please do not load this page directly. Thanks!'); |
|
6 |
if ( post_password_required() ) { ?> |
|
7 |
<p class="nocomments">This post is password protected. Enter the password to view comments.</p> |
|
8 |
<?php |
|
9 |
return; |
|
10 |
} |
|
11 |
|
|
12 |
// add a microid to all the comments |
|
13 |
function comment_add_microid($classes) { |
|
14 |
$c_email=get_comment_author_email(); |
|
15 |
$c_url=get_comment_author_url(); |
|
16 |
if (!empty($c_email) && !empty($c_url)) { |
|
17 |
$microid = 'microid-mailto+http:sha1:' . sha1(sha1('mailto:'.$c_email).sha1($c_url)); |
|
18 |
$classes[] = $microid; |
|
19 |
} |
|
20 |
return $classes; |
|
21 |
} |
|
22 |
add_filter('comment_class','comment_add_microid'); |
|
23 |
|
|
24 |
|
|
25 |
// show the comments |
|
26 |
if ( have_comments() ) : ?> |
|
27 |
<?php if ( ! empty($comments_by_type['comment']) ) : ?> |
|
28 |
|
|
29 |
<ul class="commentlist" id="singlecomments"> |
|
30 |
<?php wp_list_comments(array('avatar_size'=>40, 'reply_text'=>'Reply', 'type'=>'comment')); ?> |
|
31 |
</ul> |
|
32 |
<?php endif; ?> |
|
33 |
|
|
34 |
<!--display the pings--> |
|
35 |
<?php if ( ! empty($comments_by_type['pings']) ) : ?> |
|
36 |
<h3 id="pings">Trackbacks/Pingbacks</h3> |
|
37 |
<ul class="commentlist"> |
|
38 |
<?php wp_list_comments('type=pings'); ?> |
|
39 |
</ul> |
|
40 |
<?php endif; ?> |
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
<div class="navigation"> |
|
45 |
<div class="alignleft old"><?php previous_comments_link('older comments') ?></div> |
|
46 |
<div class="alignright new"><?php next_comments_link('newer comments') ?></div> |
|
47 |
</div> |
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
<?php else : // this is displayed if there are no comments so far ?> |
|
53 |
|
|
54 |
<?php if ('open' == $post->comment_status) : |
|
55 |
// If comments are open, but there are no comments. |
|
56 |
else : |
|
57 |
// comments are closed |
|
58 |
endif; |
|
59 |
endif; |
|
60 |
|
|
61 |
if ('open' == $post-> comment_status) : |
|
62 |
|
|
63 |
// show the form |
|
64 |
?> |
|
65 |
<div id="respond"><h3 id="response-title"><?php comment_form_title(); ?></h3> |
|
66 |
<div id="cancel-comment-reply"> |
|
67 |
<small><?php cancel_comment_reply_link(); ?></small> |
|
68 |
</div> |
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
<?php if ( get_option('comment_registration') && !$user_ID ) : ?> |
|
73 |
|
|
74 |
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p> |
|
75 |
|
|
76 |
<?php else : ?> |
|
77 |
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> |
|
78 |
|
|
79 |
<?php if ( $user_ID ) : ?> |
|
80 |
|
|
81 |
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. |
|
82 |
<a href="<?php echo wp_logout_url(urlencode($_SERVER['REQUEST_URI'])); ?>" title="Log out of this account">Logout »</a></p> |
|
83 |
|
|
84 |
<?php else : ?> |
|
85 |
<div class="comment-form-labels">Name <small><?php if ($req) echo "Required:"; ?></small></div> |
|
86 |
<p><input type="text" name="author" id="author" size="50" value="<?php echo $comment_author; ?>" class="comment-form-input-fields" tabindex="1" /></p> |
|
87 |
|
|
88 |
<div class="comment-form-labels">Email <small> <?php if ($req) echo "Required:"; ?></small></div> |
|
89 |
<p><input type="text" name="email" id="email" size="50" value="<?php echo $comment_author_email; ?>" class="comment-form-input-fields" tabindex="2" /> </p> |
|
90 |
|
|
91 |
<div class="comment-form-labels">Website <small>Optional</small></div> |
|
92 |
<p><input type="text" name="url" id="url" size="50" value="<?php echo $comment_author_url; ?>" class="comment-form-input-fields" tabindex="3" /></p> |
|
93 |
|
|
94 |
<?php endif; ?> |
|
95 |
|
|
96 |
<div> |
|
97 |
<?php comment_id_fields(); ?> |
|
98 |
<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" /></div> |
|
99 |
|
|
100 |
<div class="comment-form-labels">Comment <small>Required:</small></div> |
|
101 |
<p><textarea name="comment" id="comment" class="comment-form-input-fields" cols="55" rows="15" tabindex="4"></textarea></p> |
|
102 |
|
|
103 |
<?php if (get_option("comment_moderation") == "1") { ?> |
|
104 |
<p><small><strong>Please note:</strong> Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.</small></p> |
|
105 |
<?php } ?> |
|
106 |
|
|
107 |
<p><input name="submit" type="submit" id="submit" class="send-comment" tabindex="5" value="Send Comment" /></p> |
|
108 |
<?php do_action('comment_form', $post->ID); ?> |
|
109 |
|
|
110 |
</form> |
|
111 |
<?php endif; ?> |
|
112 |
</div> |
|
113 |
<?php endif; ?> |