本文整理汇总了PHP中yt_placehold函数的典型用法代码示例。如果您正苦于以下问题:PHP yt_placehold函数的具体用法?PHP yt_placehold怎么用?PHP yt_placehold使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yt_placehold函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: yt_placehold
<?php
if ($options->item_image_display == 1) {
?>
<div class="bsn-image">
<a href="<?php
echo $items->image;
?>
" title="" data-rel="prettyPhoto">
<?php
//Create placeholder images
$src = $items->image;
if (file_exists($src)) {
echo "<img src='" . Ytools::resize($items->image, $image_config) . "' alt='" . $items->title . "'/>";
} else {
if ($is_placehold) {
echo yt_placehold($placehold_size['featured_posts']);
}
}
?>
</a>
</div>
<?php
}
?>
<h2>
<a title="<?php
echo $items->title;
?>
" target="<?php
echo $options->item_link_target;
示例2: empty
$imgfloat = empty($images->float_intro) ? $params->get('float_intro') : $images->float_intro;
?>
<?php
// Begin: The way to resize your image.
$templateParams = JFactory::getApplication()->getTemplate(true)->params;
YTTemplateUtils::getImageResizerHelper(array('background' => $templateParams->get('thumbnail_background', '#000'), 'thumbnail_mode' => $templateParams->get('thumbnail_mode', 'fit')));
$imgW = isset($leadingFlag) && $leadingFlag ? $templateParams->get('leading_width', '300') : $templateParams->get('intro_width', '200');
$imgH = isset($leadingFlag) && $leadingFlag ? $templateParams->get('leading_height', '300') : $templateParams->get('intro_height', '200');
$imgsrc = YTTemplateUtils::resize($images->image_intro, $imgW, $imgH);
//Create placeholder items images
$src = $images->image_intro;
if (file_exists(JPATH_BASE . '/' . $src)) {
$thumb_img = '<img src="' . $imgsrc . '" alt="' . $images->image_intro_alt . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['leading']);
}
}
?>
<figure class="pull-<?php
echo htmlspecialchars($imgfloat);
?>
item-image" >
<a class="listingimg" title="<?php
echo htmlspecialchars($images->image_fulltext_alt);
?>
" href="<?php
echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
?>
" >
<?php
示例3: empty
if ($this->params->get('tag_list_show_item_image', 1) == 1 && !empty($images->image_intro)) {
?>
<?php
$imgfloat = empty($images->float_intro) ? 'left' : $images->float_intro;
//$imgfloat = (empty($images->float_fulltext)) ? 'none' :$images->float_fulltext;
$imgW = isset($leadingFlag) && $leadingFlag ? $templateParams->get('leading_width', '870') : $templateParams->get('intro_width', '200');
$imgH = isset($leadingFlag) && $leadingFlag ? $templateParams->get('leading_height', '320') : $templateParams->get('intro_height', '200');
$imgsrc = YTTemplateUtils::resize($images->image_intro, $imgW, $imgH, array($templateParams->get('thumbnail_background', '#ffffff')));
//Create placeholder items images
$src = $images->image_intro;
if (file_exists(JPATH_BASE . '/' . $src)) {
$thumb_img = '<img src="' . $src . '" alt="' . $images->image_intro_alt . '" />';
$full_img = JURI::base() . '/' . htmlspecialchars($images->image_intro);
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['article']);
$full_img = 'http://placehold.it/' . $placehold_size['article'] . '/969696';
}
}
?>
<figure class="pull-<?php
echo htmlspecialchars($imgfloat);
?>
item-image" >
<?php
echo $thumb_img;
?>
</figure>
<?php
}
示例4: yt_placehold
?>
" title="<?php
echo JText::_('K2_CONTINUE_READING');
?>
"<?php
echo K2HelperUtilities::cleanHtml($item->title);
?>
"">
<?php
//Create placeholder items images
$src = $item->image;
if (!empty($src)) {
$thumb_img = '<img src="' . $src . '" alt="' . $item->title . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['k2contentReviews'], $item->title, $item->title);
}
}
echo $thumb_img;
?>
</a>
<?php
}
?>
<?php
if ($params->get('itemCommentsCounter')) {
?>
示例5: yt_placehold
" target="<?php
echo $options->item_link_target;
?>
" href="<?php
echo $items->link;
?>
">
<?php
//Create placeholder images
$src = $items->image;
if (file_exists($src)) {
echo "<img src='" . Ytools::resize($items->image, $image_config) . "' alt='" . $items->title . "'/>";
} else {
if ($is_placehold) {
echo yt_placehold($placehold_size['popular']);
}
}
?>
</a>
</div>
<?php
}
?>
<h2 class="basicnews-title">
<a title="<?php
echo $items->title;
?>
" target="<?php
echo $options->item_link_target;
示例6: isset
if (!empty($this->item->image_caption)) {
echo K2HelperUtilities::cleanHtml($this->item->image_caption);
} else {
echo K2HelperUtilities::cleanHtml($this->item->title);
}
?>
">
<?php
//Create placeholder items images
$src = isset($this->item->image) ? $this->item->image : '';
if (!empty($src)) {
$thumb_img = '<img src="' . $src . '" alt="' . $item->title . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['listing'], $this->item->title, $this->item->title);
}
}
echo $thumb_img;
?>
</a>
</div>
<?php
}
?>
<div class="catItemHeader">
<?php
if ($this->item->params->get('latestItemTitle')) {
?>
示例7: yt_placehold
echo JText::_('K2_CONTINUE_READING');
?>
"<?php
echo K2HelperUtilities::cleanHtml($item->title);
?>
"">
<?php
//Create placeholder items images
if (isset($item->image)) {
$src = $item->image;
}
if (!empty($src)) {
$thumb_img = '<img src="' . $src . '" alt="' . K2HelperUtilities::cleanHtml($item->title) . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['k2_content_featured'], $item->title, $item->title);
}
}
echo $thumb_img;
?>
</a>
<?php
}
?>
<?php
}
?>
示例8: yt_placehold
?>
" target="<?php
echo $options->item_link_target;
?>
" href="<?php
echo $items->link;
?>
">
<?php
//Create placeholder images
$src = $items->image;
if (file_exists($src)) {
echo "<img src='" . Ytools::resize($items->image, $image_config) . "' alt='" . $items->title . "'/>";
} else {
if ($is_placehold) {
echo yt_placehold($placehold_size['video_box']);
}
}
?>
</a>
</div>
<?php
}
?>
<?php
示例9: yt_placehold
if ($commenter->userImage) {
?>
<a class="k2Avatar tcAvatar" rel="author" href="<?php
echo $commenter->link;
?>
">
<?php
if (isset($commenter->userImage)) {
$src = $commenter->userImage;
}
if (!empty($src)) {
$thumb_img = '<img style="width:' . $tcAvatarWidth . 'px;height:auto;" src="' . $src . '" alt="' . JFilterOutput::cleanText($commenter->userName) . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['k2_content_avatar'], $commenter->userName, $commenter->userName);
}
}
echo $thumb_img;
?>
</a>
<?php
}
?>
<?php
if ($params->get('commenterLink')) {
?>
<a class="tcLink" rel="author" href="<?php
echo $commenter->link;
?>
示例10: yt_placehold
echo JText::_('K2_CONTINUE_READING');
?>
"<?php
echo K2HelperUtilities::cleanHtml($item->title);
?>
"">
<?php
//Create placeholder items images
if (isset($item->image)) {
$src = $item->image;
}
if (!empty($src)) {
$thumb_img = '<img src="' . $src . '" alt="' . $item->title . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['small'], $item->title, $item->title);
//var_dump( $thumb_img);
}
}
echo $thumb_img;
?>
</a>
<?php
}
?>
<div class="main">
<?php
if ($params->get('itemTitle')) {
?>
<a class="moduleItemTitle" href="<?php
echo $item->link;
示例11: isset
?>
<?php
// Begin: The way to resize your image.
$templateParams = JFactory::getApplication()->getTemplate(true)->params;
YTTemplateUtils::getImageResizerHelper(array('background' => $templateParams->get('thumbnail_background', '#000'), 'thumbnail_mode' => $templateParams->get('thumbnail_mode', 'fit')));
$imgW = isset($leadingFlag) && $leadingFlag ? $templateParams->get('leading_width', '300') : $templateParams->get('intro_width', '200');
$imgH = isset($leadingFlag) && $leadingFlag ? $templateParams->get('leading_height', '300') : $templateParams->get('intro_height', '200');
//$imgsrc = YTTemplateUtils::resize($images->image_intro, $imgW, $imgH);
$imgsrc = $images->image_intro;
//Create placeholder items images
$src = $images->image_intro;
if (file_exists(JPATH_BASE . '/' . $src) || strpos($src, 'http://') !== false) {
$thumb_img = '<img width="60" src="' . $imgsrc . '" alt="' . $images->image_intro_alt . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['small']);
}
}
?>
<figure class="pull-<?php
echo htmlspecialchars($imgfloat);
?>
item-image" >
<?php
echo $thumb_img;
?>
</figure>
<?php
}
示例12: yt_placehold
echo JText::_('K2_CONTINUE_READING');
?>
"<?php
echo K2HelperUtilities::cleanHtml($item->title);
?>
"">
<?php
//Create placeholder items images
if (isset($item->image)) {
$src = $item->image;
}
if (!empty($src)) {
$thumb_img = '<img src="' . $src . '" alt="' . $item->title . '" />';
} else {
if ($is_placehold) {
$thumb_img = yt_placehold($placehold_size['latest_news'], $item->title, $item->title);
//var_dump( $thumb_img);
}
}
echo $thumb_img;
?>
</a>
<?php
if ($params->get('itemReadMore') && $item->fulltext) {
?>
<a class="moduleItemReadMore" href="<?php
echo $item->link;
?>
">
<?php
echo JText::_('K2_VIEW_MORE');
示例13: yt_placehold
<div class="images-slideshow">
<img alt="<?php
echo $item->displaytitle;
?>
" src="<?php
echo $img;
?>
"/>
</div>
<?php
} else {
$no_image = ' no-images';
echo yt_placehold($placehold_size['slideshow']);
}
?>
<div class="item-content">
<div class="item-content-inner">
<?php
// display title
if ($item->displaytitle != '') {
?>
<h3 class="item-title">
<a href="<?php
echo $item->link;
?>
" title="<?php
示例14: yt_placehold
?>
" target="<?php
echo $options->item_link_target;
?>
" href="<?php
echo $items->link;
?>
">
<?php
//Create placeholder images
$src = $items->image;
if (file_exists($src)) {
echo "<img src='" . Ytools::resize($items->image, $image_config) . "' alt='" . $items->title . "'/>";
} else {
if ($is_placehold) {
echo yt_placehold($placehold_size['latest_news']);
}
}
?>
</a>
<a class="hover-link" href="<?php
echo $items->link;
?>
" target="<?php
echo $options->item_link_target;
?>
">
</a>
</div>
<?php
示例15: yt_placehold
<?php
if ((int) $this->params->get('item_image_display', 1)) {
?>
<div class="img-fulltext pull-none">
<?php
$img = BaseHelper::getArticleImage($item, $_params);
//Create placeholder images
if (isset($img['src'])) {
$src = $img['src'];
}
if (file_exists($src)) {
echo BaseHelper::imageTag($img);
} else {
if ($is_placehold) {
echo yt_placehold($placehold_size['related_items']);
}
}
?>
</div>
<?php
}
?>
<?php
if ((int) $_params->get('item_date_display', 1) == 1) {
?>
<span class="related-item-date"><?php
echo JHtml::date($item->created, 'd.m.Y');
?>