function get_comment_integrate_standard_result($comment_id, $post_id)
 {
     if (!$this->g->is_cached_integration_std) {
         global $gdsr_cache_integation_std;
         $data = GDSRDBCache::get_integration($post_id);
         foreach ($data as $row) {
             $id = $row->comment_id;
             $gdsr_cache_integation_std->set($id, $row);
         }
         $this->g->is_cached_integration_std = true;
     }
     return intval(wp_gdget_integration_std($comment_id));
 }
Example #2
0
 /**
  * Renders result of comment integration of standard rating for specific comment
  *
  * @param int $comment_id initial rating value
  * @param string $stars_set set to use for rendering
  * @param int $stars_size set size to use for rendering
  * @param string $stars_set_ie6 set to use for rendering in ie6
  */
 function comment_integrate_standard_result($comment_id, $post_id, $stars_set = "oxygen", $stars_size = 20, $stars_set_ie6 = "oxygen_gif")
 {
     if (!$this->g->is_cached_integration_std) {
         global $gdsr_cache_integation_std;
         $data = GDSRDBCache::get_integration($post_id);
         foreach ($data as $row) {
             $id = $row->comment_id;
             $gdsr_cache_integation_std->set($id, $row);
         }
         $this->g->is_cached_integration_std = true;
     }
     $value = intval(wp_gdget_integration_std($comment_id));
     if ($value > 0 || $this->g->o["int_comment_std_zero"] == 1) {
         $style = $stars_set == "" ? $this->g->o["style"] : $stars_set;
         $style = $this->g->is_ie6 ? $stars_set_ie6 == "" ? $this->g->o["style_ie6"] : $stars_set_ie6 : $style;
         return GDSRRender::render_static_stars($style, $stars_size == 0 ? $this->g->o["size"] : $stars_size, $this->g->o["stars"], $value);
     } else {
         return "";
     }
 }