本文整理汇总了PHP中getCustomImageURL函数的典型用法代码示例。如果您正苦于以下问题:PHP getCustomImageURL函数的具体用法?PHP getCustomImageURL怎么用?PHP getCustomImageURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getCustomImageURL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct(PageInfo $pageInfo, ImagickTaskQueue $taskQueue)
{
$activeCategory = $pageInfo->getCategory();
$activeExample = $pageInfo->getExample();
$this->imageBaseURL = getImageURL($activeCategory, $activeExample);
$this->customImageBaseURL = getCustomImageURL($activeCategory, $activeExample);
$this->imageStatusBaseURL = getImageStatusURL($activeCategory, $activeExample);
$this->taskQueue = $taskQueue;
}
示例2: getCustomImageURL
public function getCustomImageURL(array $extraParams = array())
{
$paramString = '';
$separator = '?';
foreach ($extraParams as $key => $value) {
$paramString .= $separator . $key . "=" . $value;
$separator = '&';
}
return getCustomImageURL($this->activeCategory, $this->activeExample) . $paramString;
}
示例3: js_encode
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++;
}
}
?>
];
</script>
示例4: 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')) {
//.........这里部分代码省略.........
示例5: imageNumber
if (!($personality == 'Slimbox' && !isImagePhoto())) {
// Slimbox does not do video
if (is_null($firstImage)) {
$lastImage = imageNumber();
$firstImage = $lastImage;
} else {
$lastImage++;
}
?>
<!-- Image thumbnails or no flash -->
<div class="image">
<div class="imagethumb">
<?php
$annotate = annotateImage();
if ($personality == 'Slimbox') {
echo "<a href=\"" . htmlspecialchars(getCustomImageURL(550, null)) . "\"";
echo "rel=\"lightbox[" . getAlbumTitle() . "]\"\n";
} else {
echo '<a href="' . htmlspecialchars(getImageLinkURL()) . '"';
}
echo " title=\"" . $annotate . "\">\n";
printImageThumb($annotate);
echo "</a>";
?>
</div>
</div>
<?php
}
}
echo '<div class="clearage"></div>';
if (function_exists('printSlideShowLink') && $personality != 'Smoothgallery') {
示例6: getBareImageTitle
?>
" title="<?php
echo getBareImageTitle();
?>
"><?php
printImageThumb(getAnnotatedImageTitle());
?>
</a>
<?php
} else {
?>
<a name="<?php
echo $_zp_current_image->getFileName();
?>
" class="thumb" href="<?php
echo getCustomImageURL(475, null, null, null, null, null, null, true, null);
?>
" title="<?php
echo getBareImageTitle();
?>
"><?php
printImageThumb(getAnnotatedImageTitle());
?>
</a>
<?php
}
?>
<a rel="zoom" href="<?php
if ($zpgal_cbtarget) {
echo htmlspecialchars(getDefaultSizedImage());
} else {
示例7: getSubalbumsHTML
function getSubalbumsHTML()
{
$numAlbums = $this->getNumAlbums();
if ($numAlbums <= 0 || $this->albumPage >= $this->getFirstImagePage()) {
return '';
}
global $_zp_themeroot, $_zp_gallery, $_zp_current_image, $_zp_current_album;
$w = 318;
$slideshowLink = $this->getSlideshowLink();
$subalbums = "<div id='subalbums'>";
$i = 0;
$albums = $this->getAlbums();
$page = $this->getAlbumPage();
$start = ($page - 1) * getOption('albums_per_page');
$albums = array_slice($albums, $start, getOption('albums_per_page'));
for ($u = 0; $u < count($albums); $u++) {
$a = new Album($_zp_gallery, $albums[$u]);
$thumb = $a->getAlbumThumbImage();
$title = $a->getTitle();
$desc = $a->getDesc();
$customThumb = $thumb->getCustomImage(NULL, 104, 56, 104, 56, NULL, NULL, false);
$subalbums .= "<span class='subalbum' id='subalbum-{$u}' width='104' height='56' >" . "<a href='" . getAlbumURL($a) . "' >" . "<img width='104' height='56' src='{$customThumb}'/></a></span>";
$i++;
}
$m = $i;
$i++;
while ($i <= getOption('albums_per_page')) {
$subalbums .= "<span class='subalbum' id='subalbum-{$i}'>" . "<img width='104' height='56' src='{$_zp_themeroot}/resources/images/opa/bg-b-20.png'/>" . "</span>";
$i++;
}
$subalbums .= "</div>";
$s = ($this->getAlbumPage() - 1) * getOption('albums_per_page');
$batch = $s + 1 . "-" . ($s + $m);
$subalbums = "<div id='subalbum-count' class='count'>" . (isset($slideshowLink) && $this->getNumImages() > 0 ? "<span id='album-slideshow-link' class='unselected'><a href='{$slideshowLink}'>Slideshow</a></span>" : "") . "<span class='selected'>{$batch} / " . $numAlbums . " " . gettext($this->getAlbumTabText($numAlbums)) . "</span>" . ($this->getNumImages() > 0 ? "<span class='unselected last'><a href='" . $this->getImageTabLink() . "'>" . $this->getNumImages() . " " . gettext("images") . "</a></span>" : "<span class='unselected last'>" . $this->getNumImages() . " " . gettext("image") . "</span>") . "</div>" . $subalbums;
if ($this->showRandomImage()) {
$img = $this->getRandomAlbumImage();
$subalbums .= "<div id='random-album-image'>";
$previous = $_zp_current_image;
$_zp_current_image = $img;
$size = getSizeCustomImage(NULL, $w + 2);
$small = getCustomImageURL(NULL, $w + 2);
$width = $img->getWidth();
$height = $img->getHeight();
$ratio = ($w + 2) / $width;
$height = $height * $ratio;
$subalbums .= "<img src='{$small}' width='" . ($w + 2) . "' height='{$height}'/>";
$subalbums .= "<div class='caption'>Random selection</div>";
$subalbums .= "</div>";
$_zp_current_image = $previous;
}
return $subalbums;
}
示例8: while
<?php
echo $prevNext['prev'];
?>
<div id="image-thumb-container">
<?php
$u = 0;
while (next_image()) {
$imageTitle = getImageTitle();
$size = getSizeCustomImage(NULL, 383);
$desc = getImageDesc();
if (!empty($desc)) {
$desc = ThemeUtil::clean($desc);
} else {
$desc = '';
}
ThemeUtil::$script .= "images.push({" . " title: '{$imageTitle}', \n" . " description: '{$desc}', \n" . " location: '" . getCustomImageURL(NULL, 383) . "', \n" . " url: '" . getFullImageURL() . "',\n" . " width: " . $size[0] . ",\n" . " height: " . $size[1] . "\n" . "});\n";
if (isset($_highlight_image) && $_highlight_image == $_zp_current_image->filename) {
ThemeUtil::$script .= "initialImageThumbSelection = {$u}; \n";
}
?>
<div class="image-thumb left opa60 <?php
echo $u % 2 == 0 ? 'even' : 'odd';
?>
">
<img
index="<?php
echo $u;
?>
"
id="img-<?php
echo $u;
示例9: getCustomSizedImageThumbMaxSpace
/**
* Returns a link to a un-cropped custom sized version of the current image within the given height and width dimensions.
* Use for sized thumbnails.
*
* @param int $width width
* @param int $height height
* @return string
*/
function getCustomSizedImageThumbMaxSpace($width, $height)
{
global $_zp_current_image;
if (is_null($_zp_current_image)) {
return false;
}
getMaxSpaceContainer($width, $height, $_zp_current_image, true);
return getCustomImageURL(NULL, $width, $height, NULL, NULL, NULL, NULL, true);
}
示例10: getGeoCoord
/**
* $returns coordinate informations for an image
* @param $image image object
*/
function getGeoCoord($image)
{
global $_zp_current_image;
$result = false;
if (isImageClass($image)) {
$_zp_current_image = $image;
$exif = $_zp_current_image->getMetaData();
if (!empty($exif['EXIFGPSLatitude']) && !empty($exif['EXIFGPSLongitude'])) {
$lat_c = explode('.', str_replace(',', '.', $exif['EXIFGPSLatitude']) . '.0');
$lat_f = round((double) abs($lat_c[0]) + $lat_c[1] / pow(10, strlen($lat_c[1])), 12);
if (strtoupper(@$exif['EXIFGPSLatitudeRef'][0]) == 'S') {
$lat_f = -$lat_f;
}
$long_c = explode('.', str_replace(',', '.', $exif['EXIFGPSLongitude']) . '.0');
$long_f = round((double) abs($long_c[0]) + $long_c[1] / pow(10, strlen($long_c[1])), 12);
if (strtoupper(@$exif['EXIFGPSLongitudeRef'][0]) == 'W') {
$long_f = -$long_f;
}
$thumb = '<a href="javascript:image(\'' . $_zp_current_image->albumname . '\',\'' . $_zp_current_image->filename . '\');"><img src="' . getCustomImageURL(150) . '" /></a>';
$result = array('lat' => $lat_f, 'long' => $long_f, 'title' => $_zp_current_image->getTitle(), 'desc' => $_zp_current_image->getDesc(), 'thumb' => $thumb);
}
}
return $result;
}
示例11: printUserSizeSelectior
/**
* prints the radio button image size selection list
*
* @param string $text text to introduce the radio button list
* @param string $default the default (initial) for the image sizing
* @param array $usersizes an array of sizes which may be choosen.
*/
function printUserSizeSelectior($text = '', $default = NULL, $usersizes = NULL)
{
$size = $width = $height = NULL;
getViewerImageSize($default, $size, $width, $height);
if (!empty($size)) {
$current = $size;
} else {
$current = $width . 'x' . $height;
}
$sizes = array();
if (empty($text)) {
$text = gettext('Select image size');
}
if (is_null($usersizes)) {
$inputs = explode(';', trim(getOption('viewer_size_image_sizes')));
if (!empty($inputs)) {
foreach ($inputs as $size) {
if (!empty($size)) {
$size = str_replace(',', ';', $size) . ';';
$s = $w = $h = NULL;
if (false === eval($size)) {
trigger_error(gettext('There is a format error in your <em>viewer_size_image_sizes</em> option string.'), E_USER_NOTICE);
}
if (!empty($s)) {
$key = $s;
} else {
$key = $w . 'x' . $h;
}
$sizes[$key] = array('$s' => $s, '$h' => $h, '$w' => $w);
}
}
}
} else {
foreach ($usersizes as $key => $size) {
if (!empty($size)) {
$size = str_replace(',', ';', $size) . ';';
$s = $w = $h = NULL;
if (false === eval($size)) {
trigger_error(gettext('There is a format error in your $usersizes string.'), E_USER_NOTICE);
}
if (!empty($s)) {
$key = $s;
} else {
$key = $w . 'x' . $h;
}
$sizes[$key] = array('$s' => $s, '$h' => $h, '$w' => $w);
}
}
}
$cookiepath = WEBPATH;
if (WEBPATH == '') {
$cookiepath = '/';
}
?>
<script>
function switchimage(obj){
var url = $(obj).attr('url');
$('#image img').attr('src',url);
document.cookie='viewer_size_image_saved='+$(obj).attr('value')+'; expires=<?php
echo time() + COOKIE_PESISTENCE;
?>
; path=<?php
echo $cookiepath;
?>
;';
console.log(document.cookie);
}
</script>
<div>
<?php
echo $text;
foreach ($sizes as $key => $size) {
if (empty($size['$s'])) {
$display = sprintf(gettext('%1$s x %2$s px'), $size['$w'], $size['$h']);
$url = getCustomImageURL(null, $size['$w'], $size['$h'], null, null, null, null, false);
$value = '$h=' . $size['$h'] . ',$w=' . $size['$w'];
} else {
$display = sprintf(gettext('%s px'), $size['$s']);
$url = getCustomImageURL($size['$s'], null, null, null, null, null, null, false);
$value = '$s=' . $size['$s'];
}
$checked = "";
if ($key == $current) {
$checked = 'checked="CHECKED" ';
}
?>
<input type="radio" name="viewer_size_image_selection" id="s<?php
echo $key;
?>
" url="<?php
echo $url;
?>
" value="<?php
//.........这里部分代码省略.........
示例12: while
<?php
while (next_image()) {
?>
<li id="<?php
echo ' image-' . $_zp_current_image->getID();
?>
" class="image">
<a title="<?php
echo html_encode(getImageTitle());
?>
" href="<?php
echo getImageURL();
?>
">
<img src="<?php
echo getCustomImageURL(298, NULL, NULL, 298, 178, NULL, NULL, true);
?>
" alt="<?php
echo html_encode(getAlbumTitle());
?>
" />
</a>
</li>
<?php
}
?>
</div>
</ul>
</div>
<div id="rightbox">
<div class="data">
示例13: getGeoCoord
}
?>
<!-- Image thumbnails or no flash -->
<div class="image">
<div class="imagethumb">
<?php
if ($map) {
$coord = getGeoCoord($_zp_current_image);
if ($coord) {
$coord['desc'] = '<p align=center>' . $coord['desc'] . '</p>';
$points[] = $coord;
}
}
$annotate = annotateImage();
if ($personality == 'Slimbox') {
echo "<a href=\"" . html_encode(getCustomImageURL(550, null)) . "\"";
echo "rel=\"lightbox[" . getAlbumTitle() . "]\"\n";
} else {
echo '<a href="' . html_encode(getImageLinkURL()) . '"';
}
echo " title=\"" . $annotate . "\">\n";
printImageThumb($annotate);
echo "</a>";
?>
</div>
</div>
<?php
}
}
echo '<div class="clearage"></div>';
if (!empty($points) && map) {
示例14: list
list($nw, $nh) = getSizeCustomImage(null, $mw);
$iw = $nw;
$ih = null;
}
}
/*
echo 'o: ' . getFullWidth() . 'x' . getFullHeight() . "<br />\n";
echo 'i: ' . $iw . 'x' . $ih . "<br />\n";
echo 'm: ' . $mw . 'x' . $mh . "<br />\n";
echo 'n: ' . $nw . 'x' . $nh . "<br />\n";
*/
}
list($imgw, $imgh) = getSizeCustomImage(null, $iw, $ih);
?>
<img src="<?php
echo getCustomImageURL(null, $iw, $ih);
?>
"
alt="<?php
echo getImageTitle();
?>
"
width="<?php
echo $imgw;
?>
" height="<?php
echo $imgh;
?>
" /></a>
</div>
</div>
示例15: printUserSizeSelector
//.........这里部分代码省略.........
// radio buttons
?>
function switchimage(obj) {
var url = $(obj).attr('url');
var w = $(obj).attr('im_w');
var h = $(obj).attr('im_h');
$('#image img').attr('width', w);
$('#image img').attr('height', h);
$('#image img').attr('src', url);
document.cookie = 'viewer_size_image_saved=' + $(obj).attr('value') + '; expires=<?php
echo date('Y-m-d H:i:s', time() + COOKIE_PESISTENCE);
?>
; path=<?php
echo $cookiepath;
?>
';
}
<?php
}
?>
// ]]> -->
</script>
<div>
<?php
echo $text;
if ($selector) {
?>
<select id="viewer_size_image_selection" name="viewer_size_image_selection" onchange="switchselection();" >
<?php
}
foreach ($sizes as $key => $size) {
if (empty($size['$s'])) {
$display = sprintf(gettext('%1$s x %2$s px'), $size['$w'], $size['$h']);
$url = getCustomImageURL(null, $size['$w'], $size['$h'], null, null, null, null, false);
$value = '$h=' . $size['$h'] . ',$w=' . $size['$w'];
$dims = array($size['$w'], $size['$h']);
} else {
$dims = getSizeCustomImage($size['$s']);
$display = sprintf(gettext('%s px'), $size['$s']);
$url = getCustomImageURL($size['$s'], null, null, null, null, null, null, false);
$value = '$s=' . $size['$s'];
}
if ($selector) {
$selected = '';
if ($key == $current) {
$selected = ' selected="selected"';
}
?>
<option id="s<?php
echo $key;
?>
" value="<?php
echo $value . ':' . implode(':', $dims) . ':' . $url;
?>
"<?php
echo $selected;
?>
/>
<?php
echo $display;
?>
</option>
<?php
} else {
$checked = "";
if ($key == $current) {