<?php 

global $gp_settings;

// Post Type
$gp_settings['post_type'] = get_post_meta($post->ID, 'ghostpool_post_type', true);

// Image Dimensions
if(get_post_meta($post->ID, 'ghostpool_thumbnail_width', true) && get_post_meta($post->ID, 'ghostpool_thumbnail_width', true)) {
	$gp_settings['image_width'] = get_post_meta($post->ID, 'ghostpool_thumbnail_width', true);
} else {
	$gp_settings['image_width'] = $gp_settings['thumbnail_width'];
}
if(get_post_meta($post->ID, 'ghostpool_thumbnail_height', true) && get_post_meta($post->ID, 'ghostpool_thumbnail_height', true)) {
	$gp_settings['image_height'] = get_post_meta($post->ID, 'ghostpool_thumbnail_height', true);
} else {
	$gp_settings['image_height'] = $gp_settings['thumbnail_height'];
}

// User Voting
if(get_post_meta($post->ID, 'ghostpool_user_voting', true) && get_post_meta($post->ID, 'ghostpool_user_voting', true) != "Default") {
	$gp_settings['user_voting'] = get_post_meta($post->ID, 'ghostpool_user_voting', true);
} elseif(get_post_type() != "slide") {	
	$gp_settings['user_voting'] = $theme_user_voting;	
} else {
	$gp_settings['user_voting'] = $theme_user_voting;
}

// Post Text Width
if(!has_post_thumbnail() OR $gp_settings['image_wrap'] == "Disable") {
	$gp_settings['post_text_width'] = $gp_settings['content_width'];	
} else {
	$gp_settings['post_text_width'] = $gp_settings['content_width'] - $gp_settings['image_width'] - 17;
}	

// Post Left Width
if($gp_settings['post_type'] == "Review" && $gp_settings['review_date_column'] == "0" && (($gp_settings['score_type'] == "Site Score" && $gp_settings['gp_gdsr']->review > 0) OR ($gp_settings['score_type'] == "User Score" && $gp_settings['user_voting'] != "Users cannot vote") OR ($gp_settings['score_type'] == "Site & User Score" && ($gp_settings['gp_gdsr']->review > 0 OR $gp_settings['user_voting'] != "Users cannot vote")))) {
	$gp_settings['post_left_width'] = $gp_settings['post_text_width'] - 190;
} elseif($gp_settings['post_type'] == "Review" && $gp_settings['review_date_column'] == "1" && (($gp_settings['score_type'] == "Site Score" && $gp_settings['gp_gdsr']->review > 0) OR ($gp_settings['score_type'] == "User Score" && $gp_settings['user_voting'] != "Users cannot vote") OR ($gp_settings['score_type'] == "Site & User Score" && ($gp_settings['gp_gdsr']->review > 0 OR $gp_settings['user_voting'] != "Users cannot vote")))) {
	$gp_settings['post_left_width'] = $gp_settings['post_text_width'] - 95;
} else {
	$gp_settings['post_left_width'] = $gp_settings['post_text_width'];
}	

// Display Orderby Scores
if($gp_settings['gp_gdsr']->review > 0) {
	$gp_settings['orderby_site_score'] = true;
}
if($gp_settings['post_type'] == "Review" && $gp_settings['user_voting'] != "Users cannot vote") {
	$gp_settings['orderby_user_score'] = true;
}
		
?>