1 | <?php
|
---|
2 |
|
---|
3 | // This file is part of the Carrington Mobile Theme for WordPress
|
---|
4 | // http://carringtontheme.com
|
---|
5 | //
|
---|
6 | // Copyright (c) 2008-2009 Crowd Favorite, Ltd. All rights reserved.
|
---|
7 | // http://crowdfavorite.com
|
---|
8 | //
|
---|
9 | // Released under the GPL license
|
---|
10 | // http://www.opensource.org/licenses/gpl-license.php
|
---|
11 | //
|
---|
12 | // **********************************************************************
|
---|
13 | // This program is distributed in the hope that it will be useful, but
|
---|
14 | // WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
---|
16 | // **********************************************************************
|
---|
17 |
|
---|
18 | if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
|
---|
19 | if (CFCT_DEBUG) { cfct_banner(__FILE__); }
|
---|
20 |
|
---|
21 | global $post, $user_ID, $user_identity, $comment_author, $comment_author_email, $comment_author_url;
|
---|
22 |
|
---|
23 | $req = get_option('require_name_email');
|
---|
24 |
|
---|
25 | // if post is open to new comments
|
---|
26 | if ('open' == $post->comment_status) {
|
---|
27 | // if you need to be regestered to post comments..
|
---|
28 | if ( get_option('comment_registration') && !$user_ID ) { ?>
|
---|
29 |
|
---|
30 | <p id="you-must-be-logged-in-to-comment"><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'carrington-mobile'), get_bloginfo('wpurl').'/wp-login.php?redirect_to='.get_permalink()); ?></p>
|
---|
31 |
|
---|
32 | <?php
|
---|
33 | }
|
---|
34 | else {
|
---|
35 | ?>
|
---|
36 |
|
---|
37 | <form id="respond" action="<?php bloginfo('wpurl'); ?>/wp-comments-post.php" method="post">
|
---|
38 | <h3 class="title-divider"><span><?php _e('Leave a Reply', 'carrington-mobile'); ?></span></h3>
|
---|
39 | <?php // if you're logged in...
|
---|
40 | if ($user_ID) {
|
---|
41 | ?>
|
---|
42 | <p><?php printf(__('Logged in as <a href="%s">%s</a>. ', 'carrington-mobile'), get_bloginfo('wpurl').'/wp-admin/profile.php', $user_identity); wp_loginout() ?></p>
|
---|
43 | <?php
|
---|
44 | } else {
|
---|
45 | ?>
|
---|
46 | <p>
|
---|
47 | <input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" />
|
---|
48 | <label for="author"><small><?php _e('Name', 'carrington-mobile'); if ($req) { _e(' (required)', 'carrington-mobile'); } ?></small></label>
|
---|
49 | </p>
|
---|
50 | <p>
|
---|
51 | <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" />
|
---|
52 | <label for="email"><small><?php _e('Email', 'carrington-mobile');
|
---|
53 | if ($req) {
|
---|
54 | _e(' (required, but never shared)', 'carrington-mobile');
|
---|
55 | }
|
---|
56 | else {
|
---|
57 | _e(' (never shared)', 'carrington-mobile');
|
---|
58 | } ?></small></label>
|
---|
59 | </p>
|
---|
60 | <p>
|
---|
61 | <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" />
|
---|
62 | <label title="<?php _e('Your website address', 'carrington-mobile'); ?>" for="url"><small><?php _e('Web', 'carrington-mobile'); ?></small></label>
|
---|
63 | </p>
|
---|
64 | <?php
|
---|
65 | }
|
---|
66 | ?>
|
---|
67 | <p><textarea name="comment" id="comment" rows="8" cols="40"></textarea></p>
|
---|
68 | <p>
|
---|
69 | <input name="submit" type="submit" id="submit" value="<?php _e('Submit comment', 'carrington-mobile'); ?>" tabindex="5" />
|
---|
70 | <input type="hidden" name="comment_post_ID" value="<?php echo $post->ID; ?>" />
|
---|
71 | </p>
|
---|
72 | <?php
|
---|
73 | do_action('comment_form', $post->ID);
|
---|
74 | ?>
|
---|
75 | </form>
|
---|
76 | <?php
|
---|
77 | } // If registration required and not logged in
|
---|
78 | } // If you delete this the sky will fall on your head
|
---|
79 | ?> |
---|