本文整理汇总了PHP中photo::img_dimensions方法的典型用法代码示例。如果您正苦于以下问题:PHP photo::img_dimensions方法的具体用法?PHP photo::img_dimensions怎么用?PHP photo::img_dimensions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类photo
的用法示例。
在下文中一共展示了photo::img_dimensions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: t
echo $item->url();
?>
">
<?php
if ($item->has_thumb()) {
?>
<img src="<?php
echo $item->thumb_url();
?>
"
alt="<?php
echo html::purify($item->title)->for_html_attr();
?>
"
<?php
echo photo::img_dimensions($item->thumb_width, $item->thumb_height, 75);
?>
/>
<?php
} else {
?>
<?php
echo t("No thumbnail");
?>
<?php
}
?>
</a>
</div>
</div>
<p><?php
示例2: t
if ($photo->id == $item->id) {
$navcar_size_addition = 10;
} else {
$navcar_size_addition = 0;
}
if ($no_resize) {
$navcar_divsize = "style=\"width: " . ($thumbsize + $navcar_size_addition) . "px; height: " . ($thumbsize + $navcar_size_addition) . "px;\"";
if ($photo->width > $photo->height) {
$navcar_thumbsize = "height=\"" . ($thumbsize + $navcar_size_addition) . "\"";
} else {
$navcar_thumbsize = "width=\"" . ($thumbsize + $navcar_size_addition) . "\"";
}
} else {
$navcar_divsize = "";
if ($maintain_aspect) {
$navcar_thumbsize = photo::img_dimensions($photo->width, $photo->height, $thumbsize + $navcar_size_addition);
} else {
$navcar_thumbsize = "width=\"" . ($thumbsize + $navcar_size_addition) . "\" height=\"" . ($thumbsize + $navcar_size_addition) . "\"";
}
}
if ($no_ajax) {
if (module::get_var("navcarousel", "nomouseover", false)) {
$img_title = "";
} else {
$img_title = " title=\"" . html::purify($photo->title)->for_html_attr() . " (" . $parent->get_position($photo) . t("%position of %total", array("position" => "", "total" => $totalitems)) . ")\"";
}
if ($item->id == $photo->id) {
echo "<li><div class=\"g-button ui-corner-all ui-icon-left ui-state-hover carousel-current\" " . $navcar_divsize . "><div style=\"width: 100%; height: 100%; overflow: hidden;\"><img src=\"" . $photo->thumb_url() . "\" alt=\"" . html::purify($photo->title)->for_html_attr() . "\"" . $img_title . " " . $navcar_thumbsize . " /></div></div></li>\n";
} else {
echo "<li><div class=\"g-button ui-corner-all ui-icon-left ui-state-default carousel-thumbnail\" " . $navcar_divsize . "><div style=\"width: 100%; height: 100%; overflow: hidden;\"><a href=\"" . $photo->abs_url() . "\"><img src=\"" . $photo->thumb_url() . "\" alt=\"" . html::purify($photo->title)->for_html_attr() . "\"" . $img_title . " " . $navcar_thumbsize . " /></a></div></div></li>\n";
}
示例3: defined
<?php
defined("SYSPATH") or die("No direct script access.");
?>
<p>
Recent photos added to your Gallery
</p>
<? foreach ($photos as $photo): ?>
<a href="<?php
echo url::site("photos/{$photo->id}");
?>
" title="<?php
echo $photo->title;
?>
">
<img <?php
echo photo::img_dimensions($photo->width, $photo->height, 72);
?>
src="<?php
echo $photo->thumb_url();
?>
" alt="<?php
echo $photo->title;
?>
" />
</a>
<? endforeach ?>
示例4: foreach
<a href="#" class="prev"> </a>
<div class="jCarouselLite">
<ul>
<?php
foreach ($items as $photo) {
?>
<li class="g-item g-photo">
<a href="<?php
echo $photo->url();
?>
" title="<?php
echo html::purify($photo->title)->for_html_attr();
?>
">
<img <?php
echo photo::img_dimensions($photo->thumb_width, $photo->thumb_height, 100);
?>
src="<?php
echo $photo->thumb_url();
?>
" alt="<?php
echo html::purify($photo->title)->for_html_attr();
?>
" />
</a>
</li>
<?php
}
?>
</ul>
</div>