<?php 

global $gp_settings;

$gp_settings['thumbnail_width'] = $theme_cat_thumbnail_width;
$gp_settings['thumbnail_height'] = $theme_cat_thumbnail_height;
$gp_settings['image_wrap'] = $theme_cat_image_wrap;
$gp_settings['content_display'] = $theme_cat_content_display;
$gp_settings['excerpt_length'] = $theme_cat_excerpt_length;
$gp_settings['read_more'] = $theme_cat_read_more;
$gp_settings['score_type'] = $theme_cat_score_type;
$gp_settings['review_date_column'] = $theme_cat_review_date_column;	
$gp_settings['meta_date'] = $theme_cat_date;
$gp_settings['meta_author'] = $theme_cat_author;
$gp_settings['meta_cats'] = $theme_cat_cats;
$gp_settings['meta_tags'] = $theme_cat_tags;
$gp_settings['meta_comments'] = $theme_cat_comments;
$gp_settings['meta_share_link'] = "1";
	
include('loop-data.php');

?>

<div <?php post_class('post-loop'); ?>>

	<!--Begin Image-->
	<?php if(has_post_thumbnail() && $gp_settings['show_image'] == "Show") { ?>	
		<div class="post-thumbnail<?php if($gp_settings['image_wrap'] == "Disable") { ?> thumbnail-no-wrap<?php } ?>">
			<?php if($gp_settings['post_type'] == "Video") { ?><span class="video-icon"></span><?php } ?>
			<?php $image = vt_resize(get_post_thumbnail_id(), '', $gp_settings['image_width'], $gp_settings['image_height'], true); ?>
			<img src="<?php echo $image[url]; ?>" alt="<?php if(get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true)) { echo get_post_meta(get_post_thumbnail_id(), '_wp_attachment_image_alt', true); } else { echo get_the_title(); } ?>" />			
		</div>
		
		<?php if($gp_settings['image_wrap'] == "Disable") { ?><div class="clear"></div><?php } ?>
		
	<?php } ?>
	<!--End Image-->

	<!--Begin Post Text-->
	<div class="post-text<?php if($gp_settings['post_type'] == "Review" && ($gp_settings['score_type'] == "No Scores" OR ($gp_settings['gp_gdsr']->review <= 0 && $gp_settings['user_voting'] == "Users cannot vote"))) { ?> hidden<?php } ?>" style="width: <?php echo $gp_settings['post_text_width']; ?>px;">
	
		<div class="left" style="width: <?php echo $gp_settings['post_left_width']; ?>px;">
		
			<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
			
			<?php if($gp_settings['content_display'] == "1") { ?>	
				<?php the_content(); ?>
			<?php } else { ?>
				<?php if($gp_settings['excerpt_length'] != "0") { ?><p><?php echo excerpt($gp_settings['excerpt_length']); ?><?php if($gp_settings['read_more'] == "0") { ?> <a href="<?php the_permalink(); ?>" class="read-more" title="<?php the_title(); ?>"><?php _e('Read More', 'gp_lang'); ?> &raquo;</a><?php } ?></p><?php } ?>
			<?php } ?>

			<?php require('post-meta.php'); ?>
			
		</div>
		
		<?php if($gp_settings['post_type'] == "Review") { require('review-meta.php'); } ?>
		
	</div>
	<!--End Post Text-->

</div>