/
comments.php
145 lines (138 loc) · 9.42 KB
/
comments.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<?php
return;
}
}
/* This variable is for alternating comment background */
$com_class = ($comments) ? 'comments': 'comments-';
?>
<dd id="wp-comments" class="<?php echo $com_class;?>">
<div class="outer cf">
<div class="inner c">
<div id="comments" class="content cb cf append-1 prepend-1">
<h2 class="heading-title cf"><span class="fl"><?php comments_number('No Responses', 'One Response', '% Responses' );?></span><strong class="fl">to “<?php echo string_len(get_the_title(),80); ?>”</strong></h2><?php if ($comments) : ?>
<ol id="comments-list" class="commentlist xoxo r cb cf"><?php $cnt = 0; foreach ($comments as $comment) : $alt = ($cnt % 2) ? 'light' : 'normal'; $alt .= ' list-'.$cnt; $alt = apply_filters(wpiFilter::FILTER_COMMENTS_SELECTOR,$alt);?>
<li id="comment-<?php comment_ID(); ?>" class="<?php echo $alt; ?> hreview"><?php $author_uri = get_comment_author_url(); $author_uri = ($author_uri != '' && $author_uri != 'http://') ? $author_uri : get_permalink($post->ID).'#comment-'.get_comment_ID(); $microid = get_microid_hash(get_comment_author_email(),$author_uri);?>
<ul class="reviewier-column cf r">
<li class="span-3 fl rn hcard">
<address class="vcard microid-mailto+http:sha1:<?php echo $microid;?> dc-source"><img src="<?php wpi_comment_avatar_src();?>" width="80" height="80" alt="<?php comment_author(); ?>'s photo" class="url cc rn <?php echo wpiGravatar::commentGID(); ?> photo" longdesc="#comment-<?php comment_ID() ?>" /><a href="<?php echo $author_uri; ?>" class="url fn db" rel="external me" title="<?php echo get_comment_author();?>"><?php wpi_comment_author(); ?></a></address>
</li>
<li class="span-16 fl review-content">
<dl class="review r cf">
<dt class="item title summary"><a rel="dc:source robots-anchortext" href="#comment-<?php comment_ID(); ?>" class="url fn" title="<?php the_title(); ?>"><span>RE:</span> <?php the_title(); ?></a></dt>
<dd class="reviewer-meta"><span class="date-since"><?php echo apply_filters(wpiFilter::FILTER_POST_DATE,get_comment_date());?></span> on <abbr class="dtreviewed" title="<? echo comment_date('Y-m-dTH:i:s:Z'); ?>"><?php comment_date('F jS, Y'); ?> at <?php comment_time(); ?></abbr><?php if(function_exists('hreview_rating')): hreview_rating(); else: ?><span class="rating dn">3</span><span class="type dn">url</span><?php endif;?> · <a href="#microid-<?php comment_ID();?>" class="hreviewer-microid ttip" title="Micro ID | <?php comment_author();?>'s Hash">microId</a> <?php edit_comment_link('edit','<span class="edit-comment">','</span>'); ?></dd>
<dd id="microid-<?php comment_ID();?>" class="microid-embed" style="display:none"><input class="on-click-select claimid icn-l" type="text" value="mailto+http:sha1:<?php echo $microid;?>" /></dd><?php $counter = $cnt + 1;?>
<dd class="reviewer-entry"><big class="comment-count fr" title="Post no #<?php echo $counter; ?>"><?php echo $counter; ?></big><div class="description"><?php echo get_comment_text();?>
</div><?php if ($comment->comment_approved == '0') : ?><p class="notice rn">Your comment is awaiting moderation.</p><?php endif; ?></dd>
</dl>
</li>
</ul>
<!--
<rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="<?php the_permalink();?>#comment-<?php comment_ID(); ?>">
<license rdf:resource="http://creativecommons.org/licenses/by-sa/3.0/" />
</Work>
<License rdf:about="http://creativecommons.org/licenses/by-sa/3.0/">
<requires rdf:resource="http://web.resource.org/cc/Attribution" />
<requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<requires rdf:resource="http://web.resource.org/cc/Notice" />
</License>
</rdf:RDF>
-->
</li><?php $cnt++; endforeach; /* end for each comment */ ?>
<?php wpi_comment_guide($post,$comments,$cnt);?>
</ol>
<p class="mgt cb comments-feed"><a type="application/rss+xml" title="RSS 2.0 Comment Feed" href="<?php echo rel(get_post_comments_feed_link());?>" rev="site:relative">RSS feed for comments in this post</a></p>
<?php else: // displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<ol id="comments-list" class="commentlist r cf">
<?php wpi_comment_guide($post,$comments,1);?>
</ol>
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="comments-closed notice rn">Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>
</dd><!-- /wp-comments --><?php $comstatus = ( 'open' == $post->comment_status) ? 'is_open' : 'is_closed';?>
<dd id="wp-respond" class="<?php echo $comstatus;?>">
<div class="outer cf">
<div class="inner c">
<?php if ('open' == $post->comment_status) : ?>
<div id="respond" class="content cb cf append-1 prepend-1">
<div id="respond-heading" class="rn cl">
<p class="hint">
<small class="rgb-hgray" title="Write as if you were talking to a good friend (in front of your mother)">"write as if you were talking to a good friend (in front of your mother)."</small></p>
<h3 id="respond-title">.have<span>your</span><cite>say</cite></h3>
</div>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo WPI_URL_SLASHIT; ?>wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p><?php else : $is_opid = ( class_exists('WordpressOpenID') ); ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<ul id="respond-column" class="r cf">
<li id="respond-textarea" class="fl span-13"><?php $tabindex = ($is_opid) ? '5' : '4'; ?>
<textarea name="comment" id="comment" cols="200" rows="10" tabindex="<?php echo $tabindex;?>"></textarea>
<p><?php $tabindex = ($is_opid) ? '6' : '5'; ?>
<button name="submit" type="submit" id="submit" tabindex="<?php echo $tabindex;?>"><span class="combtn"><?php _e('Submit Comment',WPI_META);?></span></button><input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
</li>
<li id="respond-meta" class="fl span-8">
<?php if ( $user_ID ) : ?>
<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>
<?php else : ?>
<?php $is_reqs = ($req) ? '<cite>('.__('required').')</cite>' : ''; ?>
<ul class="r cf">
<li>
<input type="text" class="claimid rn" name="author" id="author" value="<?php echo $comment_author; ?>" tabindex="1" />
<label for="author">Name <?php echo $is_reqs; ?></label>
</li>
<li>
<input type="text" class="gravatar rn" name="email" id="email" value="<?php echo $comment_author_email; ?>" tabindex="2" />
<label for="email">Email <?php echo $is_reqs; ?></label>
</li>
<li>
<input type="text" class="favicon rn" name="url" id="url" value="<?php echo $comment_author_url; ?>" tabindex="3" />
<label for="url">Website</label>
</li>
<?php if( class_exists('WordpressOpenID')): ?>
<li>
<input type="text" name="openid_url" class="openid rn" id="openid_url" tabindex="4" />
<label for="openid_url">OpenID URL</label>
</li>
<?php else: ?>
<li>Email will not be published.</li>
<?php endif; ?>
</ul><?php endif; ?>
<!-- <p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
<?php do_action('comment_form', $post->ID); ?>
</li>
</ul>
</form>
<p class="notice cb comment-disclaimer cc-by-sa rn">
<span class="disclaimer db"><span class="fw">Disclaimer:</span> For any content that you post, you hereby grant to <strong><a href="<?php echo WPI_URL_SLASHIT;?>"><?php echo WPI_BLOG_NAME;?></a></strong> the royalty-free, irrevocable, perpetual, exclusive and fully sublicensable license to use, reproduce, modify, adapt, publish, translate, create derivative works from, distribute, perform and display such content in whole or in part, world-wide and to incorporate it in other works, in any form, media or technology now known or later developed.</span>
<span class="license b1s b1t db">
<a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">Some rights reserved.</a>
</span>
</p>
</div>
<?php endif; // If registration required and not logged in ?>
<?php else:?>
<?php endif; // if you delete this the sky will fall on your head ?>
</div>
<!-- /respond-inner -->
</div>
<!-- /respond-outer -->
</dd>
<!-- /wp-respond -->