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; }
function theme_content($map) { global $_zp_current_image, $points; ?> <!-- Image page 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"><a href="<?php echo html_encode(getImageURL()); ?> " title="<?php echo html_encode(getBareImageTitle()); ?> "><?php printImageThumb(getImageTitle()); ?> </a></div> </div> <?php } ?> </div> <br class="clearall" /> <?php @call_user_func('printSlideShowLink'); }
printAdminToolbox(); } ?> </body> </html> <?php } else { header('Content-Type: application/xml'); $path = '..'; echo '<?xml version="1.0" encoding="UTF-8"?> <simpleviewerGallery title="" maxImageWidth="' . $maxImageWidth . '" maxImageHeight="' . $maxImageHeight . '" textColor="' . $textColor . '" frameColor="' . $frameColor . '" frameWidth="' . $frameWidth . '" stagePadding="' . $stagePadding . '" thumbnailColumns="' . $thumbnailColumns . '" thumbnailows="' . $thumbnailRows . '" navPosition="' . $navPosition . '" enableRightClickOpen="' . $enableRightClickOpen . '" backgroundImagePath="' . $backgroundImagePath . '" imagePath="' . $path . '" thumbPath="' . $path . '">'; ?> <?php while (next_image(true)) { ?> <image><filename><?php echo htmlspecialchars(getFullImageURL()); ?> </filename><caption><![CDATA[<a href="<?php echo htmlspecialchars(getImageLinkURL()); ?> " title="<?php echo gettext('Open in a new window'); ?> "> <font face="Times"><u><b><em><?php echo getImageTitle(); ?> </font></em></b></u></a></u>
echo html_encode(getAlbumTitle() . ' (' . getAlbumDate(getOption('date_format')) . ')'); ?> " /> <span><?php echo getAlbumTitle() . '<br />(' . getAlbumDate(getOption('date_format')) . ')'; ?> </span> </a> </li> <?php } ?> <div class="clear_left"></div> <div id="images"> <?php while (next_image(false, $firstPageImages)) { $c++; ?> <li class="thumb image"> <a title="<?php echo html_encode(getBareImageDesc()); ?> " href="<?php echo htmlspecialchars(getImageURL()); ?> "> <img src="<?php echo getCustomImageURL(250, NULL, NULL, 250, 150, NULL, NULL, true); ?> " alt="<?php echo html_encode(getBareImageTitle() . ' (' . getImageDate(getOption('date_format')) . ')');
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; }
function checkForImages() { global $_zp_current_image, $_zp_current_album, $_zp_current_search, $_zp_gallery; $c = 0; while (next_image()) { if (isImagePhoto()) { $c++; } } if ($c > 0) { return true; } else { return false; } }
<?php if (getNumImages() > 0) { echo getNumImages() . ' ' . gettext("images"); } ?> </div> </div> </div> <?php } ?> <?php } ?> <?php while (next_image($showall)) { ?> <div class="sdscroll-item"> <?php if (getOption('zpbase_nodetailpage')) { printCustomSizedImage(getBareImageTitle(), null, null, getOption('zpbase_sds_maxheight'), null, null, null, null, 'remove-attributes', null, true); } else { ?> <a href="<?php echo html_encode(getImageURL()); ?> " title="<?php printBareImageTitle(); ?> "> <?php
</a></h3> <p><?php printAlbumDesc(); ?> </p> </div> <p style="clear: both; "></p> </div> <?php } ?> </div> <div id="images"> <?php while (next_image(false)) { ?> <div class="image"> <div class="imagethumb"><a href="<?php echo getFullImageURL(); ?> " data-lightbox="<?php printAlbumTitle(); ?> " title="<?php echo getImageTitle(); ?> "><?php printImageThumb(getImageTitle()); ?> </a></div>
/** * Causes a Google map to be printed based on the gps data in all the images in the album * @param string $zoomlevel the zoom in for the map. NULL will use the default * @param string $defaultmaptype the starting display of the map valid values are G_NORMAL_MAP | G_SATELLITE_MAP | G_HYBRID_MAP | G_PHYSICAL_MAP | G_SATELLITE_3D_MAP * @param int $width is the image width of the map. NULL will use the default * @param int $height is the image height of the map. NULL will use the default * @param string $text text for the pop-up link * @param bool $toggle set to true to hide initially * @param string $id DIV id * @param int $firstPageImages the number of images on transition pages. * @param array $mapselections array of the maps to be used. * @param bool $addphysical Adds physical map. * @param bool $addwiki Adds wikipedia georeferenced data on your maps * @param string $background the background color for the map * @param string $mapcontrol values None | Small | Large * @param string $maptypecontrol values Buttons | List * @param string $customJS the extra javascript needed by the theme */ function printAlbumMap($zoomlevel = NULL, $defaultmaptype = NULL, $width = NULL, $height = NULL, $text = '', $toggle = true, $id = 'googlemap', $firstPageImages = 0, $mapselections = NULL, $addwiki = NULL, $background = NULL, $mapcontrol = NULL, $maptypecontrol = NULL, $customJS = NULL) { global $_zp_phoogle, $_zp_images, $_zp_current_album, $_zp_current_image; if (getOption('gmaps_apikey') != '') { $foundLocation = false; $defaultmaptype = setupAllowedMaps($defaultmaptype, $mapselections); if ($zoomlevel) { $_zp_phoogle->zoomLevel = $zoomlevel; } if (!is_null($width)) { $_zp_phoogle->setWidth($width); } else { $_zp_phoogle->setWidth(getOption('gmaps_width')); } if (!is_null($height)) { $_zp_phoogle->setHeight($height); } else { $_zp_phoogle->setHeight(getOption('gmaps_height')); } if (!is_null($mapcontrol)) { $_zp_phoogle->setControlMap($mapcontrol); } else { $_zp_phoogle->setControlMap(getOption('gmaps_control')); } if (!is_null($maptypecontrol)) { $_zp_phoogle->setControlMapType($maptypecontrol); } else { $_zp_phoogle->setControlMapType(getOption('gmaps_control_maptype')); } if (!is_null($background)) { $_zp_phoogle->setBackGround($background); } else { $_zp_phoogle->setBackGround(getOption('gmaps_background')); } if (!is_null($customJS)) { $_zp_phoogle->customJS = $customJS; } resetCurrentAlbum(); // start from scratch while (next_image(getOption('gmaps_show_all_album_points'), $firstPageImages)) { $exif = getImageEXIFData(); if (!empty($exif['EXIFGPSLatitude']) && !empty($exif['EXIFGPSLongitude'])) { $foundLocation = true; $lat = $exif['EXIFGPSLatitude']; $long = $exif['EXIFGPSLongitude']; if ($exif['EXIFGPSLatitudeRef'] == 'S') { $lat = '-' . $lat; } if ($exif['EXIFGPSLongitudeRef'] == 'W') { $long = '-' . $long; } $infoHTML = '<a href="' . pathurlencode(getImageLinkURL()) . '"><img src="' . pathurlencode(getImageThumb()) . '" alt="' . getImageDesc() . '" ' . 'style=" margin-left: 30%; margin-right: 10%; border: 0px; "/></a>' . '<p>' . getImageDesc() . '</p>'; addPoint($lat, $long, js_encode($infoHTML)); } } resetCurrentAlbum(); // clear out any 'damage' if ($foundLocation) { $dataid = $id . '_data'; //to avoid problems with google earth and the toggle options, the toggle option is removed from here when GE is activated //it is possible to have both functionnality work but the toogle option should then be integrated in the phoogle map class dirctly within the script //that calls the map and should alos trigger a map type change. check Sobre theme or have alook at www.kaugite.com for an example $toggle = $toggle && $defaultmaptype != 'G_SATELLITE_3D_MAP'; if (is_null($text)) { $text = gettext('Google Map'); } echo "<a href=\"javascript: vtoggle('{$dataid}');\" title=\"" . gettext('Display or hide the Google Map.') . "\">"; echo $text; echo "</a>\n"; echo " <div id=\"{$dataid}\"" . ($toggle ? " style=\"color:black; visibility: hidden;position:absolute;left: -3000px;top: -3000px\"" : '') . ">\n"; $_zp_phoogle->showMap(is_null($zoomlevel)); echo " </div>\n"; } } }
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); ?> &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); ?> &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 } } } $count = $count + $countit; } } if ($count) { echo ' } '; } printf(ngettext('[%u image]', '[%u images]', $count), $count); echo "<br />\n"; } return $count + $tcount; }
} if (hasNextPage()) { $link = getNextPageURL(); } else { $link = "#"; } echo "<li><a href=\"{$link}\" title=\"Next Page\">»</a></li>"; ?> </ul> </div> <div id="imageList"> <?php $imagesPerPage = getOption('images_per_page'); $count = 1; while (next_image() && $count <= $imagesPerPage) { ?> <div class="image"> <a href="<?php echo getImageURL(); ?> " title="<?php if (getImageDesc() == "") { echo getImageTitle(); } else { echo getImageTitle() . ' - ' . getImageDesc(); } ?> "><img
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 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 }
?> </body> </html> <?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'); ?> ">
</p> </div> </div> <?php } ?> </div> <?php } ?> <?php if (getNumImages() > 0) { ?> <div id="images"> <?php while (next_image()) { ?> <div class="image"> <div class="imagethumb"><a href="<?php echo html_encode(getImageURL()); ?> " title="<?php printBareImageTitle(); ?> "><?php printImageThumb(getBareImageTitle()); ?> </a></div> </div> <?php }
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 } }