viewing source for "inline-comment-form.php"
last commit
commit 5d9508177b64dd74b89fcb174a718957e02ec633
Date: Mon Jan 22 06:17:46 2007 +0000
source code
01: <?php //This file is from the Expand Comments plugin
02: /*
03: Feel free to edit this to your liking. This was taken from
04: the original kubrick theme's comment.php file. You must
05: keep the 'global ...' line present, otherwise the variables
06: used in posting a comment won't be known to the following code
07: */ ?>
08:
09: <?php global $id, $post, $user_ID, $user_identity; ?>
10: <?php if ('open' == $post->comment_status) : ?>
11:
12: <h3 id="respond-<?php echo $id; ?>"><?php if( get_comments_number($id) == 0 ) { echo "No Comments Yet, "; } ?>Leave a Reply</h3>
13:
14: <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
15: <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>
16: <?php else : ?>
17:
18: <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform-<?php echo $id;?>">
19:
20: <?php if ( $user_ID ) : ?>
21:
22: <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>
23:
24: <?php else : ?>
25:
26: <p><input type="text" name="author" id="author-<?php echo $id; ?>" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
27: <label for="author-<?php echo $id; ?>"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
28:
29: <p><input type="text" name="email" id="email-<?php echo $id; ?>" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
30: <label for="email-<?php echo $id; ?>"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
31:
32: <p><input type="text" name="url" id="url-<?php echo $id; ?>" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
33: <label for="url-<?php echo $id; ?>"><small>Website</small></label></p>
34:
35: <?php endif; ?>
36:
37: <!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
38:
39: <p><textarea name="comment" id="comment-<?php echo $id; ?>" cols="100%" rows="10" tabindex="4"></textarea></p>
40:
41: <p><input name="submit" type="submit" id="submit-<?php echo $id; ?>" tabindex="5" value="Submit Comment" <?php expand_comment_submit_onclick(); ?> />
42: <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
43: </p>
44: <?php do_action('comment_form', $post->ID); ?>
45:
46: </form>
47:
48: <?php endif; // If registration required and not logged in ?>
49: <?php endif ?>