~sinzui/+junk/essence-wp

« back to all changes in this revision

Viewing changes to themes/samsara/comments.php

  • Committer: Curtis Hovey
  • Date: 2013-02-10 18:59:15 UTC
  • Revision ID: sinzui.is@verizon.net-20130210185915-1rw2uckbmtxw2k5w
RemovedĀ oldĀ theme.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
    if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
3
 
        die ('Please do not load this page directly. Thanks!');
4
 
    }
5
 
 
6
 
    if (! empty ($post->post_password)
7
 
        && ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password)) {
8
 
        ?>
9
 
 
10
 
        <p class="nocomments">
11
 
            <?php _e(
12
 
                "This post is password protected." .
13
 
                "Enter the password to view comments."); ?>
14
 
        <p>
15
 
 
16
 
        <?php
17
 
        return;
18
 
    }
19
 
 
20
 
    $oddcomment = 'odd';
21
 
?>
22
 
 
23
 
<!-- You can start editing here. -->
24
 
<div class="comments">
25
 
    <?php if ($comments) : ?>
26
 
        <h3>
27
 
            <?php comments_number(
28
 
                'No Responses', 'One Response', '% Responses' );?>
29
 
            to &#8220;<?php the_title(); ?>&#8221;
30
 
        </h3>
31
 
 
32
 
        <ol>
33
 
        <?php foreach ($comments as $comment) : ?>
34
 
 
35
 
            <li class="comment-<?php echo $oddcomment; ?>"
36
 
                id="comment-<?php comment_ID() ?>">
37
 
                <h4>
38
 
                    <cite><?php comment_author_link() ?></cite> Says on
39
 
                    <br />
40
 
                    <small><?php comment_date('j M Y') ?> at
41
 
                    <?php comment_time() ?>
42
 
                    <?php edit_comment_link('(edit)','',''); ?></small>
43
 
                </h4>
44
 
 
45
 
 
46
 
                <?php if ($comment->comment_approved == '0') : ?>
47
 
                    <p><em>Your comment is awaiting moderation.</em></p>
48
 
                <?php endif; ?>
49
 
 
50
 
                <?php comment_text() ?>
51
 
            </li>
52
 
 
53
 
            <?php $oddcomment = ('alt' == $oddcomment) ? 'even' : 'odd'; ?>
54
 
        <?php endforeach; ?>
55
 
        </ol>
56
 
    <?php else : ?>
57
 
        <?php if ('open' != $post->comment_status) : ?>
58
 
            <p><em>Comments are closed.</em></p>
59
 
        <?php endif; ?>
60
 
    <?php endif; ?>
61
 
 
62
 
    <?php if ('open' == $post->comment_status) : ?>
63
 
        <h3>
64
 
            <a id="commentDisclosure" class="action-pre"
65
 
                href="javascript:void(0)">Leave a Reply</a>
66
 
        </h3>
67
 
 
68
 
        <?php if (get_option ('comment_registration') && ! $user_ID) : ?>
69
 
            <p>
70
 
                You must be
71
 
                <a href="<?php echo get_option('siteurl');
72
 
                    ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>"
73
 
                    >logged in</a> to post a comment.
74
 
            </p>
75
 
        <?php else : ?>
76
 
            <form action="<?php echo get_option('siteurl');
77
 
                ?>/wp-comments-post.php" method="post" id="commentform"
78
 
                class="display-none">
79
 
                <input type="hidden" name="comment_post_ID"
80
 
                    value="<?php echo $id; ?>" />
81
 
 
82
 
                <table class="form" summary="post a comment">
83
 
                    <?php if ($user_ID) : ?>
84
 
                        <tr>
85
 
                            <td>
86
 
                                Logged in as
87
 
                                <a href="<?php echo get_option('siteurl');
88
 
                                    ?>/wp-admin/profile.php"
89
 
                                    ><?php echo $user_identity; ?></a>.
90
 
                                <a href="<?php echo get_option('siteurl');
91
 
                                    ?>/wp-login.php?action=logout"
92
 
                                    title="<?php _e(
93
 
                                        'Log out of this account') ?>"
94
 
                                    >Logout &raquo;</a>
95
 
                            </td>
96
 
                        </tr>
97
 
                    <?php else : ?>
98
 
                        <tr>
99
 
                            <td>
100
 
                                <label for="author">
101
 
                                    <small>Name
102
 
                                    <?php if ($req) _e('(required)'); ?>
103
 
                                    </small>
104
 
                                    <br />
105
 
                                    <input type="text" name="author"
106
 
                                    id="author"
107
 
                                    value="<?php echo $comment_author; ?>"
108
 
                                    size="22" tabindex="1" />
109
 
                                </label>
110
 
                            </td>
111
 
                        </tr>
112
 
 
113
 
                        <tr>
114
 
                            <td>
115
 
                                <label for="email">
116
 
                                    <small>Email
117
 
                                    <?php if ($req) _e('(required)'); ?>
118
 
                                    </small>
119
 
                                    <br />
120
 
                                 <input type="text" name="email" id="email"
121
 
                                   value="<?php echo $comment_author_email; ?>"
122
 
                                   size="22" tabindex="2" />
123
 
                                    <br />
124
 
                                    <small>(will not be published)</small>
125
 
                                </label>
126
 
                            </td>
127
 
                        </tr>
128
 
                    <?php endif; ?>
129
 
 
130
 
                    <tr>
131
 
                        <td>
132
 
                            <label for="comment">
133
 
                                <small>New comment</small>
134
 
                                <br />
135
 
                                <textarea name="comment" id="comment"
136
 
                                    cols="100%" rows="10"
137
 
                                    tabindex="4"></textarea>
138
 
                            </label>
139
 
                        </td>
140
 
                    </tr>
141
 
 
142
 
                    <tr>
143
 
                        <td style="text-align: right;">
144
 
                            <input name="submit" type="submit" id="submit"
145
 
                                tabindex="5" value="Submit Reply" />
146
 
                            <?php do_action('comment_form', $post->ID); ?>
147
 
                        </td>
148
 
                    </tr>
149
 
                </table>
150
 
 
151
 
                <p>
152
 
                    <small><strong>You can use these XHTML tags:</strong>
153
 
                    <?php echo allowed_tags(); ?></small>
154
 
                </p>
155
 
            </form>
156
 
        <?php endif; ?>
157
 
    <?php endif; ?>
158
 
</div>