source: trunk/www.guidonia.net/wp/wp-content/themes/alpha/comments.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 2.6 KB
Line 
1<?php // Do not delete these lines
2if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
3 die ('Please do not load this page directly. Thanks!');
4 if (!empty($post->post_password)) { // if there's a password
5 if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
6 ?>
7 <p class="nocomments">This post is password protected. Enter the password to view comments.<p>
8 <?php
9 return;
10 }
11 }
12/* This variable is for alternating comment background */
13$oddcomment = 'comment1';
14?>
15<h2>Comments<?php comments_number('', ' (1)', ' (%)' );?></h2>
16<?php comments_number('<p>No Comments</p>', '', '' );?>
17<?php if ($comments) : $first = true; ?>
18<?php foreach ($comments as $comment) : ?>
19<div class="<?php echo $oddcomment; ?><?php if ($first) { echo ' first'; $first = false; } ?>" id="comment-<?php comment_ID() ?>">
20 <div class="commentdetails">
21 <p class="commentauthor"><?php comment_author_link() ?></p>
22 <?php if ($comment->comment_approved == '0') : ?>
23 <em>Your comment is awaiting moderation.</em>
24 <?php endif; ?>
25 <p class="commentdate"><?php comment_date('F jS, Y') ?> at <?php comment_time() ?>
26 &nbsp; &nbsp; <?php edit_comment_link('Edit Comment','',''); ?>
27 </p>
28 </div>
29 <?php dp_gravatar(); ?>
30 <br class="break" />
31 <?php comment_text() ?>
32</div>
33<?php endforeach; /* end for each comment */ ?>
34<?php endif; ?>
35<h2 id="respond">Leave a reply</h2>
36<?php if ('open' == $post->comment_status) : ?>
37 <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
38 <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>
39 <?php else : ?>
40 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
41 <?php if ( $user_ID ) : ?>
42 <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 &raquo;</a></p>
43 <?php else : ?>
44 <p><input size="36" type="text" name="author" /> Name <span class="required">*</span></p>
45 <p><input size="36" type="text" name="email" /> Mail <span class="required">*</span></p>
46 <p><input size="36" type="text" name="url" /> Website</p>
47 <?php endif; ?>
48 <p><textarea rows="12" cols="42" name="comment"></textarea></p>
49 <p><button name="submit" type="submit" id="submit" tabindex="5">Submit Comment</button>
50 <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
51 </p>
52 <?php # do_action('comment_form', $post->ID); ?>
53 </form>
54 <?php endif; ?>
55 <?php endif; ?>
Note: See TracBrowser for help on using the repository browser.