本文整理汇总了PHP中newImage函数的典型用法代码示例。如果您正苦于以下问题:PHP newImage函数的具体用法?PHP newImage怎么用?PHP newImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了newImage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zipAddAlbum
function zipAddAlbum($album, $base, $zip)
{
global $_zp_zip_list, $zip_gallery;
$albumbase = '.' . substr($album->name, $base) . '/';
foreach ($album->sidecars as $suffix) {
$f = $albumbase . $album->name . '.' . $suffix;
if (file_exists($f)) {
$_zp_zip_list[] = $f;
}
}
$images = $album->getImages();
foreach ($images as $imagename) {
$image = newImage($album, $imagename);
$_zp_zip_list[] = $albumbase . $image->filename;
$imagebase = stripSuffix($image->filename);
foreach ($image->sidecars as $suffix) {
$f = $albumbase . $imagebase . '.' . $suffix;
if (file_exists($f)) {
$_zp_zip_list[] = $f;
}
}
}
$albums = $album->getAlbums();
foreach ($albums as $albumname) {
$subalbum = new Album($zip_gallery, $albumname);
if ($subalbum->exists && !$album->isDynamic()) {
zipAddAlbum($subalbum, $base, $zip);
}
}
}
示例2: createImages
static function createImages($rows)
{
$images = array();
foreach ($rows as $r) {
$image = newImage(new Album(new Gallery(), $r['folder']), $r['filename']);
$images[] = $image;
}
return $images;
}
示例3: createImages
static function createImages($rows)
{
global $_zp_gallery;
$images = array();
$g = empty($_zp_gallery) ? new Gallery() : $_zp_gallery;
foreach ($rows as $r) {
$image = newImage(newAlbum($r['folder']), $r['filename']);
$images[] = $image;
}
return $images;
}
示例4: emailApproval
function emailApproval($comment)
{
$owner = NULL;
switch ($comment->getType()) {
case 'albums':
$sql = 'SELECT `folder` FROM ' . prefix('albums') . ' WHERE `id`=' . $comment->getOwnerID();
$row = query_single_row($sql);
if (is_array($row)) {
$owner = new Album(new Gallery(), $row['folder']);
}
break;
case 'images':
$sql = 'SELECT `albumid`, `filename` FROM ' . prefix('images') . ' WHERE `id`=' . $comment->getOwnerID();
$imagerow = query_single_row($sql);
if (is_array($imagerow)) {
$sql = 'SELECT `folder` FROM ' . prefix('albums') . ' WHERE `id`=' . $imagerow['albumid'];
$row = query_single_row($sql);
if (is_array($row)) {
$album = new Album(new Gallery(), $row['folder']);
$owner = newImage($album, $imagerow['filename']);
}
}
break;
case 'news':
$sql = 'SELECT `titlelink` FROM ' . prefix('zenpage_news') . ' WHERE `id`=' . $comment->getOwnerID();
$row = query_single_row($sql);
if (is_array($row)) {
$owner = new ZenpageNews($row['titlelink']);
}
break;
case 'pages':
$sql = 'SELECT `titlelink` FROM ' . prefix('zenpage_pages') . ' WHERE `id`=' . $comment->getOwnerID();
$row = query_single_row($sql);
if (is_array($row)) {
$owner = new ZenpagePage($row['titlelink']);
}
break;
}
if (!is_null($owner)) {
$owner->getComments();
emailReply($comment, $owner);
}
return $comment;
}
示例5: zenpageAlbumImage
/**
* support to show an image from an album
* The imagename is optional. If absent the album thumb image will be
* used and the link will be to the album. If present the link will be
* to the image.
*
* @param string $albumname
* @param string $imagename
* @param int $size the size to make the image. If omitted image will be 50% of 'image_size' option.
* @param bool $linkalbum set true to link specific image to album instead of image
*/
function zenpageAlbumImage($albumname, $imagename = NULL, $size = NULL, $linkalbum = false)
{
global $_zp_gallery;
echo '<br />';
$album = newAlbum($albumname);
if ($album->loaded) {
if (is_null($size)) {
$size = floor(getOption('image_size') * 0.5);
}
$image = NULL;
if (is_null($imagename)) {
$linkalbum = true;
$image = $album->getAlbumThumbImage();
} else {
$image = newImage($album, $imagename);
}
if ($image && $image->loaded) {
makeImageCurrent($image);
if ($linkalbum) {
rem_context(ZP_IMAGE);
echo '<a href="' . html_encode($album->getLink()) . '" title="' . sprintf(gettext('View the %s album'), $albumname) . '">';
add_context(ZP_IMAGE);
printCustomSizedImage(sprintf(gettext('View the album %s'), $albumname), $size);
rem_context(ZP_IMAGE | ZP_ALBUM);
echo '</a>';
} else {
echo '<a href="' . html_encode(getImageURL()) . '" title="' . sprintf(gettext('View %s'), $imagename) . '">';
printCustomSizedImage(sprintf(gettext('View %s'), $imagename), $size);
rem_context(ZP_IMAGE | ZP_ALBUM);
echo '</a>';
}
} else {
?>
<span style="background:red;color:black;">
<?php
printf(gettext('<code>zenpageAlbumImage()</code> did not find the image %1$s:%2$s'), $albumname, $imagename);
?>
</span>
<?php
}
} else {
?>
<span style="background:red;color:black;">
<?php
printf(gettext('<code>zenpageAlbumImage()</code> did not find the album %1$s'), $albumname);
?>
</span>
<?php
}
}
示例6: getShow
static function getShow($heading, $speedctl, $albumobj, $imageobj, $width, $height, $crop, $shuffle, $linkslides, $controls, $returnpath, $imagenumber)
{
global $_zp_gallery, $_zp_gallery_page;
setOption('slideshow_' . $_zp_gallery->getCurrentTheme() . '_' . stripSuffix($_zp_gallery_page), 1);
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();
// setting the image size
if ($width) {
$wrapperwidth = $width;
} else {
$width = $wrapperwidth = getOption("slideshow_width");
}
if ($height) {
$wrapperheight = $height;
} else {
$height = $wrapperheight = getOption("slideshow_height");
}
if ($numberofimages == 0) {
return '<div class="errorbox" id="message"><h2>' . gettext('No images for the slideshow!') . '</h2></div>';
}
$option = getOption("slideshow_mode");
// jQuery Cycle slideshow config
// get slideshow data
$showdesc = getOption("slideshow_showdesc");
// slideshow display section
$validtypes = array('jpg', 'jpeg', 'gif', 'png', 'mov', '3gp');
$slideshow .= '
<script type="text/javascript">
// <!-- <![CDATA[
$(document).ready(function(){
$(function() {
var ThisGallery = "' . html_encode($albumobj->getTitle()) . '";
var ImageList = new Array();
var TitleList = new Array();
var DescList = new Array();
var ImageNameList = new Array();
var DynTime=(' . (int) getOption("slideshow_timeout") . ');
';
$images = $albumobj->getImages(0);
if ($shuffle) {
shuffle($images);
}
for ($imgnr = 0, $cntr = 0, $idx = $imagenumber; $imgnr < $numberofimages; $imgnr++, $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);
}
$ext = slideshow::is_valid($filename, $validtypes);
if ($ext) {
if ($crop) {
$img = $image->getCustomImage(NULL, $width, $height, $width, $height, NULL, NULL, NULL, NULL);
} else {
$maxwidth = $width;
$maxheight = $height;
getMaxSpaceContainer($maxwidth, $maxheight, $image);
$img = $image->getCustomImage(NULL, $maxwidth, $maxheight, NULL, NULL, NULL, NULL, NULL, NULL);
}
$slideshow .= 'ImageList[' . $cntr . '] = "' . $img . '";' . "\n";
$slideshow .= 'TitleList[' . $cntr . '] = "' . js_encode($image->getTitle()) . '";' . "\n";
if ($showdesc) {
$desc = $image->getDesc();
$desc = str_replace("\r\n", '<br />', $desc);
$desc = str_replace("\r", '<br />', $desc);
$slideshow .= 'DescList[' . $cntr . '] = "' . js_encode($desc) . '";' . "\n";
} else {
$slideshow .= 'DescList[' . $cntr . '] = "";' . "\n";
}
if ($idx == $numberofimages - 1) {
$idx = -1;
}
$slideshow .= 'ImageNameList[' . $cntr . '] = "' . urlencode($filename) . '";' . "\n";
$cntr++;
}
}
$slideshow .= "\n";
$numberofimages = $cntr;
$slideshow .= '
var countOffset = ' . $imagenumber . ';
var totalSlideCount = ' . $numberofimages . ';
var currentslide = 2;
function onBefore(curr, next, opts) {
if (opts.timeout != DynTime) {
opts.timeout = DynTime;
}
if (!opts.addSlide)
return;
var currentImageNum = currentslide;
currentslide++;
if (currentImageNum == totalSlideCount) {
opts.addSlide = null;
return;
}
var relativeSlot = (currentslide + countOffset) % totalSlideCount;
//.........这里部分代码省略.........
示例7: getitemComments
/**
* Gets the feed item data in a comments feed
*
* @param array $item Array of a comment
* @return array
*/
protected function getitemComments($item)
{
if ($item['anon']) {
$author = "";
} else {
$author = " " . gettext("by") . " " . $item['name'];
}
$commentpath = $imagetag = $title = '';
switch ($item['type']) {
case 'images':
$title = get_language_string($item['title']);
$obj = newImage(array('folder' => $item['folder'], 'filename' => $item['filename']));
$link = $obj->getlink();
$feeditem['pubdate'] = date("r", strtotime($item['date']));
$category = get_language_string($item['albumtitle']);
$website = $item['website'];
$title = $category . ": " . $title;
$commentpath = PROTOCOL . '://' . $this->host . $link . "#" . $item['id'];
break;
case 'albums':
$obj = newAlbum($item['folder']);
$link = rtrim($obj->getLink(), '/');
$feeditem['pubdate'] = date("r", strtotime($item['date']));
$title = get_language_string($item['albumtitle']);
$website = $item['website'];
$commentpath = PROTOCOL . '://' . $this->host . $link . "#" . $item['id'];
break;
case 'news':
case 'pages':
if (extensionEnabled('zenpage')) {
$feeditem['pubdate'] = date("r", strtotime($item['date']));
$category = '';
$title = get_language_string($item['title']);
$titlelink = $item['titlelink'];
$website = $item['website'];
if ($item['type'] == 'news') {
$obj = newArticle($titlelink);
} else {
$obj = newPage($titlelink);
}
$commentpath = PROTOCOL . '://' . $this->host . html_encode($obj->getLink()) . "#" . $item['id'];
} else {
$commentpath = '';
}
break;
}
$feeditem['title'] = getBare($title . $author);
$feeditem['link'] = $commentpath;
$feeditem['desc'] = $item['comment'];
return $feeditem;
}
示例8: getitems
public function getitems()
{
$items = array();
if ($album = @$this->options['album']) {
if ($image = @$this->options['image']) {
if (!is_array($image)) {
$image = array($image);
}
foreach ($image as $filename) {
$obj = newImage(NULL, array('folder' => $album, 'filename' => $filename), true);
if ($obj->exists) {
$items[] = $obj;
}
}
} else {
if (!is_array($album)) {
$album = array($album);
}
foreach ($album as $folder) {
$obj = newAlbum($folder, true);
if ($obj->exists) {
$items[] = $obj;
}
}
}
return $items;
}
if ($this->feedtype == 'news' && ($news = @$this->options['titlelink'])) {
if (!is_array($news)) {
$news = array($news);
}
foreach ($news as $article) {
$obj = new ZenpageNews($article, false);
if ($obj->loaded) {
$items[] = array('titlelink' => $article);
}
}
return $items;
}
if ($this->feedtype == 'pages' && ($pages = @$this->options['titlelink'])) {
if (!is_array($pages)) {
$pages = array($pages);
}
foreach ($pages as $page) {
$obj = new ZenpagePage($page, false);
if ($obj->loaded) {
$items[] = array('titlelink' => $page);
}
}
return $items;
}
return parent::getitems();
}
示例9: printSlideShow
//.........这里部分代码省略.........
$images = $album->getImages(0);
// return path to get back to the page we called the slideshow from
if (empty($_POST['imagenumber'])) {
$returnpath = rewrite_path('/' . pathurlencode($album->name) . '/page/' . $pagenumber, '/index.php?album=' . urlencode($album->name) . '&page=' . $pagenumber);
} else {
$returnpath = rewrite_path('/' . pathurlencode($album->name) . '/' . rawurlencode($_POST['imagefile']) . getOption('mod_rewrite_image_suffix'), '/index.php?album=' . urlencode($album->name) . '&image=' . urlencode($_POST['imagefile']));
}
}
// slideshow display section
switch ($option) {
case "jQuery":
$validtypes = array('jpg', 'jpeg', 'gif', 'png', 'mov', '3gp');
?>
<script type="text/javascript">
$(document).ready(function(){
$(function() {
var ThisGallery = '<?php
echo html_encode($albumtitle);
?>
';
var ImageList = new Array();
var TitleList = new Array();
var DescList = new Array();
var ImageNameList = new Array();
var DynTime=(<?php
echo getOption("slideshow_timeout");
?>
) * 1.0; // force numeric
<?php
for ($imgnr = 0, $cntr = 0, $idx = $imagenumber; $imgnr < $numberofimages; $imgnr++, $idx++) {
if ($dynamic) {
$filename = $images[$idx]['filename'];
$album = new Album($gallery, $images[$idx]['folder']);
$image = newImage($album, $filename);
} else {
$filename = $images[$idx];
$image = newImage($album, $filename);
}
$ext = is_valid($filename, $validtypes);
if ($ext) {
makeImageCurrent($image);
$img = getCustomSizedImageMaxSpace($width, $height);
//$img = WEBPATH . '/' . ZENFOLDER . '/i.php?a=' . pathurlencode($image->album->name) . '&i=' . urlencode($filename) . '&s=' . $imagesize;
echo 'ImageList[' . $cntr . '] = "' . $img . '";' . "\n";
echo 'TitleList[' . $cntr . '] = "' . js_encode($image->getTitle()) . '";' . "\n";
if (getOption("slideshow_showdesc")) {
$desc = $image->getDesc();
$desc = str_replace("\r\n", '<br />', $desc);
$desc = str_replace("\r", '<br />', $desc);
echo 'DescList[' . $cntr . '] = "' . js_encode($desc) . '";' . "\n";
} else {
echo 'DescList[' . $cntr . '] = "";' . "\n";
}
if ($idx == $numberofimages - 1) {
$idx = -1;
}
echo 'ImageNameList[' . $cntr . '] = "' . urlencode($filename) . '";' . "\n";
$cntr++;
}
}
echo "\n";
$numberofimages = $cntr;
?>
var countOffset = <?php
echo $imagenumber;
?>
示例10: gettext
?>
" type="radio" value="del_<?php
echo $item;
?>
" onclick="confirmdel(this, 'label_del_<?php
echo $item;
?>
', true)" />
<?php
echo gettext('Delete');
?>
</label>
</td>
<td>
<?php
$image = newImage($album, $display);
?>
<img src="<?php
echo html_encode(pathurlencode(getAdminThumb($image, 'large')));
?>
" alt="<?php
echo $image->filename;
?>
"/>
</td>
<td>
<?php
printf(gettext('%s'), $display);
?>
<a href="<?php
echo html_encode($image->getLink());
示例11: getSlideObj
/**
* We might need this to exclude file types or not…
*
* @param type $slide
* @param type $albumobj
* @return type
*/
static function getSlideObj($slide, $albumobj)
{
return newImage($albumobj, $slide);
}
示例12: sanitize
<?php
/**
* Hitcounter handler for slidshow
*
* @package plugins
*/
require_once "../../functions.php";
$album_name = sanitize($_GET["album"]);
$img_name = sanitize($_GET["img"]);
if ($album_name && $img_name) {
$gallery = new Gallery();
$album = new Album($gallery, $album_name);
$image = newImage($album, $img_name);
//update hit counter
if (!$album->isMyItem(LIST_RIGHTS)) {
$hc = $image->get('hitcounter') + 1;
$image->set('hitcounter', $hc);
$image->save();
}
}
示例13: printGslideshowStatistic
/**
* Prints an image or album statistic slideshow using the {@link http://galleria.io/ jQuery plugin Galleria}
*
* See readme/documentation for usage:
* Call directly in a template file or codeblock.
*
* NOTE: movie and audio files not supported.
*
* @param string $type return statistics of either 'images' or 'albums'
* @param integer $number the number of items to get (images or albums, depending on $type set)
* @param string $option
* "popular" for the most popular
* "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 string $albumfolder foldername of a specific album to pull items from
* @param bool $collection only if $albumfolder is set: true if you want to get statistics from this album and all of its subalbums
* @param bool $linkslides true to link to image or album on slide, else click advances slideshow instead
* @param mixed $autoplay true to autoplay slideshow with interval set in options, false to start with slideshow stopped. Set integer in milliseconds to autoplay at that interval (Ex. 4000), overriding plugin option set.
* @param integer $threshold the minimum number of ratings an image must have to be included in the list. (Default 0)
*
*/
function printGslideshowStatistic($type, $number, $option, $albumfolder = '', $collection = false, $linkslides = true, $autoplay = true, $threshold = 0)
{
save_context();
$data = 'data';
$embedded = true;
$forceheight = true;
$imagenumber = 0;
$albumtitle = '';
$returnpath = '';
require_once SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/image_album_statistics.php';
if ($type == 'album' || $type == 'albums') {
$albums = getAlbumStatistic($number, $option, $albumfolder);
} else {
$images = getImageStatistic($number, $option, $albumfolder, $collection, $threshold);
}
?>
<script>
var data = [
<?php
if ($type == 'album' || $type == 'albums') {
$c = 1;
foreach ($albums as $album) {
$tempalbum = newAlbum($album['folder']);
$albumpath = html_encode(rewrite_path("/" . pathurlencode($tempalbum->name), "index.php?album=" . pathurlencode($tempalbum->name)));
$albumthumb = $tempalbum->getAlbumThumbImage();
$image = newImage($tempalbum, $albumthumb->filename);
$ext = isImagePhoto($image);
if ($ext) {
makeImageCurrent($image);
echo '{' . "\n";
echo 'thumb: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_thumbsize'), getOption('gslideshow_thumbsize')) . '\',' . "\n";
echo 'image: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_mediumsize'), getOption('gslideshow_mediumsize')) . '\',' . "\n";
echo 'big: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_bigsize'), getOption('gslideshow_bigsize')) . '\',' . "\n";
echo 'title: \'' . html_encode($tempalbum->getTitle()) . '\',' . "\n";
$desc = $tempalbum->getDesc();
$desc = str_replace("\r\n", '<br />', $desc);
$desc = str_replace("\r", '<br />', $desc);
echo 'description: \'' . js_encode($desc) . '\',' . "\n";
echo 'link: \'' . $albumpath . '\'' . "\n";
if ($c == $number) {
echo '}' . "\n";
} else {
echo '},' . "\n";
}
}
$c++;
}
echo "\n";
} else {
$c = 1;
foreach ($images as $image) {
$ext = isImagePhoto($image);
if ($ext) {
makeImageCurrent($image);
echo '{' . "\n";
echo 'thumb: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_thumbsize'), getOption('gslideshow_thumbsize')) . '\',' . "\n";
echo 'image: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_mediumsize'), getOption('gslideshow_mediumsize')) . '\',' . "\n";
echo 'big: \'' . getCustomSizedImageMaxSpace(getOption('gslideshow_bigsize'), getOption('gslideshow_bigsize')) . '\',' . "\n";
echo 'title: \'' . html_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";
echo 'link: \'' . html_encode($image->getLink()) . '\'' . "\n";
if ($c == $number) {
echo '}' . "\n";
} else {
echo '},' . "\n";
}
}
$c++;
//.........这里部分代码省略.........
示例14: getSitemapImages
/**
* currently this splitts only sitemaps for albums and its images. Spliting the images itself requires a major rework...
*
* Gets links to all images for all albums (album by album)
*
* @return string
*/
function getSitemapImages()
{
global $_zp_gallery, $sitemap_number;
$data = '';
$sitemap_locales = generateLanguageList();
$imagechangefreq = getOption('sitemap_changefreq_images');
$imagelastmod = getOption('sitemap_lastmod_images');
$limit = sitemap_getDBLimit(1);
$albums = array();
getSitemapAlbumList($_zp_gallery, $albums, 'passImages');
$offset = $sitemap_number - 1;
$albums = array_slice($albums, $offset, SITEMAP_CHUNK);
if ($albums) {
$data .= sitemap_echonl('<?xml version="1.0" encoding="UTF-8"?>');
if (GOOGLE_SITEMAP) {
$data .= sitemap_echonl('<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">');
} else {
$data .= sitemap_echonl('<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">');
}
foreach ($albums as $album) {
@set_time_limit(120);
// Extend script timeout to allow for gathering the images.
$albumobj = newAlbum($album['folder']);
$images = $albumobj->getImages();
// print plain images links if available
if ($images) {
foreach ($images as $image) {
$imageobj = newImage($albumobj, $image);
$ext = getSuffix($imageobj->filename);
$date = sitemap_getDateformat($imageobj, $imagelastmod);
switch (SITEMAP_LOCALE_TYPE) {
case 1:
foreach ($sitemap_locales as $locale) {
$path = seo_locale::localePath(true, $locale) . '/' . pathurlencode($albumobj->name) . '/' . urlencode($imageobj->filename) . IM_SUFFIX;
$data .= sitemap_echonl("\t<url>\n\t\t<loc>" . $path . "</loc>\n\t\t<lastmod>" . $date . "</lastmod>\n\t\t<changefreq>" . $imagechangefreq . "</changefreq>\n\t\t<priority>0.6</priority>\n");
if (GOOGLE_SITEMAP) {
$data .= getSitemapGoogleImageVideoExtras($albumobj, $imageobj, $locale);
}
$data .= sitemap_echonl("</url>");
}
break;
case 2:
foreach ($sitemap_locales as $locale) {
$path = rewrite_path(pathurlencode($albumobj->name) . '/' . urlencode($imageobj->filename) . IM_SUFFIX, '?album=' . pathurlencode($albumobj->name) . '&image=' . urlencode($imageobj->filename), dynamic_locale::fullHostPath($locale));
$data .= sitemap_echonl("\t<url>\n\t\t<loc>" . $path . "</loc>\n\t\t<lastmod>" . $date . "</lastmod>\n\t\t<changefreq>" . $imagechangefreq . "</changefreq>\n\t\t<priority>0.6</priority>\n");
if (GOOGLE_SITEMAP) {
$data .= getSitemapGoogleImageVideoExtras($albumobj, $imageobj, $locale);
}
$data .= sitemap_echonl("</url>");
}
break;
default:
$path = rewrite_path(pathurlencode($albumobj->name) . '/' . urlencode($imageobj->filename) . IM_SUFFIX, '?album=' . pathurlencode($albumobj->name) . '&image=' . urlencode($imageobj->filename), FULLWEBPATH);
$data .= sitemap_echonl("\t<url>\n\t\t<loc>" . $path . "</loc>\n\t\t<lastmod>" . $date . "</lastmod>\n\t\t<changefreq>" . $imagechangefreq . "</changefreq>\n\t\t<priority>0.6</priority>\n");
if (GOOGLE_SITEMAP) {
$data .= getSitemapGoogleImageVideoExtras($albumobj, $imageobj, NULL);
}
$data .= sitemap_echonl("</url>");
break;
}
}
}
}
$data .= sitemap_echonl('</urlset>');
// End off the <urlset> tag
}
return $data;
}
示例15: gettext
echo "<h2>" . gettext("Image order saved");
echo '</h2></div>';
}
?>
<div class="box" style="padding: 15px;">
<p><?php
echo gettext("Sort the images by dragging them...");
?>
</p>
<div id="images"><?php
$images = $album->getImages();
foreach ($images as $image) {
adminPrintImageThumb(newImage($album, $image));
}
?>
</div>
<br>
<div><?php
zenSortablesSaveButton($_zp_sortable_list, "?page=edit&album=" . $album->getFolder() . "&saved");
?>
</div>
</div>
</div>
<?php