Skip to content
Newer
Older
100644 82 lines (61 sloc) 2.53 KB
ae3a9f4 @jmckible Initial commit.
authored Apr 4, 2008
1 <?php // Do not delete these lines
2 if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
3 die ('Please do not load this page directly. Thanks!');
4
5 if (!empty($post->post_password)) { // if there's a password
6 if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
7 ?>
8
9 <p class="nocomments">This post is password protected. Enter the password to view comments.<p>
10
11 <?php
12 return;
13 }
14 }
15 ?>
16
17 <!-- You can start editing here. -->
18 <a name="comments"></a>
19 <?php if ($comments) : ?>
20 <h2>Comments</h2>
21 <ul id="Comments">
22 <?php foreach ($comments as $comment) : ?>
23 <li>
24 <div class="byline">
25 <cite><?php comment_author_link() ?></cite>
26 <span class="date"><?php comment_time('F j') ?></span>
27
28 <?php if ($comment->comment_approved == '0') : ?>
29 <small>Awaiting moderation</small>
30 <?php endif; ?>
31 <small><?php edit_comment_link('edit','',''); ?></small>
32 </div>
33 <div class="content"><?php comment_text() ?></div>
34 </li>
35 <?php endforeach; /* end for each comment */ ?>
36 </ul>
37 <?php endif; ?>
38
39
40 <?php if ('open' == $post->comment_status) : ?>
41 <?php if (!( get_option('comment_registration') && !$user_ID )) : ?>
42
43 <h2>Add a Comment</h2>
44 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" id="AddComment" method="post">
45
46 <?php if ( $user_ID ) : ?>
47
48 <p>
49 Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>.<br />
50 <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout">Logout &raquo;</a>
51 </p>
52
53 <?php else : ?>
54
55
56 <p>Name<br/>
57 <input name="author" id="author" value="<?php echo $comment_author; ?>" size="30" type="text" tabindex="1" /></p>
58
59 <p>Email<br />
60 <input name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" type="text" tabindex="2" /></p>
61
62 <p>Web Site<br />
63 <input name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" type="text" tabindex="3" /></p>
64
65 <?php endif; ?>
66
67 <p>
68 <label>
69 Comments<br />
70 <textarea name="comment" id="comment" tabindex="4"></textarea></p>
71
72 <p>
73 <input name="submit" type="submit" id="submit" tabindex="5" value="Submit" />
74 <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
75 </p>
76 <?php do_action('comment_form', $post->ID); ?>
77 </form>
78
79 <?php endif; // If registration required and not logged in ?>
80
81 <?php endif; // if you delete this the sky will fall on your head ?>
Something went wrong with that request. Please try again.