<div class="stats">
					<span class="post_view"><?php 
if (function_exists('the_views')) {
    the_views();
}
?>
</span>
					<span class="post_comment"><?php 
comments_number('0', '1', '%');
?>
</span>
				</div>
				<div class="clearfix"></div>
				<div class="rating" itemprop="review" itemscope itemtype="http://schema.org/AggregateRating" >
					<?php 
$rating = wp_gdsr_rating_article($post->ID);
?>
					<span class="rating-static rating-<?php 
echo round($rating->rating) * 10;
?>
"></span>
					<div class="rating-itemprop">
						<span class="rating-value" itemprop="rating"><?php 
echo $rating->rating;
?>
</span> / <span >5</span> (<span class="rating-count" itemprop="count"><?php 
echo $rating->user_votes + $rating->visitor_votes;
?>
</span> bình chọn)
					</div>
					<div class="clear"></div>
Example #2
0
File: data.php Project: hewu/blogwp
function gdsr_rating_data($type = "article", $field = "rating", $id = 0, $multi_set_id = 0)
{
    if ($id == 0) {
        if ($type == "article" || $type == "multi") {
            global $post;
            $id = $post->ID;
        } else {
            global $comment;
            $id = $comment->comment_ID;
        }
    }
    $results = null;
    switch ($type) {
        case "article":
            $results = wp_gdsr_rating_article($id);
            break;
        case "multi":
            $results = wp_gdsr_rating_multi($multi_set_id, $id);
            break;
        case "comment":
            $results = wp_gdsr_rating_comment($id);
            break;
    }
    if (is_null($results)) {
        return null;
    } else {
        return $results->{$field};
    }
}
Example #3
0
                ?>
/images/butt_downloade.jpg" title="Download PDF" height="35" ><br /><br />
						<img title="Download PDF" src="<?php 
                bloginfo('template_directory');
                ?>
/images/pdf.png"  >
						</a>
						<?php 
            }
            ?>
					</div>
                
                <div class="pstinfomn">
                 	<span class="tt1">
						<?php 
            $postRatingData = wp_gdsr_rating_article(get_the_ID());
            gdsr_render_stars_custom(array("max_value" => gdsr_settings_get('stars'), "size" => 23, "vote" => $postRatingData->rating));
            ?>
					</span>
        
		<span class="ttl"><strong>Category</strong> :</span>
								<?php 
            $category = get_the_category($post->ID);
            foreach ($category as $catt) {
                if ($catt->term_id != 8) {
                    $cat_related = $catt->term_id . ',';
                }
            }
            echo $category[0]->cat_name;
            ?>
		<br />