73 lines
2.6 KiB
PHP
73 lines
2.6 KiB
PHP
<?php
|
|
// Do not delete these lines
|
|
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
|
die('Please do not load this page directly. Thanks!');
|
|
|
|
if (post_password_required()) {
|
|
?>
|
|
|
|
<?php
|
|
return;
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
/* * ************************* Comment Template ************************** */
|
|
|
|
global $current_user, $gp_settings;
|
|
require(ghostpool_inc . 'options.php');
|
|
|
|
$comment_array = array_reverse(get_approved_comments(get_the_ID()));
|
|
$count = 1;
|
|
|
|
?>
|
|
<?php if ($comment_array) { ?>
|
|
<div id="comments">
|
|
<h3 class="comments">
|
|
<?php comments_number(__('No Comments', 'gp_lang'), __('1 Comment', 'gp_lang'), __('% Comments', 'gp_lang')); ?>
|
|
<?php if (count($comment_array) > 2) : ?>
|
|
/ <a href="<?php the_permalink(); ?>" class="read-more" title="<?php the_title(); ?>"><?php _e('Read More', 'gp_lang'); ?> »</a>
|
|
<?php endif; ?>
|
|
</h3>
|
|
<ol id="commentlist">
|
|
<?php foreach($comment_array as $comment) { ?>
|
|
<?php if ($count++ <= 2) { ?>
|
|
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
|
|
<div id="comment-<?php comment_ID() ?>" class="comment-box">
|
|
<div class="comment-avatar">
|
|
<?php echo get_avatar($comment,$size='50'); ?>
|
|
</div>
|
|
|
|
<div class="comment-meta">
|
|
<span class="comment-author">
|
|
<?php printf(__('%s', 'gp_lang'), comment_author_link()) ?>
|
|
</span>
|
|
<span class="post-author">(<?php _e('Author', 'gp_lang'); ?>)</span>
|
|
<div class="clear"></div>
|
|
<div class="comment-date">
|
|
<?php comment_time(get_option('date_format')); ?>, <?php comment_time(get_option('time_format')); ?>
|
|
</div>
|
|
</div>
|
|
<div class="clear"></div>
|
|
<div class="comment-text">
|
|
<?php comment_text(); ?>
|
|
<?php if($comment->comment_approved == '0') { ?>
|
|
<div class="moderation">
|
|
<?php _e('Your comment is awaiting moderation.', 'gp_lang'); ?>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</ol>
|
|
</div>
|
|
<?php } else { ?>
|
|
|
|
|
|
|
|
<?php } ?>
|
|
|
|
|