[613] | 1 | <?php // Do not delete these lines |
---|
| 2 | if (isset($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) |
---|
| 3 | die ('Please do not load this page directly. Thanks!'); |
---|
| 4 | |
---|
| 5 | if ( post_password_required() ) { ?> |
---|
| 6 | <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'xpress'); ?></p> |
---|
| 7 | <?php |
---|
| 8 | return; |
---|
| 9 | } |
---|
| 10 | |
---|
| 11 | ?> |
---|
| 12 | |
---|
| 13 | <!-- You can start editing here. --> |
---|
| 14 | <?php if ( xpress_is_wp_version('>=','2.7')) : ?> |
---|
| 15 | <?php if ( have_comments() ) : ?> |
---|
| 16 | <?php if ( ! empty($comments_by_type['comment']) ) : ?> |
---|
| 17 | <h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to “%s”', 'xpress'), the_title('', '', false)); ?></h3> |
---|
| 18 | <div id="xpress_commentlist"> |
---|
| 19 | <?php wp_list_comments('type=comment&style=div'); ?> |
---|
| 20 | </div> |
---|
| 21 | <?php endif; ?> |
---|
| 22 | |
---|
| 23 | <div class="navigation"> |
---|
| 24 | <div class="alignleft"><?php previous_comments_link() ?></div> |
---|
| 25 | <div class="alignright"><?php next_comments_link() ?></div> |
---|
| 26 | </div> |
---|
| 27 | <?php else : // this is displayed if there are no comments so far ?> |
---|
| 28 | |
---|
| 29 | <?php if ('open' == $post->comment_status) : ?> |
---|
| 30 | <!-- If comments are open, but there are no comments. --> |
---|
| 31 | <?php else : // comments are closed ?> |
---|
| 32 | <!-- If comments are closed. --> |
---|
| 33 | <p class="nocomments"><?php _e('Comments are closed.' , 'xpress'); ?></p> |
---|
| 34 | <?php endif; ?> |
---|
| 35 | <?php endif; ?> |
---|
| 36 | <?php else : // is version 2.7 under?> |
---|
| 37 | <?php if ( $comments ) : ?> |
---|
| 38 | <h3 id="xpress_comments"><?php comments_number(__('No Responses', 'xpress'), __('One Response', 'xpress'), __('% Responses', 'xpress'));?> <?php printf(__('to “%s”', 'xpress'), the_title('', '', false)); ?></h3> |
---|
| 39 | <div id="xpress_commentlist"> |
---|
| 40 | <?php foreach ($comments as $comment) : ?> |
---|
| 41 | <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> |
---|
| 42 | <?php if (function_exists('get_avatar')) echo get_avatar( $comment, 32 ); ?> |
---|
| 43 | <?php printf(__('<cite>%s</cite> Says:', 'xpress'), get_comment_author_link()); ?> |
---|
| 44 | <?php if ($comment->comment_approved == '0') : ?> |
---|
| 45 | <em><?php _e('Your comment is awaiting moderation.', 'xpress'); ?></em> |
---|
| 46 | <?php endif; ?> |
---|
| 47 | <br /> |
---|
| 48 | <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php printf(__('%1$s at %2$s', 'xpress'), get_comment_date(), get_comment_time()); ?></a> <?php edit_comment_link(__('Comment Edit', 'xpress'),' ',''); ?></small> |
---|
| 49 | <?php comment_text() ?> |
---|
| 50 | </li> |
---|
| 51 | <?php |
---|
| 52 | /* Changes every other comment to a different class */ |
---|
| 53 | $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : ''; |
---|
| 54 | ?> |
---|
| 55 | <?php endforeach; /* end for each comment */ ?> |
---|
| 56 | </ol> |
---|
| 57 | </div> |
---|
| 58 | <?php else : // this is displayed if there are no comments so far ?> |
---|
| 59 | <?php if ('open' == $post->comment_status) : ?> |
---|
| 60 | <!-- If comments are open, but there are no comments. --> |
---|
| 61 | <?php else : // comments are closed ?> |
---|
| 62 | <!-- If comments are closed. --> |
---|
| 63 | <p class="nocomments"><?php _e('Comments are closed.' , 'xpress'); ?></p> |
---|
| 64 | <?php endif; ?> |
---|
| 65 | <?php endif; ?> |
---|
| 66 | <?php endif; ?> |
---|
| 67 | |
---|
| 68 | <?php if ('open' == $post->comment_status) : ?> |
---|
| 69 | <div id="xpress-respond"> |
---|
| 70 | <h3><?php comment_form_title( __('Leave a Reply', 'xpress'), __('Leave a Reply for %s' , 'xpress') ); ?></h3> |
---|
| 71 | </div> |
---|
| 72 | |
---|
| 73 | <?php if ( function_exists('cancel_comment_reply_link') ): ?> |
---|
| 74 | <div id="cancel-comment-reply"> |
---|
| 75 | <small><?php cancel_comment_reply_link() ?></small> |
---|
| 76 | </div> |
---|
| 77 | <?php endif; ?> |
---|
| 78 | |
---|
| 79 | <?php if ( get_option('comment_registration') && !$user_ID ) : ?> |
---|
| 80 | <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'xpress'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p> |
---|
| 81 | <?php else : ?> |
---|
| 82 | <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> |
---|
| 83 | <div id="xpress-comment-user"> |
---|
| 84 | <?php if ( $user_ID ) : ?> |
---|
| 85 | <?php if ( function_exists('wp_logout_url') ): ?> |
---|
| 86 | <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out »', 'xpress'); ?></a></p> |
---|
| 87 | <?php else : ?> |
---|
| 88 | <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'xpress'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account', 'xpress'); ?>"><?php _e('Log out »', 'xpress'); ?></a></p> |
---|
| 89 | <?php endif; ?> |
---|
| 90 | <?php else : ?> |
---|
| 91 | <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /> |
---|
| 92 | <label for="author"><small><?php _e('Name', 'xpress'); ?> <?php if ($req) _e("(required)", "xpress"); ?></small></label></p> |
---|
| 93 | |
---|
| 94 | <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'"; ?> /> |
---|
| 95 | <label for="email"><small><?php _e('Mail (will not be published)', 'xpress'); ?> <?php if ($req) _e("(required)", "xpress"); ?></small></label></p> |
---|
| 96 | |
---|
| 97 | <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /> |
---|
| 98 | <label for="url"><small><?php _e('Website', 'xpress'); ?></small></label></p> |
---|
| 99 | <?php endif; ?> |
---|
| 100 | </div> |
---|
| 101 | |
---|
| 102 | <div id="xpress-comment-form"> |
---|
| 103 | <!--<p><small><?php printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'xpress'), allowed_tags()); ?></small></p>--> |
---|
| 104 | |
---|
| 105 | <textarea name="comment" id="comment" cols="100" rows="5" tabindex="4" style="width:100%"></textarea> |
---|
| 106 | <div class ="xpress-comment-submit"> |
---|
| 107 | <input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'xpress'); ?>" /> |
---|
| 108 | </div> |
---|
| 109 | <?php if (function_exists('comment_id_fields')) : ?> |
---|
| 110 | <?php comment_id_fields(); //@since 2.7.0 ?> |
---|
| 111 | <?php else : ?> |
---|
| 112 | <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /> |
---|
| 113 | <?php endif; ?> |
---|
| 114 | <?php do_action('comment_form', $post->ID); ?> |
---|
| 115 | </div> |
---|
| 116 | </form> |
---|
| 117 | <?php endif; // If registration required and not logged in ?> |
---|
| 118 | |
---|
| 119 | <?php endif; // if you delete this the sky will fall on your head ?> |
---|