当前位置: 首页>>代码示例>>PHP>>正文


PHP photo::img_dimensions方法代码示例

本文整理汇总了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 
开发者ID:estebandito,项目名称:gallery3,代码行数:31,代码来源:admin_comments.html.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";
     }
开发者ID:qboy1987,项目名称:mooiyou,代码行数:31,代码来源:navcarousel.html.php

示例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 ?>
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:27,代码来源:admin_block_photo_stream.html.php

示例4: foreach

    <a href="#" class="prev">&nbsp</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>
开发者ID:webmatter,项目名称:gallery3-contrib,代码行数:31,代码来源:latestupdates_user_profile_carousel.html.php


注:本文中的photo::img_dimensions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。