function getLink($post, $attr = true, $excerpt = true)
 {
     $postLink = '';
     $htmlOptions = '';
     //  uncomment jika ingin di tambahkan popup intro
     //if($excerpt == true){
     //    $htmlOptions =  array('onMouseOver'=>"pop(this,'.".$post->ID."');",);
     //    $postLink .= "<p class='".$post->ID." hide'>";
     //    $postLink .= $post->post_excerpt;
     //    $postLink .= "</p>";
     //}
     $postLink .= CHtml::Link($post->post_name, Yii::app()->createUrl('/photo/index', array('id' => $post->ID, 'slug' => $post->post_link)), $htmlOptions);
     $postLink .= $post->post_excerpt == '' ? "<br>" . Helper::getExcerpt($post->post_content, 0, 40) : "<br>" . Helper::getExcerpt($post->post_excerpt, 0, 40);
     if ($attr == true) {
         $postLink .= "<br><small class='text-muted'>";
         if ($post->categories != null) {
             $postLink .= CHtml::openTag('span', array('class' => 'label label-default'));
             $criteria = new CDbCriteria();
             $criteria->condition = "parent=0";
             //foreach($post->categories($criteria) as $category):
             //   $postLink .= $category->name.' ';
             //endforeach;
             $postLink .= CHtml::closeTag('span');
         }
         $postLink .= "  " . FTime::since($post->post_modified) . "</small>";
     } else {
         $postLink .= '<div class="entry-meta small muted">';
         $postLink .= FTime::since($post->post_modified);
         $postLink .= "</div>";
     }
     echo $postLink;
 }
 function getLink($post)
 {
     $postLink = '';
     $htmlOptions = '';
     $postLink .= "<h2>" . CHtml::Link(Helper::getExcerpt($post->post_name, 0, $this->data('batasJudul')), Yii::app()->createUrl('single/index', array('id' => $post->ID, 'slug' => $post->post_link))) . "</h2>";
     $postLink .= "  <p>";
     $postLink .= $post->post_excerpt == '' ? Helper::getExcerpt($post->post_content, 0, $this->data('batasDeskripsi')) : "<br>" . Helper::getExcerpt($post->post_excerpt, 0, $this->data('batasDeskripsi'));
     $postLink .= "</p>";
     $postLink .= '<div class="text-muted"><i class="fa fa-clock-o"></i> ' . FTime::since($post->post_modified) . '</div>';
     // $postLink .=  '<a class="btn btn-primary readmore" href="'.Yii::app()->createUrl('single/index',array('id'=>$post->ID,'slug'=>$post->post_link)).'">Selengkapnya <i class="fa fa-angle-right"></i></a>';
     echo $postLink;
 }
<div class='col-xs-4'>
    <div class='well' >
<div>
<?php 
echo Chtml::image(Helper::getThumbYoutube($data->post_image, 'medium'), '', array('style' => 'width:100%;'));
?>
</div>
<small class='text-muted'><?php 
echo FTime::id('D, d M Y | H:i', $data->post_modified);
?>
 WIB</small>
<h4 style='margin-top: 5px;line-height:23px;'><a href='<?php 
echo $this->createUrl('video/index', array('id' => $data->ID, 'slug' => $data->post_link));
?>
'>
<?php 
echo Helper::getExcerpt($data->post_name, 0, 60);
?>
</a></h4>
</div></div>
 WIB</small>
 
<?php 
    echo '</div>';
} else {
    echo '<div class="col-xs-12">';
    ?>
<h2>
                <a href='<?php 
    echo $this->createUrl('single/index', array('id' => $data->ID, 'slug' => $data->post_link));
    ?>
'>
<?php 
    echo CHtml::encode($data->post_name);
    ?>
</a></h2> 
<p><?php 
    echo $data->post_excerpt == "" ? Helper::getExcerpt($data->post_content, 0, 180) : Helper::getExcerpt($data->post_excerpt, 0, 100);
    ?>
</p>
<small class='text-muted'><?php 
    echo FTime::id("D, j M Y ", $data->post_modified);
    ?>
 WIB</small>
 
<?php 
    echo '</div>';
}
?>
</div></div></div>
 
 function getLink($post, $attr = true, $excerpt = false, $excerptString = 20)
 {
     $postLink = '';
     $htmlOptions = '';
     $postLink .= CHtml::Link(Helper::getExcerpt($post->post_name, 0, $excerptString), Yii::app()->createUrl('single/index', array('id' => $post->ID, 'slug' => $post->post_link)), $htmlOptions);
     if ($excerpt == true) {
         $postLink .= $post->post_excerpt == '' ? "<br>" . Helper::getExcerpt($post->post_content, 0, $this->data('batasDeskripsi')) : "<br>" . Helper::getExcerpt($post->post_excerpt, 0, $this->data('batasDeskripsi'));
     }
     if ($this->data('showDate') == true) {
         $postLink .= '<div class="entry-meta small muted">';
         $postLink .= FTime::since($post->post_modified);
         $postLink .= "</div>";
     }
     echo $postLink;
 }
 public static function convert($format, $time, $type = array())
 {
     return FTime::convert($format, $time, $type);
 }
 public function model($data, $row = '')
 {
     return "<b>" . $data->model . "</b>  <small class='muted'>| " . FTime::since($data->stamp) . "</small>";
 }