Exemplo n.º 1
0
 public static function get_popular_content()
 {
     $array = Content::model()->findAll(array('condition' => 'state=1', 'limit' => '10', 'order' => 'hits DESC'));
     echo '<ul style="padding-left:0px;">';
     foreach ($array as $key => $value) {
         echo '<div class="row tab-post">';
         echo '<div class="col-md-3 col-sm-3 col-xs-3">';
         echo '<a href="blog-sidebar-left.html">';
         echo Content::get_images($value['id']);
         echo '</a>';
         echo '</div>';
         echo '<div class="col-md-9 col-sm-9 col-xs-9">';
         echo CHtml::link($value['title'], array('content/view', 'id' => $value['id']), array('class' => 'tab-post-link'));
         echo '<small>' . UserAdmin::get_date($value['created']) . '</small>';
         echo '</div>';
         echo '</div>';
     }
     echo '</ul>';
 }
Exemplo n.º 2
0
<?php

/* @var $this ContentController */
/* @var $model Content */
$this->pageTitle = $model->title;
$this->breadcrumbs = array(ContentCategory::getCategoryName($model->catid) => array('content/category', 'id' => $model->catid), $model->title);
?>
<h1 class="blog-post-title"><?php 
echo $model->title;
?>
</h1>
<ul class="blog-post-info list-inline">
    <li>
        <i class="fa fa-clock-o"></i> 
        <span class="font-lato"><?php 
echo UserAdmin::get_date($model->created);
?>
</span>
    </li>
    <li>
        <i class="fa fa-folder-open-o"></i> 
        <?php 
echo CHtml::link('<span class="font-lato">' . ContentCategory::getCategoryName($model->catid) . '</span>', array('content/category', 'id' => $model->catid), array('class' => 'category'));
?>
            
    </li>
</ul>
<!-- IMAGE -->
<figure class="margin-bottom-20">
    <?php 
echo Content::get_picture_responsive($model->id);
Exemplo n.º 3
0
    <!-- IMAGE -->
    <figure class="margin-bottom-20">
        <?php 
echo Content::get_picture_responsive($data->id);
?>
    </figure>
    <h2>
        <?php 
echo CHtml::link($data->title, array('content/view', 'id' => $data->id), array('class' => ''));
?>
    </h2>
    <ul class="blog-post-info list-inline">
        <li>
            <i class="fa fa-clock-o"></i> 
            <span class="font-lato"><?php 
echo UserAdmin::get_date($data->created);
?>
</span>
        </li>
        <li>
            <i class="fa fa-folder-open-o"></i> 
            <?php 
echo CHtml::link('<span class="font-lato">' . ContentCategory::getCategoryName($data->catid) . '</span>', array('content/category', 'id' => $data->catid), array('class' => 'category'));
?>
            
        </li>
    </ul>
    <p style="font-size:16px;">
        <?php 
echo $this->text_cut($this->html2txt($data->introtext), 1000);
?>