本文整理汇总了PHP中getDefaultSizedImage函数的典型用法代码示例。如果您正苦于以下问题:PHP getDefaultSizedImage函数的具体用法?PHP getDefaultSizedImage怎么用?PHP getDefaultSizedImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getDefaultSizedImage函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
示例2: 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;
}
示例3: printCustomSizedImage
">
<?php
printCustomSizedImage(getBareImageTitle(), null, 160, 120, 160, 120, null, null, 'thumb', null, true);
?>
</a>
<?php
} else {
?>
<li class="thumb-portrait">
<div class="album-tools-portrait">
<?php
if ($zpfocus_use_colorbox && !isImageVideo()) {
?>
<a class="album-tool" rel="zoom" href="<?php
if ($zpfocus_cbtarget) {
echo htmlspecialchars(getDefaultSizedImage());
} else {
echo htmlspecialchars(getUnprotectedImageURL());
}
?>
" title="<?php
echo getBareImageTitle();
?>
"><img src="<?php
echo $_zp_themeroot;
?>
/images/search.png" alt="Zoom Image" /></a><?php
}
?>
<?php
if (function_exists('printCommentForm') && $_zp_current_image->getCommentsAllowed() && $_zp_current_image->getCommentCount() > 0) {
示例4: 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
}
示例5: printDefaultSizedImage
/**
* Show video player with video loaded or display the image.
*
* @param string $alt Alt text
* @param string $class Optional style class
* @param string $id Optional style id
*/
function printDefaultSizedImage($alt, $class = NULL, $id = 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 (isImagePhoto()) {
//Print images
$html = '<img src="' . html_encode(pathurlencode(getDefaultSizedImage())) . '" alt="' . html_encode($alt) . '"' . ' width="' . getDefaultWidth() . '" height="' . getDefaultHeight() . '"' . ($class ? " class=\"{$class}\"" : "") . ($id ? " id=\"{$id}\"" : "") . " />";
$html = zp_apply_filter('standard_image_html', $html);
echo $html;
} else {
// better be a plugin class then
echo $_zp_current_image->getContent();
}
}
示例6: loadAlbum
function loadAlbum($album)
{
global $gallery, $_zp_current_album, $_zp_current_image;
$subalbums = $album->getAlbums();
$started = false;
$tcount = $count = 0;
foreach ($subalbums as $folder) {
$subalbum = new Album($gallery, $folder);
if (!$subalbum->isDynamic()) {
$tcount = $tcount + loadAlbum($subalbum);
}
}
$theme = $gallery->getCurrentTheme();
$id = 0;
$parent = getUrAlbum($album);
$albumtheme = $parent->getAlbumTheme();
if (!empty($albumtheme)) {
$theme = $albumtheme;
$id = $parent->id;
}
loadLocalOptions($id, $theme);
$_zp_current_album = $album;
if ($album->getNumImages() > 0) {
echo "<br />" . $album->name . ' ';
while (next_image(true)) {
$thumb = getImageThumb();
if (strpos($thumb, 'i.php?') === false) {
$thumb = NULL;
}
if (isImagePhoto($_zp_current_image)) {
$image = getDefaultSizedImage();
if (strpos($image, 'i.php?') === false) {
$image = NULL;
}
} else {
$image = NULL;
if ($_zp_current_image->objectsThumb == NULL) {
$thumb = NULL;
}
}
if (!empty($thumb) || !empty($image)) {
if (!$count) {
$started = true;
echo "{ ";
} else {
echo ' | ';
}
}
if (!empty($thumb)) {
echo '<img src="' . $thumb . '" height="8" width="8" /> ';
}
if (!empty($image)) {
echo ' <img src="' . $image . '" height="20" width="20" />';
}
if (!empty($thumb) || !empty($image)) {
echo "\n";
}
$count++;
}
if ($started) {
echo ' } ';
}
printf(ngettext('[%u image]', '[%u images]', $count), $count);
echo "<br />\n";
}
return $count + $tcount;
}
示例7: html_encode
<li>
<?php
if (isImageVideo()) {
?>
<a class="thumb" href="<?php
echo $_zp_themeroot;
?>
/images/video-placeholder.jpg" title="<?php
echo html_encode(getBareImageTitle());
?>
">
<?php
} else {
?>
<a class="thumb" href="<?php
echo html_encode(getDefaultSizedImage());
?>
" title="<?php
echo html_encode(getBareImageTitle());
?>
">
<?php
}
?>
<?php
printImageThumb(getAnnotatedImageTitle());
?>
</a>
<?php
$fullimage = getFullImageURL();
?>
示例8: js_encode
$desc = $desc1 . $desc2;
echo 'description: \'' . js_encode($desc) . '\',' . "\n";
echo 'link: \'' . html_encode(getAlbumURL()) . '\'' . "\n";
echo '}' . "\n";
$c++;
}
}
while (next_image(true)) {
if (isImagePhoto($_zp_current_image)) {
if ($c == 0) {
echo '{' . "\n";
} else {
echo ',{' . "\n";
}
echo 'thumb: \'' . getImageThumb() . '\',' . "\n";
echo 'image: \'' . getDefaultSizedImage() . '\',' . "\n";
echo 'big: \'' . getCustomImageURL(getOption('zpbase_galbigsize')) . '\',' . "\n";
echo 'title: \'' . html_encode(getBareImageTitle()) . '\',' . "\n";
$desc = getBareImageDesc();
$desc = str_replace("\r\n", '<br />', $desc);
$desc = str_replace("\r", '<br />', $desc);
echo 'description: \'' . js_encode($desc) . '\',' . "\n";
if (!getOption('zpbase_nodetailpage')) {
echo 'link: \'' . html_encode(getImageURL()) . '\'' . "\n";
}
echo '}' . "\n";
$c++;
}
}
?>
];
示例9: printBaseSlideShow
function printBaseSlideShow()
{
global $_zp_gallery, $_zp_gallery_page, $_myFavorites, $_zp_conf_vars, $_zp_themeroot, $isMobile, $isTablet;
if (!isset($_POST['albumid'])) {
return '<div class="errorbox" id="message"><h2>' . gettext('Invalid linking to the slideshow page.') . '</h2></div>';
}
//getting the image to start with
if (!empty($_POST['imagenumber'])) {
$imagenumber = sanitize_numeric($_POST['imagenumber']) - 1;
// slideshows starts with 0, but zp with 1.
} else {
$imagenumber = 0;
}
// set pagenumber to 0 if not called via POST link
if (isset($_POST['pagenr'])) {
$pagenumber = sanitize_numeric($_POST['pagenr']);
} else {
$pagenumber = 1;
}
// getting the number of images
if (!empty($_POST['numberofimages'])) {
$numberofimages = sanitize_numeric($_POST['numberofimages']);
} else {
$numberofimages = 0;
}
//if ($imagenumber < 2 || $imagenumber > $numberofimages) {
// $imagenumber = 0;
//}
//getting the album to show
if (!empty($_POST['albumid'])) {
$albumid = sanitize_numeric($_POST['albumid']);
} else {
$albumid = 0;
}
if (isset($_POST['preserve_search_params'])) {
// search page
$search = new SearchEngine();
$params = sanitize($_POST['preserve_search_params']);
$search->setSearchParams($params);
$searchwords = $search->getSearchWords();
$searchdate = $search->getSearchDate();
$searchfields = $search->getSearchFields(true);
$page = $search->page;
$returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
$albumobj = new AlbumBase(NULL, false);
$albumobj->setTitle(gettext('Search'));
$albumobj->images = $search->getImages(0);
$albumtitle = gettext('Search');
} else {
if (isset($_POST['favorites_page'])) {
$albumobj = $_myFavorites;
$returnpath = rewrite_path($_myFavorites->getLink() . '/' . $pagenumber, FULLWEBPATH . '/index.php?p=favorites' . '&page=' . $pagenumber);
$albumtitle = gettext('Favorites');
} else {
$albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
$albumobj = newAlbum($albumq['folder']);
$albumtitle = $albumobj->getTitle();
if (empty($_POST['imagenumber'])) {
$returnpath = $albumobj->getLink($pagenumber);
} else {
$image = newImage($albumobj, sanitize($_POST['imagefile']));
$returnpath = $image->getLink();
}
}
}
if (!$albumobj->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumobj)) {
return '<div class="errorbox" id="message"><h2>' . gettext('This album is password protected!') . '</h2></div>';
}
$slideshow = '';
$numberofimages = $albumobj->getNumImages();
if ($numberofimages == 0) {
return '<div class="errorbox" id="message"><h2>' . gettext('No images for the slideshow!') . '</h2></div>';
}
$images = $albumobj->getImages(0);
// slideshow generate data for galleria
?>
<script>
var data = [
<?php
for ($c = 0, $idx = 0; $c < $numberofimages; $c++, $idx++) {
if (is_array($images[$idx])) {
$filename = $images[$idx]['filename'];
$album = newAlbum($images[$idx]['folder']);
$image = newImage($album, $filename);
} else {
$filename = $images[$idx];
$image = newImage($albumobj, $filename);
}
if (isImagePhoto($image)) {
makeImageCurrent($image);
echo '{' . "\n";
echo 'thumb: \'' . getImageThumb() . '\',' . "\n";
echo 'image: \'' . getDefaultSizedImage() . '\',' . "\n";
echo 'big: \'' . getCustomImageURL(getOption('zpbase_galbigsize')) . '\',' . "\n";
echo 'title: \'' . js_encode($image->getTitle()) . '\',' . "\n";
$desc = $image->getDesc();
$desc = str_replace("\r\n", '<br />', $desc);
$desc = str_replace("\r", '<br />', $desc);
echo 'description: \'' . js_encode($desc) . '\',' . "\n";
if (!getOption('zpbase_nodetailpage')) {
//.........这里部分代码省略.........
示例10: header
} else {
header('Content-Type: application/xml');
$path = '';
$levels = explode('/', getAlbumLinkURL());
foreach ($levels as $v) {
$path = $path . '../';
}
$path = substr($path, 0, -1);
echo '<?xml version="1.0" encoding="UTF-8"?>
<simpleviewerGallery title="" maxImageWidth="' . $maxImageWidth . '" maxImageHeight="' . $maxImageHeight . '" textColor="' . $textColor . '" frameColor="' . $frameColor . '" frameWidth="' . $frameWidth . '" stagePadding="' . $stagePadding . '" thumbnailColumns="' . $thumbnailColumns . '" thumbnailRows="' . $thumbnailRows . '" navPosition="' . $navPosition . '" enableRightClickOpen="' . $enableRightClickOpen . '" backgroundImagePath="' . $backgroundImagePath . '" imagePath="' . $path . '" thumbPath="' . $path . '">';
while (next_image(true, 0, NULL, NULL, true)) {
if (isImagePhoto()) {
// simpleviewer does not do videos
?>
<image><filename><?php
echo getDefaultSizedImage();
?>
</filename>
<caption>
<![CDATA[<a href="<?php
echo htmlspecialchars(getImageLinkURL());
?>
" title="<?php
echo gettext('Open In New Window');
?>
">
<font face="Times"><u><b><em><?php
echo getImageTitle();
?>
</font></em></b></u></a></u>
<br /></font><?php
示例11: gettext
?>
" data-role="button"><?php
echo gettext("next");
?>
</a>
<?php
}
?>
</div>
<div id="image">
<?php
if (isImagePhoto()) {
?>
<img src="<?php
echo html_encode(pathurlencode(getDefaultSizedImage()));
?>
" alt="<?php
printBareImageTitle();
?>
" style="max-width:<?php
echo getDefaultWidth();
?>
px"/>
<?php
} else {
printDefaultSizedImage(getImageTitle());
}
if (isImageVideo() && getOption('zpmobile_mediadirectlink')) {
?>
<p><a href="<?php
示例12: printDefaultSizedImageAlt
function printDefaultSizedImageAlt($alt, $class = NULL, $id = NULL)
{
echo "<img style=\"filter: alpha(opacity=0); -moz-opacity: 0; -khtml-opacity: 0; opacity: 0;\" onload=\"opacity('fadein', 0, 100, 500)\" id=\"fadein\" src=\"" . getDefaultSizedImage() . "\" alt=\"{$alt}\"" . " width=\"" . getDefaultWidth() . "\" height=\"" . getDefaultHeight() . "\"" . ($class ? " class=\"{$class}\"" : "") . ($id ? " id=\"{$id}\"" : "") . " />";
}
示例13: printDefaultSizedImage
/**
* Show video player with video loaded or display the image.
*
* @param string $alt Alt text
* @param string $class Optional style class
* @param string $id Optional style id
*/
function printDefaultSizedImage($alt, $class = NULL, $id = 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 (zp_loggedin() && !empty($pwd)) {
$class .= " password_protected";
}
if (isImagePhoto()) {
//Print images
echo '<img src="' . htmlspecialchars(getDefaultSizedImage()) . '" alt="' . html_encode($alt) . '"' . ' title="' . html_encode($alt) . '"' . ' width="' . getDefaultWidth() . '" height="' . getDefaultHeight() . '"' . ($class ? " class=\"{$class}\"" : "") . ($id ? " id=\"{$id}\"" : "") . " />";
} else {
// better be a plugin class then
echo $_zp_current_image->getBody();
}
}