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


PHP isImagePhoto函数代码示例

本文整理汇总了PHP中isImagePhoto函数的典型用法代码示例。如果您正苦于以下问题:PHP isImagePhoto函数的具体用法?PHP isImagePhoto怎么用?PHP isImagePhoto使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了isImagePhoto函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: edit_crop_image

function edit_crop_image($output, $image, $prefix, $subpage, $tagsort)
{
    $album = $image->getAlbum();
    $albumname = $album->name;
    $imagename = $image->filename;
    if (isImagePhoto($image)) {
        $output .= '<p class="buttons" >' . "\n" . '<a href="' . WEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/crop_image.php?a=' . pathurlencode($albumname) . "\n" . '&amp;i=' . urlencode($imagename) . '&amp;performcrop=backend&amp;subpage=' . $subpage . '&amp;tagsort=' . $tagsort . '">' . "\n" . '<img src="images/shape_handles.png" alt="" />' . gettext("Crop image") . '</a>' . "\n" . '</p>' . "\n" . '<span style="line-height: 0em;"><br clear="all" /></span>' . "\n";
    }
    return $output;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:10,代码来源:crop_image.php

示例2: edit

 static function edit($output, $image, $prefix, $subpage, $tagsort)
 {
     if (isImagePhoto($image)) {
         if (is_array($image->filename)) {
             $albumname = dirname($image->filename['source']);
             $imagename = basename($image->filename['source']);
         } else {
             $albumname = $image->albumlink;
             $imagename = $image->filename;
         }
         $output .= '<div class="button buttons tooltip" title="' . gettext('Permanently crop the actual image.') . '">' . "\n" . '<a href="' . WEBPATH . "/" . ZENFOLDER . '/' . PLUGIN_FOLDER . '/crop_image.php?a=' . pathurlencode($albumname) . "\n" . '&amp;i=' . urlencode($imagename) . '&amp;performcrop=backend&amp;subpage=' . $subpage . '&amp;tagsort=' . html_encode($tagsort) . '">' . "\n" . '<img src="images/shape_handles.png" alt="" />' . gettext("Crop image") . '</a>' . "\n" . '<br class="clearall" />' . '</div>' . "\n";
     }
     return $output;
 }
开发者ID:rb26,项目名称:zenphoto,代码行数:14,代码来源:crop_image.php

示例3: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $points;
        ?>
		<!-- Colorbox section -->
		<div id="images">
			<?php 
        $points = array();
        while (next_image()) {
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            ?>
				<div class="image">
					<div class="imagethumb">
						<?php 
            if (isImagePhoto()) {
                // colorbox is only for real images
                $link = html_encode(getDefaultSizedImage()) . '" class="thickbox"';
            } else {
                $link = html_encode(getImageURL()) . '"';
            }
            ?>
						<a href="<?php 
            echo $link;
            ?>
" title="<?php 
            echo getBareImageTitle();
            ?>
">
							<?php 
            printImageThumb(getImageTitle());
            ?>
						</a></div>
				</div>
				<?php 
        }
        ?>
		</div>
		<br class="clearall" />
		<?php 
        @call_user_func('printSlideShowLink');
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:46,代码来源:functions.php

示例4: loadAlbum

function loadAlbum($album)
{
    global $gallery, $_zp_current_album, $_zp_current_image;
    $subalbums = $album->getSubAlbums();
    $count = 0;
    foreach ($subalbums as $folder) {
        $subalbum = new Album($gallery, $folder);
        $count = $count + loadAlbum($subalbum);
    }
    $_zp_current_album = $album;
    if (getNumImages() > 0) {
        echo "<br />" . $album->name . "{";
        while (next_image(true)) {
            if (isImagePhoto($_zp_current_image)) {
                echo '<img src="' . getImageThumb() . '" height="8" width="8" /> | <img src="' . getDefaultSizedImage() . '" height="20" width="20" />' . "\n";
            } else {
                echo '<img src="' . getImageThumb() . '" height="8" width="8" /> | ';
            }
            $count++;
        }
        echo "}<br/>\n";
    }
    return $count;
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:24,代码来源:admin-cache-images.php

示例5: html_encode

                        ?>
&amp;tagsort=<?php 
                        echo html_encode($tagsort);
                        ?>
&amp;XSRFToken=<?php 
                        echo getXSRFToken('imagemetadata');
                        ?>
" >
																		<img src="images/cache.png" alt="" /><?php 
                        echo gettext("Refresh Metadata");
                        ?>
																	</a>
																	<br class="clearall" />
																</div>
																<?php 
                        if (isImagePhoto($image) || !is_null($image->objectsThumb)) {
                            ?>
																	<div class="button buttons tooltip" title="<?php 
                            printf(gettext('crop %s'), $image->filename);
                            ?>
">
																		<a href="admin-thumbcrop.php?a=<?php 
                            echo html_encode(pathurlencode($album->name));
                            ?>
&amp;i=<?php 
                            echo urlencode($image->filename);
                            ?>
&amp;subpage=<?php 
                            echo $pagenum;
                            ?>
&amp;tagsort=<?php 
开发者ID:JoniWeiss,项目名称:JoniWebGirl,代码行数:31,代码来源:admin-edit.php

示例6: getNewsContent

/**
 * Gets the content of a news article
 *
 * If using the CombiNews feature this returns the description for gallery items (see printNewsContent for more)
 *
 * @param int $shorten The optional length of the content for the news list for example, will override the plugin option setting if set, "" (empty) for full content (not used for image descriptions!)
 * @param string $shortenindicator The placeholder to mark the shortening (e.g."(...)"). If empty the Zenpage option for this is used.
 * @param string $readmore The text for the "read more" link. If empty the term set in Zenpage option is used.
 *
 * @return string
 */
function getNewsContent($shorten = false, $shortenindicator = NULL, $readmore = NULL)
{
    global $_zp_flash_player, $_zp_current_image, $_zp_gallery, $_zp_current_zenpage_news, $_zp_page;
    $newstype = getNewsType();
    switch ($newstype) {
        case 'news':
            if (!$_zp_current_zenpage_news->checkAccess()) {
                return '<p>' . gettext('<em>This article belongs to a protected category.</em>') . '</p>';
            }
            break;
        case 'image':
            $album = getNewsAlbumName();
            $albumobj = new Album($_zp_gallery, $album);
            if (!$albumobj->checkAccess()) {
                return '<p>' . gettext('<em>This entry belongs to a protected album.</em>') . '</p>';
            }
            break;
        case 'album':
            if (!$_zp_current_zenpage_news->checkAccess()) {
                return '<p>' . gettext('<em>This entry belongs to a protected album.</em>') . '</p>';
            }
            break;
    }
    $excerptbreak = false;
    if (!$shorten && !is_NewsArticle()) {
        $shorten = ZP_SHORTEN_LENGTH;
    }
    $articlecontent = "";
    $size = ZP_CN_IMAGESIZE;
    $width = ZP_CN_THUMBWIDTH;
    $height = ZP_CN_THUMBHEIGHT;
    $cropwidth = ZP_CN_CROPWIDTH;
    $cropheight = ZP_CN_CROPHEIGHT;
    $cropx = ZP_CN_CROPX;
    $cropy = ZP_CN_CROPY;
    $mode = ZP_CN_MODE;
    switch ($newstype) {
        case 'news':
            $articlecontent = $_zp_current_zenpage_news->getContent();
            if (!is_NewsArticle()) {
                $articlecontent = getContentShorten($articlecontent, $shorten, $shortenindicator, $readmore, getNewsURL($_zp_current_zenpage_news->getTitlelink()));
            }
            break;
        case 'image':
            switch ($mode) {
                case 'latestimages-sizedimage':
                    if (isImagePhoto($_zp_current_zenpage_news)) {
                        $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '">';
                        $articlecontent .= '<img src="' . html_encode($_zp_current_zenpage_news->getSizedImage($size)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" />';
                        $articlecontent .= '</a>';
                    } else {
                        if (isImageVideo($_zp_current_zenpage_news)) {
                            $articlecontent .= $_zp_current_zenpage_news->getSizedImage($size);
                        } else {
                            $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '">';
                            $articlecontent .= '<img src="' . html_encode($_zp_current_zenpage_news->getCustomImage($size, NULL, NULL, NULL, NULL, NULL, NULL, true)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" />';
                            $articlecontent .= '</a>';
                        }
                    }
                    break;
                case 'latestimages-thumbnail':
                    $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($_zp_current_zenpage_news->getThumb()) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>';
                    break;
                case 'latestimages-thumbnail-customcrop':
                    if (isImagePhoto($_zp_current_zenpage_news)) {
                        $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($_zp_current_zenpage_news->getCustomImage(NULL, $width, $height, $cropwidth, $cropheight, $cropx, $cropy)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>';
                    } else {
                        $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($_zp_current_zenpage_news->getCustomImage(NULL, $width, $height, $cropwidth, $cropheight, $cropx, $cropy, true)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>';
                    }
                    break;
            }
            $articlecontent .= getContentShorten($_zp_current_zenpage_news->getDesc(), $shorten, $shortenindicator, $readmore, $_zp_current_zenpage_news->getImageLink());
            break;
        case 'video':
            $articlecontent = getNewsVideoContent($_zp_current_zenpage_news, $shorten);
            break;
        case 'album':
            $_zp_page = 1;
            $albumdesc = getContentShorten($_zp_current_zenpage_news->getDesc(), $shorten, $shortenindicator, $readmore, $_zp_current_zenpage_news->getAlbumLink());
            $albumthumbobj = $_zp_current_zenpage_news->getAlbumThumbImage();
            switch ($mode) {
                case 'latestalbums-sizedimage':
                    if (isImagePhoto($albumthumbobj)) {
                        $imgurl = html_encode($albumthumbobj->getSizedImage($size));
                    } else {
                        $imgurl = html_encode($albumthumbobj->getCustomImage($size, NULL, NULL, NULL, NULL, NULL, NULL, true));
                    }
                    $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getAlbumLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . $imgurl . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>' . $albumdesc;
                    break;
//.........这里部分代码省略.........
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:101,代码来源:zenpage-template-functions.php

示例7: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $points;
        ?>
		<!-- Colorbox section -->
		<div id="content">
			<div id="main">
				<div id="images">
					<?php 
        $points = array();
        $firstImage = null;
        $lastImage = null;
        while (next_image()) {
            // Colorbox does not do video
            if (is_null($firstImage)) {
                $lastImage = imageNumber();
                $firstImage = $lastImage;
            } else {
                $lastImage++;
            }
            ?>
						<div class="image">
							<div class="imagethumb">
								<?php 
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            $annotate = annotateImage();
            if (isImagePhoto()) {
                // colorbox is only for real images
                echo '<a href="' . html_encode(getDefaultSizedImage()) . '" class="thickbox"';
            } else {
                echo '<a href="' . html_encode(getImageURL()) . '"';
            }
            echo " title=\"" . $annotate . "\">\n";
            printImageThumb($annotate);
            echo "</a>";
            ?>
							</div>
						</div>
						<?php 
        }
        echo '<div class="clearage"></div>';
        if (!empty($points) && $map) {
            function map_callback($map)
            {
                global $points;
                foreach ($points as $coord) {
                    addGeoCoord($map, $coord);
                }
            }
            ?>
						<div id="map_link">
						<?php 
            printGoogleMap(NULL, NULL, NULL, 'album_page', 'map_callback');
            ?>
						</div>
						<?php 
        }
        @call_user_func('printSlideShowLink', NULL, 'text-align:center;');
        ?>
				</div><!-- images -->
			<?php 
        @call_user_func('printRating');
        ?>
			</div><!-- main -->
			<div class="clearage"></div>
		<?php 
        if (isset($firstImage)) {
            printNofM('Photo', $firstImage, $lastImage, getNumImages());
        }
        ?>
		</div><!-- content -->
		<?php 
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:78,代码来源:functions.php

示例8: printCustomSizedImage

/**
 * Print normal video or custom sized images.
 * Note: a class of 'not_visible' or 'password_protected' will be added as appropriate
 *
 * Notes on cropping:
 *
 * The $crop* parameters determine the portion of the original image that will be incorporated
 * into the final image. The w and h "sizes" are typically proportional. That is you can set them to
 * values that reflect the ratio of width to height that you want for the final image. Typically
 * you would set them to the fincal height and width.
 *
 * @param string $alt Alt text for the url
 * @param int $size size
 * @param int $width width
 * @param int $height height
 * @param int $cropw crop width
 * @param int $croph crop height
 * @param int $cropx crop x axis
 * @param int $cropy crop y axis
 * @param string $class Optional style class
 * @param string $id Optional style id
 * @param bool $thumbStandin set to true to treat as thumbnail
 * @param bool $effects image effects (e.g. set gray to force grayscale)
 * */
function printCustomSizedImage($alt, $size, $width = NULL, $height = NULL, $cropw = NULL, $croph = NULL, $cropx = NULL, $cropy = NULL, $class = NULL, $id = NULL, $thumbStandin = false, $effects = NULL)
{
    global $_zp_current_image;
    if (is_null($_zp_current_image)) {
        return;
    }
    if (!$_zp_current_image->getShow()) {
        $class .= " not_visible";
    }
    $album = $_zp_current_image->getAlbum();
    $pwd = $album->getPassword();
    if (!empty($pwd)) {
        $class .= " password_protected";
    }
    if ($size) {
        $dims = getSizeCustomImage($size);
        $sizing = ' width="' . $dims[0] . '" height="' . $dims[1] . '"';
    } else {
        $sizing = '';
        if ($width) {
            $sizing .= ' width="' . $width . '"';
        }
        if ($height) {
            $sizing .= ' height="' . $height . '"';
        }
    }
    if ($id) {
        $id = ' id="' . $id . '"';
    }
    if ($class) {
        $id .= ' class="' . $class . '"';
    }
    if (isImagePhoto() || $thumbStandin) {
        $html = '<img src="' . html_encode(getCustomImageURL($size, $width, $height, $cropw, $croph, $cropx, $cropy, $thumbStandin, $effects)) . '"' . ' alt="' . html_encode($alt) . '"' . $id . $sizing . ' />';
        $html = zp_apply_filter('custom_image_html', $html, $thumbStandin);
        echo $html;
    } else {
        // better be a plugin
        echo $_zp_current_image->getBody($width, $height);
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:65,代码来源:template-functions.php

示例9: filterImageQuery

/**
 *
 * performs a query and then filters out "illegal" images returning the first "good" image
 * used by the random image functions.
 *
 * @param object $result query result
 * @param string $source album object if this is search within the album
 */
function filterImageQuery($result, $source)
{
    if ($result) {
        while ($row = db_fetch_assoc($result)) {
            $image = newImage(null, $row);
            $album = $image->album;
            if ($album->name == $source || $album->checkAccess()) {
                if (isImagePhoto($image)) {
                    if ($image->checkAccess()) {
                        return $image;
                    }
                }
            }
        }
        db_free_result($result);
    }
    return NULL;
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:26,代码来源:template-functions.php

示例10: htmlspecialchars

if (hasNextImage()) {
    ?>
<a href="<?php 
    echo htmlspecialchars(getNextImageURL());
    ?>
">Next</a><?php 
} else {
    ?>
<span>Next</span><?php 
}
?>
</li>
				</ul>
			</div>
			<?php 
if (isImagePhoto() && extensionEnabled('colorbox_js') && zp_has_filter('theme_head', 'colorbox::css')) {
    $imgURL = getFullImageURL();
    $boxclass = " class=\"fullimage\"";
    $cb = true;
} else {
    $cb = false;
}
?>
			<div id="content" class="c">
				<div class="view c">
					<?php 
if ($cb == true) {
    ?>
						<a href="<?php 
    echo html_encode($imgURL);
    ?>
开发者ID:kokyandrei,项目名称:Unsupported,代码行数:31,代码来源:image.php

示例11: pathurlencode

        ?>
/admin-edit.php?page=edit&amp;album=<?php 
        echo pathurlencode($album->name);
        ?>
&amp;image=<?php 
        echo urlencode($image->filename);
        ?>
&amp;tab=imageinfo#IT" title="<?php 
        echo gettext('edit');
        ?>
"><img src="<?php 
        echo WEBPATH . '/' . ZENFOLDER;
        ?>
/images/pencil.png" alt=""></a>
										<?php 
        if (isImagePhoto($image)) {
            ?>
											<a href="<?php 
            echo html_encode(pathurlencode($image->getFullImageURL()));
            ?>
" class="colorbox" title="zoom"><img src="<?php 
            echo WEBPATH . '/' . ZENFOLDER;
            ?>
/images/magnify.png" alt=""></a>
											<?php 
        }
        ?>
									</p>
									<?php 
    }
    ?>
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:31,代码来源:admin-albumsort.php

示例12: html_encode

            ?>
" title="<?php 
            echo html_encode($obj->getTitle());
            ?>
">
								<img src="<?php 
            echo html_encode(pathurlencode($thumburl));
            ?>
" alt="<?php 
            echo html_encode($obj->getTitle());
            ?>
" />
							</a>
							<div class="caption caption-image">
								<?php 
            if (isImagePhoto($obj)) {
                ?>
								<a class="swipebox image-zoom" title="<?php 
                echo html_encode('<a href="' . $obj->getLink() . '">' . $obj->getTitle() . '</a>');
                ?>
" href="<?php 
                echo html_encode($obj->getSizedImage(getOption('image_size')));
                ?>
"><i class="fa fa-search-plus fa-lg"></i></a>
								<?php 
            }
            ?>
								<?php 
            if (function_exists('getCommentCount')) {
                if ($obj->getCommentsAllowed() && $obj->getCommentCount() > 0) {
                    ?>
开发者ID:ckfreeman,项目名称:libratus,代码行数:31,代码来源:image.php

示例13: printRSSHeaderLink

?>
/js/rememberMe.js"></script>
	<script type="text/javascript" src="<?php 
echo $_zp_themeroot;
?>
/js/comments.js"></script>
	<script type="text/javascript" src="<?php 
echo FULLWEBPATH . "/" . ZENFOLDER;
?>
/js/thickbox.js"></script>
	<?php 
printRSSHeaderLink('Gallery', 'Gallery RSS');
setOption('thumb_crop_width', 85, false);
setOption('thumb_crop_height', 85, false);
setOption('images_per_page', getOption('images_per_page') - 1, false);
if (!isImagePhoto($_zp_current_image)) {
    echo '<style type="text/css"> #prevnext a strong {display:none;}</style>';
}
?>
</head>

<body class="photosolo">
		<?php 
echo getGalleryTitle();
if (getOption('Allow_search')) {
    printSearchForm();
}
?>

		<div id="content" class="v">
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:30,代码来源:image.php

示例14: loadAlbum

function loadAlbum($album)
{
    global $_zp_current_album, $_zp_current_image, $_zp_gallery, $custom, $enabled;
    $subalbums = $album->getAlbums();
    $started = false;
    $tcount = $count = 0;
    foreach ($subalbums as $folder) {
        $subalbum = newAlbum($folder);
        if (!$subalbum->isDynamic()) {
            $tcount = $tcount + loadAlbum($subalbum);
        }
    }
    $theme = $_zp_gallery->getCurrentTheme();
    $id = 0;
    $parent = getUrAlbum($album);
    $albumtheme = $parent->getAlbumTheme();
    if (!empty($albumtheme)) {
        $theme = $albumtheme;
        $id = $parent->getID();
    }
    loadLocalOptions($id, $theme);
    $_zp_current_album = $album;
    if ($album->getNumImages() > 0) {
        echo "<br />" . $album->name . ' ';
        while (next_image(true)) {
            if (isImagePhoto($_zp_current_image)) {
                $countit = 0;
                if (in_array('*', $enabled)) {
                    $uri = getFullImageURL(NULL, 'Protected view');
                    if (strpos($uri, 'full-image.php?') !== false) {
                        if (!($count + $countit)) {
                            echo "{ ";
                        } else {
                            echo ' | ';
                        }
                        $countit = 1;
                        ?>
						<a href="<?php 
                        echo html_encode($uri);
                        ?>
&amp;debug">
							<?php 
                        echo '<img src="' . html_encode(pathurlencode($uri)) . '" height="30" width="30" alt="X" />' . "\n";
                        ?>
						</a>
						<?php 
                    }
                }
                foreach ($custom as $key => $cacheimage) {
                    if (in_array($key, $enabled)) {
                        $size = isset($cacheimage['image_size']) ? $cacheimage['image_size'] : NULL;
                        $width = isset($cacheimage['image_width']) ? $cacheimage['image_width'] : NULL;
                        $height = isset($cacheimage['image_height']) ? $cacheimage['image_height'] : NULL;
                        $thumbstandin = isset($cacheimage['thumb']) ? $cacheimage['thumb'] : NULL;
                        if ($special = $thumbstandin === true) {
                            list($special, $cw, $ch, $cx, $cy) = $_zp_current_image->getThumbCropping($size, $width, $height);
                        }
                        if (!$special) {
                            $cw = isset($cacheimage['crop_width']) ? $cacheimage['crop_width'] : NULL;
                            $ch = isset($cacheimage['crop_height']) ? $cacheimage['crop_height'] : NULL;
                            $cx = isset($cacheimage['crop_x']) ? $cacheimage['crop_x'] : NULL;
                            $cy = isset($cacheimage['crop_y']) ? $cacheimage['crop_y'] : NULL;
                        }
                        $effects = isset($cacheimage['gray']) ? $cacheimage['gray'] : NULL;
                        if (isset($cacheimage['wmk'])) {
                            $passedWM = $cacheimage['wmk'];
                        } else {
                            if ($thumbstandin) {
                                $passedWM = getWatermarkParam($_zp_current_image, WATERMARK_THUMB);
                            } else {
                                $passedWM = getWatermarkParam($_zp_current_image, WATERMARK_IMAGE);
                            }
                        }
                        if (isset($cacheimage['maxspace'])) {
                            getMaxSpaceContainer($width, $height, $_zp_current_image, $thumbstandin);
                        }
                        $args = array($size, $width, $height, $cw, $ch, $cx, $cy, NULL, $thumbstandin, NULL, $thumbstandin, $passedWM, NULL, $effects);
                        $args = getImageParameters($args, $album->name);
                        $uri = getImageURI($args, $album->name, $_zp_current_image->filename, $_zp_current_image->filemtime);
                        if (strpos($uri, 'i.php?') !== false) {
                            if (!($count + $countit)) {
                                echo "{ ";
                            } else {
                                echo ' | ';
                            }
                            $countit = 1;
                            ?>
							<a href="<?php 
                            echo html_encode($uri);
                            ?>
&amp;debug">
								<?php 
                            if ($thumbstandin) {
                                echo '<img src="' . html_encode(pathurlencode($uri)) . '" height="15" width="15" alt="x" />' . "\n";
                            } else {
                                echo '<img src="' . html_encode(pathurlencode($uri)) . '" height="20" width="20" alt="X" />' . "\n";
                            }
                            ?>
							</a>
							<?php 
//.........这里部分代码省略.........
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:101,代码来源:cacheImages.php

示例15: printAlbumStatisticItem

/**
 * A helper function that only prints a item of the loop within printAlbumStatistic()
 * Not for standalone use.
 *
 * @param array $album the array with album objects that getAlbumsStatistic() submitted
 * @param string $option
 * 		"popular" for the most popular albums,
 * 		"latest" for the latest uploaded by id (Discovery)
 * 		"latest-date" for the latest by date
 * 		"latest-mtime" for the latest by mtime
 *   	"latest-publishdate" for the latest by publishdate
 *    "mostrated" for the most voted,
 * 		"toprated" for the best voted
 * 		"latestupdated" for the latest updated
 * 		"random" for random order (yes, strictly no statistical order...)
 * @param bool $showtitle if the album title should be shown
 * @param bool $showdate if the album date should be shown
 * @param bool $showdesc if the album description should be shown
 * @param integer $desclength the length of the description to be shown
 * @param string $showstatistic
 * 		"hitcounter" for showing the hitcounter (views),
 * 		"rating" for rating,
 * 		"rating+hitcounter" for both.
 * @param integer $width the width/cropwidth of the thumb if crop=true else $width is longest size. (Default 85px)
 * @param integer $height the height/cropheight of the thumb if crop=true else not used.  (Default 85px)
 * @param bool $crop 'true' (default) if the thumb should be cropped, 'false' if not
 * @param bool $firstimglink 'false' (default) if the album thumb link should lead to the album page, 'true' if to the first image of theh album if the album itself has images
 * @param bool $collection only if $albumfolder is set: true if you want to get statistics to include all subalbum levels
 */
function printAlbumStatisticItem($album, $option, $showtitle = false, $showdate = false, $showdesc = false, $desclength = 40, $showstatistic = '', $width = NULL, $height = NULL, $crop = NULL, $firstimglink = false)
{
    global $_zp_gallery;
    $twidth = $width;
    $theight = $height;
    if (is_null($crop) && is_null($width) && is_null($height)) {
        $crop = 2;
    } else {
        if (is_null($width)) {
            $width = 85;
        }
        if (is_null($height)) {
            $height = 85;
        }
        if (is_null($crop)) {
            $crop = 1;
        } else {
            $crop = (int) $crop && true;
        }
    }
    $tempalbum = $album;
    if ($firstimglink && ($tempimage = $tempalbum->getImage(0))) {
        $albumpath = $tempimage->getLink();
    } else {
        $albumpath = $tempalbum->getLink();
    }
    echo "<li><a href=\"" . $albumpath . "\" title=\"" . html_encode($tempalbum->getTitle()) . "\">\n";
    $albumthumb = $tempalbum->getAlbumThumbImage();
    switch ($crop) {
        case 0:
            $sizes = getSizeCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, $albumthumb);
            echo '<img src="' . html_encode(pathurlencode($albumthumb->getCustomImage($width, NULL, NULL, NULL, NULL, NULL, NULL, TRUE))) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . html_encode($albumthumb->getTitle()) . '" /></a>' . "\n";
            break;
        case 1:
            if (isImagePhoto($albumthumb)) {
                $sizes = getSizeCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, $albumthumb);
            } else {
                $sizes[0] = $width;
                $sizes[1] = $height;
            }
            echo '<img src="' . html_encode(pathurlencode($albumthumb->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, TRUE))) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . html_encode($albumthumb->getTitle()) . '" /></a>' . "\n";
            break;
        case 2:
            $sizes = getSizeDefaultThumb($albumthumb);
            echo '<img src="' . html_encode(pathurlencode($albumthumb->getThumb())) . '" width="' . $sizes[0] . '" height="' . $sizes[1] . '" alt="' . html_encode($albumthumb->getTitle()) . '" /></a>' . "\n";
            break;
    }
    if ($showtitle) {
        echo "<h3><a href=\"" . $albumpath . "\" title=\"" . html_encode($tempalbum->getTitle()) . "\">\n";
        echo $tempalbum->getTitle() . "</a></h3>\n";
    }
    if ($showdate) {
        if ($option === "latestupdated") {
            $filechangedate = filectime(ALBUM_FOLDER_SERVERPATH . internalToFilesystem($tempalbum->name));
            $latestimage = query_single_row("SELECT mtime FROM " . prefix('images') . " WHERE albumid = " . $tempalbum->getID() . " AND `show` = 1 ORDER BY id DESC");
            $count = db_count('images', "WHERE albumid = " . $tempalbum->getID() . " AND mtime = " . $latestimage['mtime']);
            echo "<p>" . sprintf(gettext("Last update: %s"), zpFormattedDate(DATE_FORMAT, $filechangedate)) . "</p>";
            if ($count <= 1) {
                $image = gettext("image");
            } else {
                $image = gettext("images");
            }
            echo "<span>" . sprintf(gettext('%1$u new %2$s'), $count, $image) . "</span>";
        } else {
            echo "<p>" . zpFormattedDate(DATE_FORMAT, strtotime($tempalbum->getDateTime())) . "</p>";
        }
    }
    if ($showstatistic === "rating" or $showstatistic === "rating+hitcounter") {
        $votes = $tempalbum->get("total_votes");
        $value = $tempalbum->get("total_value");
        if ($votes != 0) {
//.........这里部分代码省略.........
开发者ID:andrewfandrew,项目名称:ferdinand-miranda,代码行数:101,代码来源:image_album_statistics.php


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