当前位置: 首页>>代码示例>>PHP>>正文


PHP Helper::getThumb方法代码示例

本文整理汇总了PHP中Helper::getThumb方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::getThumb方法的具体用法?PHP Helper::getThumb怎么用?PHP Helper::getThumb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Helper的用法示例。


在下文中一共展示了Helper::getThumb方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: layout

 public function layout($model)
 {
     echo CHtml::openTag('div', array('class' => 'widget categories content-inner  '));
     if ($this->data('title') != '') {
         echo CHtml::openTag('h3', array('class' => 'main-color widget_header'));
         echo $this->data('title');
         echo CHtml::closeTag('h3');
     }
     echo CHtml::openTag('div', array('class' => 'row'));
     echo CHtml::openTag('div', array('class' => 'col-xs-12'));
     $first = true;
     $end = CHtml::listData($model, 'ID', 'ID');
     foreach ($model as $post) {
         if ($this->data('showThumbPost')) {
             echo CHtml::openTag('div', array('class' => 'single_comments'));
             if ($this->getFoto($post) != '') {
                 echo CHtml::image(Helper::getThumb('content', $this->getFoto($post)));
             }
             $this->getLink($post);
             echo CHtml::closeTag('div');
         } else {
             echo CHtml::openTag('div', array('class' => 'single_comments'));
             $this->getLink($post);
             echo CHtml::closeTag('div');
         }
     }
     if ($this->data('showIndexLink')) {
         echo CHtml::Link('<i class="fa fa-angle-double-right"></i> Index Photo', array('/photohome'), array('class' => 'indeks'));
     }
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:33,代码来源:widget_foto.php

示例2: layout

 public function layout($model)
 {
     echo CHtml::openTag('div', array('class' => 'widget categories content-inner widget_post_category'));
     if ($this->data('title') != '') {
         echo CHtml::openTag('h3', array('class' => 'main-color widget_header'));
         echo $this->data('title');
         echo CHtml::closeTag('h3');
     }
     echo CHtml::openTag('div', array('class' => 'row'));
     echo CHtml::openTag('div', array('class' => 'col-xs-12'));
     $first = true;
     $end = CHtml::listData($model, 'ID', 'ID');
     foreach ($model as $post) {
         if ($this->data('showThumbPost')) {
             echo CHtml::openTag('div', array('class' => 'single_comments'));
             echo "<span>";
             if ($post->post_image != '') {
                 echo CHtml::image(Helper::getThumb('content', $post->post_image));
             }
             echo "</span>";
             $this->getLink($post, true, $this->data('showExcerpt'), 20);
             echo CHtml::closeTag('div');
         } else {
             echo CHtml::openTag('div', array('class' => 'single_comments'));
             $this->getLink($post, true, $this->data('showExcerpt'), $this->data('batasJudul'));
             echo CHtml::closeTag('div');
         }
     }
     if ($this->data('showIndexLink')) {
         echo CHtml::Link('<i class="glyphicon glyphicon-plus"></i>  Indeks ', array('indeks/populer'), array('class' => 'indeks'));
     }
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
     echo CHtml::closeTag('div');
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:35,代码来源:widget_terpopuler.php

示例3: layout

 public function layout($model)
 {
     echo "<div class='content-inner latest-article'>";
     if ($this->data('title') != '') {
         echo '<h2>';
         echo $this->data('title');
         echo '</h2>';
     }
     $first = true;
     $end = CHtml::listData($model, 'ID', 'ID');
     foreach ($model as $post) {
         echo '<div class="blog-item">
       ';
         echo '<div class="blog-content">';
         if ($post->post_image != '') {
             echo "<div class='col-xs-5'>";
             echo CHtml::image(Helper::getThumb('content', $post->post_image, 'medium'), '', array('class' => 'img-responsive img-blog'));
             echo ' </div><div class="col-xs-7">';
             $this->getLink($post);
             echo '</div>';
         } else {
             echo '<div class="col-xs-12">';
             $this->getLink($post);
             echo '</div>';
         }
         echo '  </div></div>';
     }
     if ($this->data('showIndexLink')) {
         echo '<div style="padding:15px;">';
         echo CHtml::Link('<i class="glyphicon glyphicon-plus"></i> Indeks ', array('Indeks/view/param/post'));
         echo "</div></div>";
     }
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:33,代码来源:widget_latest_article.php

示例4: Photometa

 public function Photometa($data, $row = '')
 {
     $t = '';
     foreach ($data->photometa as $val) {
         $t .= CHtml::image(Helper::getThumb('content', $val->photo, 'medium'), '', array('width' => '60%'));
         $t .= "<br>Credit : " . $val->photo_credit . "<br><br>";
     }
     return $t;
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:9,代码来源:ListController.php

示例5: actionIndex

 public function actionIndex($id, $slug)
 {
     $post = $this->loadPost($id, $slug);
     $post->saveCounters(array('post_hits' => 1));
     $this->pageTitle = $this->seoReplace($post->post_title, 'singleTitle');
     $this->keyword = $this->seoReplace($post->post_meta_key, 'singleKeyword');
     $this->description = CHtml::encode($post->post_meta_desc) . ' ' . CHtml::encode($post->post_excerpt);
     $this->image = Helper::getThumb('content', $post->post_image, 'medium');
     $this->render('/single', compact('post'));
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:10,代码来源:SingleController.php

示例6: getThumb

 function getThumb($post)
 {
     echo CHtml::openTag('li');
     echo '<div class="carousel-inner">';
     echo CHtml::image(Helper::getThumb('content', $post->post_image, 'medium'), '', array('style' => 'width:100%;'));
     echo '<div class="carousel-caption"><h4>';
     $this->getLink($post, false);
     echo '</h4></div></div>';
     echo CHtml::closeTag('li');
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:10,代码来源:widget_labels.php

示例7: centeredPopup

function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}
</script>

</p>
<?php 
if ($post->post_image != '') {
    ?>
 
<?php 
    echo CHtml::image(Helper::getThumb('content', $post->post_image, 'large'), '', array('style' => 'width:100%;'));
    ?>
 
 <?php 
    if ($post->post_image_by != '' or $post->post_image_credit != '') {
        ?>
 <div style='background:#EEE;width:100%;padding:10px;'>
 <small class='text-muted'>
 <b><?php 
        echo $post->post_image_by;
        ?>
</b>
 <?php 
        echo $post->post_image_credit;
        ?>
 </small></div>
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:31,代码来源:single.php

示例8: array

<div class="blog-item">
    <div class="row"> 
	 <div class="blog-content">
 

<?php 
if ($data->post_image != '') {
    echo "<div class='col-xs-5'>";
    echo CHtml::image(Helper::getThumb('content', $data->post_image, 'medium'), '', array('class' => 'img-responsive img-blog'));
    echo '</div><div class="col-xs-7">';
    ?>
<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>';
} else {
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:31,代码来源:_view.php

示例9: foreach

echo $post->post_name;
?>
</h2>
 <small>
<?php 
echo FTime::id('D, d M Y | H:i', $post->post_modified);
?>
 WIB
</small>
 </div>
 <br>
<?php 
foreach ($post->photometa() as $meta) {
    ?>
   <?php 
    echo CHtml::image(Helper::getThumb('content', $meta->photo, 'medium'), '', array('width' => '100%;'));
    ?>
    <?php 
    if ($meta->photo_credit != '') {
        ?>
           <?php 
        echo $meta->photo_credit;
        ?>
        <?php 
    }
    ?>
 <br>
<?php 
}
?>
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:30,代码来源:_singlePhoto.php

示例10: array

<?php

$this->breadcumbs();
?>
	
<h3>Lihat : <?php 
echo $model->post_name;
?>
</h3>
<?php 
$this->alert();
$webUrl = Yii::app()->FrontUrl->createUrl('/single/index/', array('id' => $model->ID, 'slug' => $model->post_link));
$mobileUrl = Yii::app()->FrontMobileUrl->createUrl('/single/index/', array('id' => $model->ID, 'slug' => $model->post_link));
$link = "Web Url : " . $webUrl . " - " . CHtml::Link('Go to Link', $webUrl) . "<br>";
$link .= frontendMobileUrl == '' ? "" : "Mobile url : " . $mobileUrl . " - " . CHtml::Link('Go to Link', $mobileUrl);
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array('ID', 'post_name', 'post_title', array('name' => 'post_link', 'type' => 'raw', 'value' => $link), array('name' => 'post_image', 'type' => 'raw', 'value' => CHtml::image(Helper::getThumb('content', $model->post_image, 'medium'))), 'post_image_by', 'post_image_credit', 'post_excerpt', array('name' => 'post_content', 'type' => 'raw'), 'post_source', 'post_source_link', array('name' => 'post_status', 'type' => 'raw', 'value' => array($this, 'Status')), array('label' => 'Author', 'name' => 'authors.username'), array('label' => 'Editor', 'name' => 'editors.username'), array('name' => 'tags.name', 'type' => 'raw', 'value' => Tag::makeValue($model)), array('label' => 'Category', 'type' => 'raw', 'value' => Category::makeValue($model)), array('name' => 'labels.name', 'type' => 'raw', 'value' => Label::makeValue($model)), array('label' => 'Topic', 'type' => 'raw', 'value' => Topic::makeValue($model)), 'post_created', 'post_modified', 'post_meta_key', 'post_meta_desc')));
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:16,代码来源:view.php

示例11: getTermIndicator

 public function getTermIndicator($type = '', $count = 5, $value = '', $term = '')
 {
     if ($this->data[$type] == 1) {
         $first = true;
         $i = 0;
         foreach ($this->loadTerm($this->data[$count], $this->data[$value], array($term)) as $slide) {
             $active = '';
             if ($first) {
                 $active = "active";
                 $first = false;
             }
             echo '<li data-target="#myCarousel" data-slide-to="' . $i++ . '" class="list-group-item ' . $active . '"><img src="' . Helper::getThumb('content', $slide->post_image, 'small') . '"  /><h4>' . $slide->post_name . '</h4></li>';
         }
     }
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:15,代码来源:slider.php

示例12: CDbCriteria

<?php

$criteria = new CDbCriteria();
$criteria->limit = 1;
foreach ($data->photometa($criteria) as $meta) {
    ?>
  <div class="col-xs-4">
 <div class="recent-work-wrap" style='height: 200px;overflow: hidden;'>
<?php 
    if ($meta->photo != '') {
        echo CHtml::image(Helper::getThumb('content', $meta->photo, 'medium'), '', array('style' => 'width:100%;height:200px!important;'));
    }
    ?>
  <div class="overlay">
<div class="recent-work-inner">
<h3><a href='<?php 
    echo $this->createUrl('photo/index', array('id' => $data->ID, 'slug' => $data->post_link));
    ?>
'><?php 
    echo CHtml::encode($data->post_name);
    ?>
</a></h3>
<p><?php 
    echo FTime::id('D, d M Y | H:i', $data->post_modified);
    ?>
 WIB</p>
 <a class="preview" href="<?php 
    echo $this->createUrl('photo/index', array('id' => $data->ID, 'slug' => $data->post_link));
    ?>
" ><i class="fa fa-eye"></i> View</a>
</div></div>
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:31,代码来源:_viewPhotos.php

示例13: array

        echo $post->post_name;
        ?>
         </h2>
	 </a>
	 </center></div><hr>
          <ul data-role="listview" data-inset="false" data-icon="false" data-divider-theme="b">
          <li data-role="list-divider">Terbaru </li>
         <?php 
    } else {
        ?>
             <li><a href="<?php 
        echo Yii::app()->createUrl('single/index', array('id' => $post->ID, 'slug' => $post->post_link));
        ?>
">
                <img src="<?php 
        echo Helper::getThumb('content', $post->post_image, 'small');
        ?>
">
                      
                <h2><?php 
        echo $post->post_name;
        ?>
</h2>
                <p><?php 
        echo Helper::since($post->post_modified);
        ?>
 </p>
             
             </a></li>
              
            
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:29,代码来源:home.php

示例14: layoutManual

 public function layoutManual($type = '', $count)
 {
     if ($this->data[$type] == 1) {
         foreach ($this->loadManual($this->data[$count]) as $slide) {
             $active = '';
             if ($this->firstToActive) {
                 $active = "active";
                 $this->firstToActive = false;
             }
             echo CHtml::openTag('div', array('class' => "item {$active}"));
             echo CHtml::Image(Helper::getThumb('content', $slide->images, 'medium'), '', array('alt' => $slide->name, 'title' => $slide->name));
             if ($slide->groups != '') {
                 echo CHtml::openTag('span');
                 echo $slide->groups;
                 echo CHtml::closeTag('span');
             }
             echo CHtml::openTag('div', array('class' => 'carousel-caption'));
             echo CHtml::openTag("h3");
             echo CHtml::Link($slide->name, $slide->slug);
             echo CHtml::closeTag('h3');
             if ($this->data['slider_description'] == 1) {
                 echo CHtml::openTag("p", array('class' => 'hidden-xs'));
                 echo $slide->description;
                 echo CHtml::closeTag('p');
             }
             echo CHtml::closeTag('div');
             echo CHtml::closeTag('div');
         }
     }
 }
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:30,代码来源:slider.php

示例15: CDbCriteria

<?php

$criteria = new CDbCriteria();
$criteria->limit = 1;
foreach ($data->photometa($criteria) as $meta) {
    ?>
 
<li><a href="<?php 
    echo Yii::app()->createUrl('photo/index', array('id' => $data->ID, 'slug' => $data->post_link));
    ?>
">

 
<?php 
    echo CHtml::image(Helper::getThumb('content', $meta->photo, 'small'));
    ?>
 

<h2>
 <?php 
    echo CHtml::encode($data->post_name);
    ?>
</h2>
<p><?php 
    echo Helper::since($data->post_modified);
    ?>
 WIB | <?php 
    echo CHtml::encode($data->post_excerpt);
    ?>
</p>
 
开发者ID:beckblurry,项目名称:Yii1-Base-Core-V.Alpha.1,代码行数:30,代码来源:_viewPhotos.php


注:本文中的Helper::getThumb方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。