本文整理匯總了PHP中ImageHandler::getImage方法的典型用法代碼示例。如果您正苦於以下問題:PHP ImageHandler::getImage方法的具體用法?PHP ImageHandler::getImage怎麽用?PHP ImageHandler::getImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ImageHandler
的用法示例。
在下文中一共展示了ImageHandler::getImage方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<div class="clear"></div>
<table class="table table-striped posts-table">
<tr class="table-header">
<th>Post</th>
<th>URL</th>
<th>Active</th>
<th>Actions</th>
@foreach($posts as $post)
<tr>
<td>
<a href="{{ URL::to('post') . '/' . $post->slug }}" target="_blank" class="post-link">
<img src="<?php
echo ImageHandler::getImage($post->image, 'small');
?>
" style="height:100px;" />
<span>{{ TextHelper::shorten($post->title, 80) }}</span>
</a></td>
<td valign="bottom"><p>{{ $post->slug }}</p></td>
<td><p>{{ $post->active }}</p></td>
<td>
<p>
<a href="{{ URL::to('admin/posts/edit') . '/' . $post->id }}" class="btn btn-xs btn-info"><span class="fa fa-edit"></span> Edit</a>
<a href="{{ URL::to('admin/posts/delete') . '/' . $post->id }}" class="btn btn-xs btn-danger delete"><span class="fa fa-trash"></span> Delete</a>
</p>
</td>
</tr>
@endforeach
</table>
示例2: preg_replace
?>
<?php
$post_description = preg_replace('/^\\s+|\\n|\\r|\\s+$/m', '', strip_tags($post->body));
?>
<div class="col-md-3 col-sm-6 col-xs-12">
<article class="block">
<a class="block-thumbnail" href="<?php
echo $settings->enable_https ? secure_url('post') : URL::to('post');
echo '/' . $post->slug;
?>
">
<div class="thumbnail-overlay"></div>
<img src="<?php
echo ImageHandler::getImage($post->image, 'medium');
?>
">
<div class="details">
<h2><?php
echo $post->title;
?>
</h2>
<span><?php
echo TimeHelper::convert_seconds_to_HMS($post->duration);
?>
</span>
</div>
</a>
<div class="block-contents">
<p class="date"><?php
示例3: secure_url
?>
" />
<!-- for Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="<?php
echo $post->title;
?>
" />
<meta name="twitter:description" content="<?php
echo $post_description;
?>
" />
<meta name="twitter:image" content="<?php
echo $settings->enable_https ? secure_url('/') : URL::to('/');
echo ImageHandler::getImage($post->image, 'large');
?>
" />
<?php
} elseif (isset($page->id)) {
?>
<title><?php
echo $page->title . '-' . $settings->website_name;
?>
</title>
<meta name="description" content="<?php
echo $page->title . '-' . $settings->website_name;
?>
">
示例4: date
<?php
include 'includes/header.php';
?>
<div class="container">
<div class="row">
<div class="col-md-8 post">
<div class="post-img">
<img src="<?php
echo ImageHandler::getImage($post->image);
?>
" style="width:100%;" />
<h3><?php
echo $post->title;
?>
</h3>
<h6><?php
if (isset($author->username)) {
echo 'by ' . $author->username;
}
?>
on <?php
echo date("F j, Y, g:i a", strtotime($post->created_at));
?>
</h6>
</div>
示例5: secure_url
?>
>
<div class="bg" style="background-image:url(<?php
echo Config::get('site.uploads_url') . '/images/' . $video->image;
?>
)"><div class="bg-dimmer"></div></div>
<div class="bg-dim-right"></div>
<div class="featured-content">
<div class="row">
<div class="col-md-6 left-featured">
<a href="<?php
echo $settings->enable_https ? secure_url('video') : URL::to('video');
echo '/' . $video->id;
?>
"><img src="<?php
echo ImageHandler::getImage($video->image, 'medium');
?>
" width="100%" class="featured-img" /></a>
</div>
<div class="col-md-6">
<div class="feature-info">
<h2><?php
echo $video->title;
?>
</h2>
<div class="feature_duration"><i class="fa fa-clock-o"></i> <?php
echo TimeHelper::convert_seconds_to_HMS($video->duration);
?>
</div>
<p><?php
echo $video->description;