本文整理汇总了PHP中AkrecipesFrontendHelper::resizeImageWidth方法的典型用法代码示例。如果您正苦于以下问题:PHP AkrecipesFrontendHelper::resizeImageWidth方法的具体用法?PHP AkrecipesFrontendHelper::resizeImageWidth怎么用?PHP AkrecipesFrontendHelper::resizeImageWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AkrecipesFrontendHelper
的用法示例。
在下文中一共展示了AkrecipesFrontendHelper::resizeImageWidth方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
" theme="krajee-fa" data-min="0" data-max="5" data-step="1" data-size="xs" data-show-clear="false" data-show-caption="false">
<span id="numvotes"><?php
echo $reviewcount;
?>
votes</span>
</div>
</div>
<div class="row recipe-image">
<?php
// $image = $this->item->image ;
// if (strpos($image, '/') === 0 ) {
// $image = substr($image, 1);
// }
// error_log("Recipe image is -> " . $this->item->image );
$image = AkrecipesFrontendHelper::resizeImageWidth($this->item->image);
//error_log("Recipe image is -> " . $this->item->image );
?>
<img class="img-thumbnail" itemprop="image" style="width:100%;" src="<?php
echo $image;
?>
" alt="<?php
echo $this->item->recipe_name;
?>
" title="<?php
echo $this->item->recipe_name;
?>
" />
<div itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="contentUrl" src="<?php
echo $image;
示例2: defined
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
require_once JPATH_BASE . '/components/com_content/helpers/route.php';
require_once JPATH_COMPONENT . '/helpers/akrecipes.php';
// Get the user object.
$user = JFactory::getUser();
$item = $this->params->get('my_item', null);
$author_url = JRoute::_('index.php?option=com_akrecipes&view=recipesbyuser&task=recipesbyuser.display&id=' . (int) $item->created_by);
$article_url = ContentHelperRoute::getArticleRoute($item->id, $item->catid);
$unpublished = $item->state == 0;
$images = json_decode($item->image);
//error_log("Images --> " . print_r($images,true));
if (isset($images) && isset($images->image_intro)) {
//$image = AkrecipesFrontendHelper::resizeImageToCache($images->image_intro,'XLarge');
$image = AkrecipesFrontendHelper::resizeImageWidth($images->image_intro, 800);
}
?>
<div class="ak_frontpage_article featured <?php
echo $unpublished ? ' system-unpublished ' : '';
?>
" >
<div class="row">
<div class="col-md-12">
<div class="thumbnail">
<a href="<?php
echo $article_url;
?>
" title="<?php
echo $item->title;