<?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">
        <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>

                                <div class="clear"></div>
                                <div class="comment-date">
                                    <?php comment_time(get_option('date_format')); ?>, <?php comment_time(get_option('time_format')); ?>
                                </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>
                            <div class="clear"></div>
                        </div>
                    </li>
                <?php } ?>
            <?php } ?>
        </ol>
        <?php if (count($comment_array) > 2) : ?>
        <div class="more-comments">
            <a href="<?php the_permalink(); ?>" class="read-more" title="<?php the_title(); ?>"><?php _e('See More', 'gp_lang'); ?> &raquo;</a>
        </div>
        <?php endif; ?>
    </div>
<?php } else { ?>

    &nbsp;

<?php } ?>


