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'); }
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; }
"> <?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) {
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 }
/** * 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(); } }
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; }
<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(); ?>
$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++; } } ?> ];
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')) { echo 'link: \'' . html_encode($image->getLink()) . '\'' . "\n"; } if ($c == $numberofimages - 1) { echo '}' . "\n"; } else { echo '},' . "\n"; } } else { if ($imagenumber > 0 && $imagenumber > $c) { $imagenumber--; } } } echo "\n"; ?> ]; </script> <?php $sspage = true; require_once 'inc/galleria-jscall.php'; }
} 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
?> " 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
function theme_content($map) { global $_zp_current_image, $points; if (isImagePage()) { ?> <!-- Gallery section --> <div id="images"> <?php $points = array(); $firstImage = null; $lastImage = null; if (getNumImages() > 0) { ?> <div id="gallery" class="ad-gallery"> <div class="ad-image-wrapper"></div> <div class="ad-controls"></div> <div class="ad-nav"> <div class="ad-thumbs"> <ul class="ad-thumb-list"> <?php while (next_image(true)) { if ($map) { $coord = getGeoCoord($_zp_current_image); if ($coord) { $points[] = $coord; } } if (isImagePhoto()) { // does not do video if (is_null($firstImage)) { $lastImage = imageNumber(); $firstImage = $lastImage; } else { $lastImage++; } ?> <li> <a href="<?php echo html_encode(getDefaultSizedImage()); ?> "> <img src="<?php echo html_encode(pathurlencode(getImageThumb())); ?> " class="image<?php echo $lastImage; ?> " alt="<?php echo html_encode(getImageDesc()); ?> "> </a> </li> <?php } } ?> </ul> </div> </div> </div> <?php } ?> <div id="caption"<?php if (getOption('garland_caption_location') == 'none') { echo ' style="display:none"'; } ?> > </div> <div class="clearage"></div> </div><!-- images --> <br class="clearall" /> <?php } }
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}\"" : "") . " />"; }
function theme_content($map) { global $_zp_current_image, $_zp_current_album, $points; if (isImagePage()) { ?> <!-- Gallery section --> <div id="content"> <div id="main"> <div id="images"> <?php $points = array(); $firstImage = null; $lastImage = null; if (getNumImages() > 0) { ?> <div id="gallery" class="ad-gallery"> <div class="ad-image-wrapper"></div> <div class="ad-controls"></div> <div class="ad-nav"> <div class="ad-thumbs"> <ul class="ad-thumb-list"> <?php while (next_image(true)) { if ($map) { $coord = getGeoCoord($_zp_current_image); if ($coord) { $points[] = $coord; } } if (isImagePhoto()) { // does not do video if (is_null($firstImage)) { $lastImage = imageNumber(); $firstImage = $lastImage; } else { $lastImage++; } ?> <li> <a href="<?php echo html_encode(getDefaultSizedImage()); ?> "> <img src="<?php echo html_encode(pathurlencode(getImageThumb())); ?> " class="image<?php echo $lastImage; ?> " alt="<?php echo html_encode(getImageDesc()); ?> "> </a> </li> <?php } } ?> </ul> </div> </div> </div> <?php } ?> <div id="caption"<?php if (getOption('effervescence_caption_location') == 'none') { echo ' style="display:none"'; } ?> > </div> <div class="clearage"></div> <?php 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 } ?> </div><!-- images --> <?php if (function_exists('printAddToFavorites')) { printAddToFavorites($_zp_current_album); } ?> <?php @call_user_func('printRating'); ?> </div><!-- main --> <div class="clearage"></div> </div><!-- content --> <?php } }
/** * 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(); } }