if( $go_rate > 5 or $go_rate < 1 ) $go_rate = false;
if( $rating AND $vote_num ) $rating = round( ($rating / $vote_num), 0 );
if( $rating AND $vote_num ) $rating = round( ($rating / $vote_num), 1 );
//////////////////////////////////////////////////////////////////////////////////////////////// $simple_meta = array('title','description','keywords'); foreach ($simple_meta as $key) { if (preg_match("#\[({$key})\](.*?)\[/\\1\]\s*#is", $tpl->result['content'], $meta_found)) { $key = str_replace('title', 'header_title', $key); $meta_found[2] = preg_replace("#\s{2,}#s", " ", $meta_found[2]); $metatags[$key] = trim(strip_tags($meta_found[2])); $tpl->result['content'] = str_replace($meta_found[0], "", $tpl->result['content']); } } ////////////////////////////////////////////////////////////////////////////////////////////////