128 lines
5.6 KiB
PHP
128 lines
5.6 KiB
PHP
<?php global $gp_settings;
|
|
|
|
?>
|
|
|
|
<!--Begin Review Links-->
|
|
<?php if(get_post_meta($post->ID, 'ghostpool_link_title_1', true)) { ?>
|
|
<div id="review-links">
|
|
<ul>
|
|
|
|
<li class="tab-link tab-active"><a href="#0"><?php echo $gp_settings['review_tab']; ?></a></li>
|
|
|
|
<?php for($i = 1; $i < 11; $i++) { if(get_post_meta($post->ID, 'ghostpool_link_title_'.$i, true)) { // Begins Links ?>
|
|
<li<?php if(!preg_match("/http:/", get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true))) { ?> class="tab-link"<?php } ?>><a href="<?php if(preg_match("/http:/", get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true))) { echo(get_post_meta($post->ID, 'ghostpool_link_url_'.$i, true)); } else { ?>#<?php echo $i; } ?>"><?php echo(get_post_meta($post->ID, 'ghostpool_link_title_'.$i, true)); ?></a></li>
|
|
<?php }} ?>
|
|
|
|
</ul>
|
|
</div>
|
|
<?php } ?>
|
|
<!--End Review Links-->
|
|
|
|
<!--Begin Review Container-->
|
|
<div id="review-container">
|
|
|
|
<!--Begin Review Left-->
|
|
<div id="review-left" style="width: <?php echo $gp_settings['review_left_width']; ?>px;">
|
|
|
|
<!--Begin Image-->
|
|
<?php if(has_post_thumbnail() && $gp_settings['show_image'] == "Show") { ?>
|
|
|
|
<div class="post-thumbnail">
|
|
<?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>
|
|
|
|
<!--Begin More Images-->
|
|
<?php $args = array('post_type' => 'attachment', 'post_parent' => $post->ID, 'numberposts' => -1, 'orderby' => 'menu_order', 'order' => 'ASC'); $attachments = get_children($args); if($attachments) { foreach ($attachments as $attachment) { if($attachment->menu_order >= 1) { $attachment_counter++; ?>
|
|
|
|
<a href="<?php if(get_post_meta($attachment->ID, '_ghostpool_video_url', true)) { ?>file=<?php echo get_post_meta($attachment->ID, '_ghostpool_video_url', true); ?>&image=<?php echo wp_get_attachment_url($attachment->ID); } else { echo wp_get_attachment_url($attachment->ID); } ?>" id="more-images-link" rel="prettyPhoto[large]"<?php if($attachment_counter > 1) { ?> style="display: none"<?php } ?>><?php if($attachment_counter == 1) { _e('More Images', 'gp_lang'); } else {} ?></a>
|
|
|
|
<?php }}} ?>
|
|
<!--End More Images-->
|
|
|
|
<?php } ?>
|
|
<!--End Image-->
|
|
|
|
<!--Begin Review Details-->
|
|
<div id="review-details">
|
|
|
|
<?php if(function_exists('wpfp_link')) { wpfp_link(); } ?>
|
|
|
|
<?php if((defined('STARRATING_INSTALLED') && ($gp_settings['user_voting'] != "Users cannot vote") OR $gp_settings['gp_gdsr']->review > 0)) { ?>
|
|
<?php echo nl2br(do_shortcode(get_post_meta($post->ID, 'ghostpool_review_details', true))); ?>
|
|
<?php } ?>
|
|
|
|
</div>
|
|
<!--End Review Details-->
|
|
|
|
</div>
|
|
<!--End Review Left-->
|
|
|
|
<!--Begin Review Right-->
|
|
<div id="review-right" style="width: <?php echo $gp_settings['review_right_width']; ?>px;">
|
|
|
|
<?php if($gp_settings['title'] == "Show") { ?><h1><?php the_title(); ?></h1><?php } ?>
|
|
|
|
<!--Begin Post Meta-->
|
|
<?php require_once('post-meta.php'); ?>
|
|
<!--End Post Meta-->
|
|
|
|
<!--Begin Scores-->
|
|
<?php if($gp_settings['gp_gdsr']->review > 0 OR $gp_settings['user_voting'] != "Users cannot vote") { ?>
|
|
|
|
<!--Begin Site Score-->
|
|
<?php if(defined('STARRATING_INSTALLED') && $gp_settings['gp_gdsr']->review > 0) { ?>
|
|
<div class="site-score"<?php echo $site_score_color; ?>>
|
|
<div class="site-score-title"><?php _e('Site Score', 'gp_lang'); ?></div>
|
|
<?php echo $gp_settings['gp_gdsr']->review; ?>
|
|
</div>
|
|
<?php } ?>
|
|
<!--End Site Score-->
|
|
|
|
<!--Begin Good/Bad-->
|
|
<?php if(get_post_meta($post->ID, 'ghostpool_good_point', true) OR get_post_meta($post->ID, 'ghostpool_bad_point', true)) { ?>
|
|
<div class="good-bad-panel" style="width: <?php echo $gp_settings['good_bad_width']; ?>px;">
|
|
<div class="good-point"><strong><?php _e('Good', 'gp_lang'); ?>:</strong> <?php echo get_post_meta($post->ID, 'ghostpool_good_point', true); ?></div>
|
|
<div class="bad-point"><strong><?php _e('Bad', 'gp_lang'); ?>:</strong> <?php echo get_post_meta($post->ID, 'ghostpool_bad_point', true); ?></div>
|
|
</div>
|
|
<?php } ?>
|
|
<!--End Good/Bad-->
|
|
|
|
<div class="clear"></div>
|
|
|
|
<!--Begin User Score-->
|
|
<?php if(defined('STARRATING_INSTALLED') && $gp_settings['user_voting'] != "Users cannot vote") { ?>
|
|
<div class="user-score"<?php echo $user_score_color; ?>>
|
|
<div class="user-score-title"><?php _e('User Score', 'gp_lang'); ?></div>
|
|
<?php echo $gp_settings['gp_gdsr']->rating; ?>
|
|
<div class="user-votes">(<?php echo $gp_settings['gp_gdsr']->votes; ?> <?php _e('votes' ,'gp_lang'); ?>)</div>
|
|
</div>
|
|
<div class="user-voting">
|
|
<?php if($gp_settings['user_voting'] == "Vote only when posting a comment") {} else { ?><div class="user-voting-text"><?php _e('Click to vote', 'gp_lang'); ?></div><div class="clear"></div><?php } ?>
|
|
<div class="user-score-stars">
|
|
<?php if($gp_settings['user_voting'] == "Vote only when posting a comment") { wp_gdsr_render_article(0, true); } else { wp_gdsr_render_article(0, false); } ?>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
<!--End User Score-->
|
|
|
|
<?php } else { ?>
|
|
|
|
<!--Begin Review Details-->
|
|
<div id="review-details">
|
|
<?php echo nl2br(do_shortcode(get_post_meta($post->ID, 'ghostpool_review_details', true))); ?>
|
|
</div>
|
|
<!--End Review Details-->
|
|
|
|
<?php } ?>
|
|
<!--End Scores-->
|
|
|
|
</div>
|
|
<!--End Review Right-->
|
|
|
|
</div>
|
|
<!--End Review Container-->
|
|
|
|
<?php require_once('review-tabs.php'); ?>
|
|
|