All pastes #13492 Raw Edit

WP-Comment

public php v1 · immutable
#13492 ·published 2005-06-06 05:50 UTC
rendered paste body
<?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>	<p><?php _e('Enter your password to view comments.'); ?></p><?php return; endif; ?><div class="comarea">	<?php if ( $comments ) : ?>				<h3 id="feedback">			<?php comments_number(__('No Responses'), __('One Response'), __('% Responses')); ?> to <?php the_title(); ?>		<?php if ( comments_open() ) : ?>			<a href="#reply" title="<?php _e("Leave a Reply &raquo;&raquo;"); ?>"> &raquo;&raquo;</a>		<?php endif; ?>		</h3> 		<br />			<!-- Comments Template -->		<h3 id="comments">Comments</h3>		<ol class="comol">			<?php foreach ($comments as $comment) : ?>				<? if ($comment->comment_type != "trackback" && $comment->comment_type != "pingback" && !ereg("<pingback />", $comment->comment_content) && !ereg("<trackback />", $comment->comment_content)) { ?>					<li class="comli" id="comment-<?php comment_ID() ?>">						<div class="comauth">							<a href="#comment-<?php comment_ID() ?>"><?php comment_author() ?></a>						</div>						<?php if ($comment->comment_approved == '0') : ?>							<em class="mod">Your comment is awaiting moderation.</em>						<?php endif; ?>						<div class="cmeta">						<?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> by <a href="<?php comment_author_url(); ?>" title="<?php comment_author(); ?>"><?php comment_author() ?></a> | <?php comment_date('Y/m/d') ?> at <?php comment_time('H:i:s') ?><?php edit_comment_link('e',' |',''); ?>						</div>						<div class="comtxt">							<?php comment_text() ?>						</div>					</li>					<? } ?>			<?php endforeach; ?>		</ol>	<!-- End of Comments -->		<br />		<!-- Trackbacks & Pingbacks Template -->		<?php foreach ($comments as $comment) : ?>			<? if ($comment->comment_type == "trackback" || $comment->comment_type == "pingback" || ereg("<pingback />", $comment->comment_content) || ereg("<trackback />", $comment->comment_content)) { ?>					<? if (!$runonce) { $runonce = true; ?>			<h3 id="trackbacks">Trackbacks & Pingbacks				<a href="<?php trackback_url(); ?>" title="Trackback URL"> &raquo;&raquo;</a>			</h3>			<ol class="comol">				<? } ?>					<li class="comli" id="comment-<?php comment_ID() ?>">						<div class="comauth">							<a href="#comment-<?php comment_ID() ?>"><?php comment_author() ?></a>						</div>						<?php if ($comment->comment_approved == '0') : ?>							<em class="mod">Your comment is awaiting moderation.</em>						<?php endif; ?>						<div class="cmeta">							<?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?> by <a href="<?php comment_author_url(); ?>" title="<?php comment_author(); ?>"><?php comment_author() ?></a> | <?php comment_date('Y/m/d') ?> at <?php comment_time('H:i:s') ?><?php edit_comment_link('e',' |',''); ?>						</div>						<div class="comtxt">							<?php comment_text() ?>						</div>					</li>				<? } ?>			<?php endforeach; ?>		<? if ($runonce) { ?>		</ol>		<? } ?>	<!-- End of Trackbacks & Pingbacks -->	<?php else : // If there are no comments yet ?>	<?php endif; ?>	<?php if ( comments_open() ) : ?>		<h3 id="reply">Leave a Reply &raquo;&raquo;</h3> 	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">		<?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="<?php _e('Log out of this account') ?>">Logout &raquo;&raquo;</a>			</p>		<?php else : ?>		<p>			<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />			<label for="author"><strong>Name</strong></label>		</p>		<p>			<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /> 			<label for="email"><strong>Email</strong></label>		</p>		<p>			<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />			<label for="url"><strong>Website</strong></label>		</p>		<?php endif; ?>		<p>			<textarea name="comment" id="comment" cols="100%" rows="12" tabindex="4" onkeyup="ReloadTextDiv();"></textarea>		</p>		<p>			<input name="submit" type="submit" id="submit" tabindex="5" value="Say It!" title="Submit your comment!" />			<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />		</p>		<div class="preview" id="prev">			<ul>				<li>							<div class="comauth"><a href="#prev" title="Live Preview of your comment">Comment Preview</a></div>					<div class="comtxt" id="TextDisplay"></div>				</li>			</ul>		</div>		<?php do_action('comment_form', $post->ID); ?>	</form>		<?php else : // Comments are closed ?>		<h3>Comments are closed</h3> 	<?php endif; ?></div><!--http://www.noscope.com/downloads/code/wp-comments.txt-->