1 | <?php if (function_exists('wp_list_comments')) : ?>
|
---|
2 |
|
---|
3 | <?php
|
---|
4 | /**
|
---|
5 | * @package WordPress
|
---|
6 | * @subpackage Default_Theme
|
---|
7 | */
|
---|
8 |
|
---|
9 | // Do not delete these lines
|
---|
10 | if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
---|
11 | die ('Please do not load this page directly. Thanks!');
|
---|
12 |
|
---|
13 | if ( post_password_required() ) { ?>
|
---|
14 | <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
|
---|
15 | <?php
|
---|
16 | return;
|
---|
17 | }
|
---|
18 | ?>
|
---|
19 |
|
---|
20 | <!-- You can start editing here. -->
|
---|
21 |
|
---|
22 | <?php if ( have_comments() ) : ?>
|
---|
23 | <h2>Comments<?php comments_number('', ' (1)', ' (%)' );?></h2>
|
---|
24 | <p> </p>
|
---|
25 |
|
---|
26 | <ol class="commentlist">
|
---|
27 | <?php wp_list_comments(); ?>
|
---|
28 | </ol>
|
---|
29 |
|
---|
30 | <div class="navigation">
|
---|
31 | <div class="alignleft"><?php previous_comments_link() ?></div>
|
---|
32 | <div class="alignright"><?php next_comments_link() ?></div>
|
---|
33 | </div>
|
---|
34 | <?php else : // this is displayed if there are no comments so far ?>
|
---|
35 |
|
---|
36 | <?php if ('open' == $post->comment_status) : ?>
|
---|
37 | <!-- If comments are open, but there are no comments. -->
|
---|
38 |
|
---|
39 | <?php else : // comments are closed ?>
|
---|
40 | <!-- If comments are closed. -->
|
---|
41 | <p class="nocomments">Comments are closed.</p>
|
---|
42 |
|
---|
43 | <?php endif; ?>
|
---|
44 | <?php endif; ?>
|
---|
45 |
|
---|
46 |
|
---|
47 | <?php if ('open' == $post->comment_status) : ?>
|
---|
48 |
|
---|
49 | <div id="respond">
|
---|
50 |
|
---|
51 | <h2><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h2>
|
---|
52 |
|
---|
53 | <div class="cancel-comment-reply">
|
---|
54 | <small><?php cancel_comment_reply_link(); ?></small>
|
---|
55 | </div>
|
---|
56 |
|
---|
57 | <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
|
---|
58 | <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>
|
---|
59 | <?php else : ?>
|
---|
60 |
|
---|
61 | <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
---|
62 |
|
---|
63 | <?php if ( $user_ID ) : ?>
|
---|
64 |
|
---|
65 | <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out »</a></p>
|
---|
66 |
|
---|
67 | <?php else : ?>
|
---|
68 |
|
---|
69 | <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
|
---|
70 | <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
|
---|
71 |
|
---|
72 | <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
|
---|
73 | <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
|
---|
74 |
|
---|
75 | <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
|
---|
76 | <label for="url"><small>Website</small></label></p>
|
---|
77 |
|
---|
78 | <?php endif; ?>
|
---|
79 |
|
---|
80 | <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
|
---|
81 |
|
---|
82 | <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
|
---|
83 |
|
---|
84 | <p><button name="submit" type="submit" id="submit">Submit Comment</button>
|
---|
85 | <?php comment_id_fields(); ?>
|
---|
86 | </p>
|
---|
87 | <?php # do_action('comment_form', $post->ID); ?>
|
---|
88 |
|
---|
89 | </form>
|
---|
90 |
|
---|
91 | <?php endif; // If registration required and not logged in ?>
|
---|
92 | </div>
|
---|
93 |
|
---|
94 | <?php endif; // if you delete this the sky will fall on your head ?>
|
---|
95 |
|
---|
96 | <?php else: ?>
|
---|
97 |
|
---|
98 | <?php // Do not delete these lines
|
---|
99 | if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
---|
100 | die ('Please do not load this page directly. Thanks!');
|
---|
101 | if (!empty($post->post_password)) { // if there's a password
|
---|
102 | if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
|
---|
103 | ?>
|
---|
104 | <p class="nocomments">This post is password protected. Enter the password to view comments.<p>
|
---|
105 | <?php
|
---|
106 | return;
|
---|
107 | }
|
---|
108 | }
|
---|
109 | /* This variable is for alternating comment background */
|
---|
110 | $oddcomment = 'comment1';
|
---|
111 | ?>
|
---|
112 | <h2>Comments<?php comments_number('', ' (1)', ' (%)' );?></h2>
|
---|
113 | <?php comments_number('<p>No Comments</p>', '', '' );?>
|
---|
114 | <?php if ($comments) : $first = true; ?>
|
---|
115 | <?php foreach ($comments as $comment) : ?>
|
---|
116 | <div class="<?php echo $oddcomment; ?><?php if ($first) { echo ' first'; $first = false; } ?>" id="comment-<?php comment_ID() ?>">
|
---|
117 | <div class="commentdetails">
|
---|
118 | <p class="commentauthor"><?php comment_author_link() ?></p>
|
---|
119 | <?php if ($comment->comment_approved == '0') : ?>
|
---|
120 | <em>Your comment is awaiting moderation.</em>
|
---|
121 | <?php endif; ?>
|
---|
122 | <p class="commentdate"><?php comment_date('F jS, Y') ?> at <?php comment_time() ?>
|
---|
123 | <?php edit_comment_link('Edit Comment','',''); ?>
|
---|
124 | </p>
|
---|
125 | </div>
|
---|
126 | <?php dp_gravatar(); ?>
|
---|
127 | <br class="break" />
|
---|
128 | <?php comment_text() ?>
|
---|
129 | </div>
|
---|
130 | <?php endforeach; /* end for each comment */ ?>
|
---|
131 | <?php endif; ?>
|
---|
132 | <h2 id="respond">Leave a reply</h2>
|
---|
133 | <?php if ('open' == $post->comment_status) : ?>
|
---|
134 | <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
|
---|
135 | <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
|
---|
136 | <?php else : ?>
|
---|
137 | <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
---|
138 | <?php if ( $user_ID ) : ?>
|
---|
139 | <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p>
|
---|
140 | <?php else : ?>
|
---|
141 | <p><input size="36" type="text" name="author" /> Name <span class="required">*</span></p>
|
---|
142 | <p><input size="36" type="text" name="email" /> Mail <span class="required">*</span></p>
|
---|
143 | <p><input size="36" type="text" name="url" /> Website</p>
|
---|
144 | <?php endif; ?>
|
---|
145 | <p><textarea rows="12" cols="42" name="comment"></textarea></p>
|
---|
146 | <p><button name="submit" type="submit" id="submit" tabindex="5">Submit Comment</button>
|
---|
147 | <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
|
---|
148 | </p>
|
---|
149 | <?php # do_action('comment_form', $post->ID); ?>
|
---|
150 | </form>
|
---|
151 | <?php endif; ?>
|
---|
152 | <?php endif; ?>
|
---|
153 |
|
---|
154 | <?php endif; ?>
|
---|