本文整理汇总了PHP中Utility::getTimThumb方法的典型用法代码示例。如果您正苦于以下问题:PHP Utility::getTimThumb方法的具体用法?PHP Utility::getTimThumb怎么用?PHP Utility::getTimThumb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utility
的用法示例。
在下文中一共展示了Utility::getTimThumb方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
<div class="boxed mt-15">
<h3><?php
echo Phrase::trans(26053, 1);
?>
</h3>
<div class="clearfix horizontal-data" name="four">
<ul id="media-render">
<li id="upload" <?php
echo count(ArticleMedia::getPhoto($model->article_id)) == $setting->media_limit ? 'class="hide"' : '';
?>
>
<a id="upload-gallery" href="<?php
echo Yii::app()->controller->createUrl('o/media/ajaxadd', array('id' => $model->article_id, 'type' => 'admin'));
?>
" title="<?php
echo Phrase::trans(26054, 1);
?>
"><?php
echo Phrase::trans(26054, 1);
?>
</a>
<img src="<?php
echo Utility::getTimThumb(Yii::app()->request->baseUrl . '/public/article/article_default.png', 320, 250, 1);
?>
" alt="" />
</li>
</ul>
</div>
</div>
<?php
}
示例2: array
*
* @author Putra Sudaryanto <putra@sudaryanto.id>
* @copyright Copyright (c) 2012 Ommu Platform (ommu.co)
* @link https://github.com/oMMu/Ommu-Core
* @contact (+62)856-299-4114
*
*/
$this->breadcrumbs = array('Ommu Pages' => array('manage'), $model->name);
?>
<?php
if ($model->media_show == 1) {
$images = Yii::app()->request->baseUrl . '/public/page/' . $model->media;
if ($this->adsSidebar == true) {
if ($model->media_type == 1) {
echo '<img class="largemag" src="' . Utility::getTimThumb($images, 600, 900, 3) . '" alt="">';
} else {
echo '<img class="mediummag" src="' . Utility::getTimThumb($images, 270, 500, 3) . '" alt="">';
}
} else {
if ($model->media_type == 1) {
echo '<img class="largemag" src="' . Utility::getTimThumb($images, 1280, 1024, 3) . '" alt="">';
} else {
echo '<img class="mediummag" src="' . Utility::getTimThumb($images, 270, 500, 3) . '" alt="">';
}
}
}
?>
<?php
echo Phrase::trans($model->name, 2) != Utility::hardDecode(Phrase::trans($model->desc, 2)) ? Utility::cleanImageContent(Phrase::trans($model->desc, 2)) : '';
示例3: array
echo $form->textField($model, 'title', array('maxlength' => 128, 'class' => 'span-8'));
?>
<?php
echo $form->error($model, 'title');
?>
</div>
</div>
<?php
if (!$model->isNewRecord && ($model->article_type == 3 || $model->article_type == 1 && $setting->media_limit == 1)) {
$model->old_media = $model->cover->media;
echo $form->hiddenField($model, 'old_media');
if ($model->media_id != 0) {
$file = Yii::app()->request->baseUrl . '/public/article/' . $model->article_id . '/' . $model->cover->media;
if ($model->article_type == 1) {
$media = '<img src="' . Utility::getTimThumb($file, 320, 150, 1) . '" alt="">';
} elseif ($model->article_type == 3) {
$media = '<audio src="' . $file . '" controls="true" loop="true" autoplay="false"></audio>';
}
echo '<div class="clearfix">';
echo $form->labelEx($model, 'old_media');
echo '<div class="desc">' . $media . '</div>';
echo '</div>';
}
}
?>
<?php
if ($model->isNewRecord || !$model->isNewRecord && ($model->article_type == 1 && $setting->media_limit == 1)) {
?>
<div id="media" class="clearfix filter">
示例4:
echo $form->errorSummary($model);
?>
</div>
<?php
//begin.Messages
?>
<fieldset>
<?php
if (!$model->isNewRecord) {
$model->old_media = $model->media;
echo $form->hiddenField($model, 'old_media');
if ($model->media != '') {
$file = Yii::app()->request->baseUrl . '/public/album/' . $model->album_id . '/' . $model->media;
$media = '<img src="' . Utility::getTimThumb($file, 300, 500, 3) . '" alt="">';
echo '<div class="clearfix">';
echo $form->labelEx($model, 'old_media');
echo '<div class="desc">' . $media . '</div>';
echo '</div>';
}
}
?>
<div class="clearfix">
<?php
echo $form->labelEx($model, 'media');
?>
<div class="desc">
<?php
echo $form->fileField($model, 'media');
示例5:
<?php
if ($model->media != '') {
$images = Yii::app()->request->baseUrl . '/public/page/' . $model->media;
} else {
$images = Yii::app()->request->baseUrl . '/public/page/page_default.png';
}
?>
<div class="clearfix">
<div class="sep">
<img src="<?php
echo Utility::getTimThumb($images, 300, 300, 1);
?>
" alt="<?php
echo Phrase::trans($model->name, 2);
?>
">
<?php
echo Phrase::trans($model->quote, 2);
?>
</div>
<div class="sep"><?php
echo Phrase::trans($model->name, 2) != Utility::hardDecode(Phrase::trans($model->desc, 2)) ? Utility::cleanImageContent(Phrase::trans($model->desc, 2)) : '';
?>
</div>
</div>
示例6: foreach
foreach ($random as $key => $row) {
if ($row->media_id != 0) {
$images = Yii::app()->request->baseUrl . '/public/album/' . $row->album_id . '/' . $row->cover->media;
} else {
$images = Yii::app()->request->baseUrl . '/public/album/album_default.png';
}
?>
<div class="box">
<a class="photo" href="<?php
echo Yii::app()->controller->createUrl('view', array('id' => $row->album_id, 't' => Utility::getUrlTitle($row->title)));
?>
" title="<?php
echo $row->title;
?>
"><img src="<?php
echo Utility::getTimThumb($images, 200, 150, 3);
?>
" alt="<?php
echo $row->title;
?>
" /></a>
<div class="span">
<a href="<?php
echo Yii::app()->controller->createUrl('view', array('id' => $row->album_id, 't' => Utility::getUrlTitle($row->title)));
?>
" title="<?php
echo $row->title;
?>
"><?php
echo Utility::hardDecode($row->title);
?>
示例7: array
?>
<?php
$form = $this->beginWidget('application.components.system.OActiveForm', array('action' => Yii::app()->controller->createUrl('post', array('id' => Yii::app()->params['reset_user_id'])), 'id' => 'users-form', 'enableAjaxValidation' => true, 'htmlOptions' => array('class' => 'form', 'enctype' => 'multipart/form-data')));
?>
<fieldset>
<div class="cell">
<?php
if ($model->photo_id == 0) {
$images = Yii::app()->request->baseUrl . '/public/users/default.png';
} else {
$images = Yii::app()->request->baseUrl . '/public/users/' . $model->user_id . '/' . $model->photo->photo;
}
?>
<img src="<?php
echo Utility::getTimThumb($images, 120, 120, 1);
?>
" alt="<?php
echo $model->photo_id != 0 ? $model->displayname : 'Ommu Platform';
?>
"/>
</div>
<div class="cell">
<div class="user-info">
<strong><?php
echo $model->displayname;
?>
</strong>
<?php
echo $model->email;
?>
示例8: foreach
<?php
if ($model != null) {
?>
<div class="boxed">
<h3><?php
echo Yii::t('phrase', 'Recent Photo');
?>
</h3>
<ul class="photo clearfix">
<?php
foreach ($model as $key => $val) {
$images = Yii::app()->request->baseUrl . '/public/album/' . $val->album_id . '/' . $val->media;
echo '<li><a href="' . Yii::app()->createUrl('album/site/view', array('id' => $val->album_id, 'photo' => $val->media_id, 't' => $val->album->title)) . '" title=""><img src="' . Utility::getTimThumb($images, 74, 74, 1) . '" alt=""></a></li>';
}
?>
</ul>
</div>
<?php
}
示例9: array
$this->breadcrumbs = array('User Forgots' => array('manage'), 'Create');
if ($render == 1) {
echo '<a class="button" href="' . Yii::app()->createUrl('users/forgot/get') . '" title="' . Yii::t('phrase', 'Forgot your password') . '">' . Yii::t('phrase', 'Forgot your password') . '</a>';
} else {
if ($render == 2) {
?>
<?php
$form = $this->beginWidget('application.components.system.OActiveForm', array('action' => Yii::app()->controller->createUrl('post', array('id' => Yii::app()->params['reset_user_id'])), 'id' => 'users-form', 'enableAjaxValidation' => true, 'htmlOptions' => array('class' => 'form', 'enctype' => 'multipart/form-data')));
?>
<fieldset>
<?php
if ($model->photo_id == 0) {
$images = Utility::getTimThumb(Yii::app()->request->baseUrl . '/public/users/default.png', 60, 60, 1);
} else {
$images = Utility::getTimThumb(Yii::app()->request->baseUrl . '/public/users/' . $model->user_id . '/' . $model->photo->photo, 60, 60, 1);
}
?>
<div class="user-info clearfix">
<img src="<?php
echo $images;
?>
" alt="<?php
echo $model->photo_id != 0 ? $model->displayname : 'Ommu Platform';
?>
"/>
<div>
<h3><?php
echo $model->displayname;
?>
</h3>
示例10:
<div class="clearfix">
<?php
echo $form->labelEx($model, 'old_media');
?>
<div class="desc">
<?php
$model->old_media = $model->media;
echo $form->hiddenField($model, 'old_media');
if (in_array($model->article->article_type, array(1, 3))) {
$media = Yii::app()->request->baseUrl . '/public/article/' . $model->article_id . '/' . $model->old_media;
}
if ($model->article->article_type == 1) {
?>
<img src="<?php
echo Utility::getTimThumb($media, 400, 400, 3);
?>
" alt="">
<?php
} else {
if ($model->article->article_type == 2) {
?>
<iframe width="320" height="200" src="//www.youtube.com/embed/<?php
echo $model->old_media;
?>
" frameborder="0" allowfullscreen></iframe>
<?php
} else {
if ($model->article->article_type == 3) {
?>
<audio src="<?php
示例11:
<?php
echo $form->error($model, 'title');
?>
<?php
/*<div class="small-px silent"></div>*/
?>
</div>
</div>
<?php
if (!$model->isNewRecord) {
$model->old_icon = $model->icons;
echo $form->hiddenField($model, 'old_icon');
if ($model->icons != '') {
$file = Yii::app()->request->baseUrl . '/public/support/' . $model->icons;
$media = '<img src="' . Utility::getTimThumb($file, 100, 200, 3) . '" alt="' . $model->title . '">';
echo '<div class="clearfix">';
echo $form->labelEx($model, 'old_icon');
echo '<div class="desc">' . $media . '</div>';
echo '</div>';
}
}
?>
<div class="clearfix">
<?php
echo $form->labelEx($model, 'icons');
?>
<div class="desc">
<?php
echo $form->fileField($model, 'icons');
示例12: array
echo $model->media_show == 0 ? 'class="hide"' : '';
?>
>
<?php
if ($model->media != '') {
$model->old_media = $model->media;
echo $form->hiddenField($model, 'old_media');
$images = Yii::app()->request->baseUrl . '/public/page/' . $model->old_media;
?>
<div class="clearfix">
<?php
echo $form->labelEx($model, 'old_media');
?>
<div class="desc">
<img src="<?php
echo Utility::getTimThumb($images, 320, 150, 1);
?>
" alt="">
</div>
</div>
<?php
}
?>
<div class="clearfix">
<?php
echo $form->labelEx($model, 'media');
?>
<div class="desc">
<?php
echo $form->fileField($model, 'media', array('maxlength' => 64));
示例13: explode
?>
<?php
echo $form->error($model, 'url');
?>
<div class="small-px silent">example: http://opensource.ommu.co</div>
</div>
</div>
<?php
if (!$model->isNewRecord) {
$model->old_media = $model->media;
echo $form->hiddenField($model, 'old_media');
if ($model->media != '') {
$resizeSize = explode(',', $model->category_relation->media_size);
$file = Yii::app()->request->baseUrl . '/public/banner/' . $model->old_media;
$media = '<img src="' . Utility::getTimThumb($file, $resizeSize[0], $resizeSize[1], 1) . '" alt="">';
echo '<div class="clearfix">';
echo $form->labelEx($model, 'old_media');
echo '<div class="desc">' . $media . '</div>';
echo '</div>';
}
}
?>
<div class="clearfix">
<?php
echo $form->labelEx($model, 'media');
?>
<div class="desc">
<?php
echo $form->fileField($model, 'media');
示例14: array
<li <?php
echo $val->media_id != 0 ? 'class="solid"' : '';
?>
>
<a href="<?php
echo Yii::app()->createUrl('article/site/view', array('id' => $val->article_id, 't' => Utility::getUrlTitle($val->title)));
?>
" title="<?php
echo $val->title;
?>
">
<?php
if ($val->media_id != 0) {
?>
<img src="<?php
echo Utility::getTimThumb($images, 230, 100, 1);
?>
" alt="<?php
echo $val->title;
?>
" /><?php
}
?>
<?php
echo $val->title;
?>
</a>
</li>
<?php
} else {
?>
示例15: actionAjaxManage
/**
* Creates a new model.
* If creation is successful, the browser will be redirected to the 'view' page.
*/
public function actionAjaxManage($id)
{
$model = AlbumPhoto::getPhoto($id);
$setting = AlbumSetting::model()->findByPk(1, array('select' => 'photo_limit'));
$data = '';
if ($model != null) {
foreach ($model as $key => $val) {
$image = Yii::app()->request->baseUrl . '/public/album/' . $val->album_id . '/' . $val->media;
$url = Yii::app()->controller->createUrl('delete', array('id' => $val->media_id, 'type' => 'admin'));
$urlCover = Yii::app()->controller->createUrl('cover', array('id' => $val->media_id, 'type' => 'admin'));
$data .= '<li>';
if ($val->cover == 0) {
$data .= '<a id="set-cover" href="' . $urlCover . '" title="' . Yii::t('phrase', 'Set Cover') . '">' . Yii::t('phrase', 'Set Cover') . '</a>';
}
$data .= '<a id="set-delete" href="' . $url . '" title="' . Yii::t('phrase', 'Delete Photo') . '">' . Yii::t('phrase', 'Delete Photo') . '</a>';
$data .= '<img src="' . Utility::getTimThumb($image, 320, 250, 1) . '" alt="' . $val->album->title . '" />';
$data .= '</li>';
}
}
if (isset($_GET['replace'])) {
// begin.Upload Button
$album = Albums::getInfo($id);
//$photo_limit
$photo_limit = $setting->photo_limit;
if ($album->cat->default_setting == 0) {
$photo_limit = $model->cat->photo_limit;
}
$class = count($model) == $photo_limit ? 'class="hide"' : '';
$url = Yii::app()->controller->createUrl('ajaxadd', array('id' => $id, 'type' => 'admin'));
$data .= '<li id="upload" ' . $class . '>';
$data .= '<a id="upload-gallery" href="' . $url . '" title="' . Yii::t('phrase', 'Upload Photo') . '">' . Yii::t('phrase', 'Upload Photo') . '</a>';
$data .= '<img src="' . Utility::getTimThumb(Yii::app()->request->baseUrl . '/public/album/album_plus.png', 320, 250, 1) . '" alt="" />';
$data .= '</li>';
// end.Upload Button
}
$data .= '';
$result['data'] = $data;
echo CJSON::encode($result);
}