echo html_encode(getFullImageURL()); ?> " title="<?php echo html_encode(getBareImageTitle()); ?> "><?php printCustomSizedImage(getAnnotatedImageTitle(), 550); ?> </a><?php } ?> <?php if ($zpmin_finallink == 'standard-new') { ?> <a target="_blank" href="<?php echo html_encode(getFullImageURL()); ?> " title="<?php echo html_encode(getBareImageTitle()); ?> "><?php printCustomSizedImage(getAnnotatedImageTitle(), 550); ?> </a><?php } ?> </div> </div> <?php if (function_exists('printAddToFavorites')) { echo '<div class="section">';
?> ">next photo »</a> </div> <?php } ?> <p style="margin:0px;padding:0px;clear: both; "> </p> </div> <div id="image"> <a class="gallery" href="<?php echo getFullImageURL(); ?> " title="<?php echo getImageTitle(); ?> "> <?php printDefaultSizedImage(getImageTitle()); ?> </a> </div> <div id="narrow"> <div id="smaller_tlg"> <?php printImageDesc(true);
echo '<div class="c"><div id="tags" class="box">'; printTags('links', '', '', ', ', true, '', true); echo '</div></div>'; } if (function_exists('printRating')) { echo '<div class="c"><div id="rating">'; printRating(); echo '</div></div>'; } ?> </div> <div class="clear_left"></div> <div id="image"> <div> <?php $fullimage = getFullImageURL(); if (!empty($fullimage)) { ?> <a href="<?php echo htmlspecialchars($fullimage); ?> " title="<?php echo getBareImageTitle(); ?> "> <?php } printDefaultSizedImage(html_encode(getImageTitle()), 'image', 'player'); if (!empty($fullimage)) { ?> </a>
printjCarouselThumbNav(6, 50, 50, 50, 50, FALSE); } else { if (function_exists("printPagedThumbsNav")) { printPagedThumbsNav(6, FALSE, gettext('« prev thumbs'), gettext('next thumbs »'), 40, 40); } } ?> <div id="image"> <?php if (getOption("Use_thickbox") && !isImageVideo()) { $boxclass = " class=\"thickbox\""; $tburl = getUnprotectedImageURL(); } else { $boxclass = ""; $tburl = getFullImageURL(); } if (!empty($tburl)) { ?> <a href="<?php echo html_encode($tburl); ?> "<?php echo $boxclass; ?> title="<?php echo getBareImageTitle(); ?> "> <?php }
$desc = $a->getDesc(); $customThumb = $thumb->getCustomImage(NULL, 202, 56, 202, 56, NULL, NULL, false); $url = getAlbumURL(); echo "\t<div class='thumb' index='{$u}' title='{$title}' location='{$customThumb}' url='{$url}'><description>{$desc}</description></div>\n"; $u++; } } else { $u = 0; while (next_image()) { $title = getImageTitle(); $size = getSizeCustomImage(NULL, 383); $desc = getImageDesc(); if (!empty($desc)) { $desc = theme_clean($desc); } else { $desc = ''; } $thumb = getImageThumb(); $small = getCustomImageURL(NULL, 383); $full = getFullImageURL(); $width = $size[0]; $height = $size[1]; $rating = $_zp_current_image->get('rating'); echo "\t<div class='thumb' index='{$u}' title='{$title}' \n\t\twidth='{$width}' " . "\n\t\theight='{$height}' \n\t\turl='{$full}' \n\t\tpreviewUrl='{$small}'" . "\n\t\tlocation='{$thumb}' \n\t\trating='{$rating}' \n\t\tobject_id='" . $_zp_current_image->id . "'>" . "\n\t\t<description>\n\t\t\t{$desc}\n\t\t</description>\n\t</div>\n"; $u++; } } ?> </div>
/** * Prints a link to call the slideshow (not shown if there are no images in the album) * To be used on album.php and image.php * A CSS id names 'slideshowlink' is attached to the link so it can be directly styled. * * If the mode is set to "jQuery Colorbox" and the Colorbox plugin is enabled this link starts a Colorbox slideshow * from a hidden HTML list of all images in the album. On album.php it starts with the first always, on image.php with the current image. * * @param string $linktext Text for the link * @param string $linkstyle Style of Text for the link */ function printSlideShowLink($linktext = NULL, $linkstyle = Null) { global $_zp_gallery, $_zp_current_image, $_zp_current_album, $_zp_current_search, $slideshow_instance, $_zp_gallery_page; if (is_null($linktext)) { $linktext = gettext('View Slideshow'); } if (empty($_GET['page'])) { $pagenr = 1; } else { $pagenr = sanitize_numeric($_GET['page']); } $slideshowhidden = ''; $numberofimages = 0; if (in_context(ZP_SEARCH)) { $imagenumber = ''; $imagefile = ''; $albumnr = 0; $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow"); $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />'; } else { if (in_context(ZP_IMAGE)) { $imagenumber = imageNumber(); $imagefile = $_zp_current_image->filename; } else { $imagenumber = ''; $imagefile = ''; } if (in_context(ZP_SEARCH_LINKED)) { $albumnr = -$_zp_current_album->getID(); $slideshowhidden = '<input type="hidden" name="preserve_search_params" value="' . html_encode($_zp_current_search->getSearchParams()) . '" />'; } else { $albumnr = $_zp_current_album->getID(); } if ($albumnr) { $slideshowlink = rewrite_path(pathurlencode($_zp_current_album->getFileName()) . '/' . _PAGE_ . '/slideshow', "index.php?p=slideshow&album=" . urlencode($_zp_current_album->getFileName())); } else { $slideshowlink = rewrite_path(_PAGE_ . '/slideshow', "index.php?p=slideshow"); $slideshowhidden = '<input type="hidden" name="favorites_page" value="1" />' . "\n" . '<input type="hidden" name="title" value="' . $_myFavorites->instance . '" />'; } } $numberofimages = getNumImages(); $option = getOption('slideshow_mode'); switch ($option) { case 'jQuery': if ($numberofimages > 1) { ?> <form name="slideshow_<?php echo $slideshow_instance; ?> " method="post" action="<?php echo zp_apply_filter('getLink', $slideshowlink, 'slideshow.php', NULL); ?> "> <?php echo $slideshowhidden; ?> <input type="hidden" name="pagenr" value="<?php echo html_encode($pagenr); ?> " /> <input type="hidden" name="albumid" value="<?php echo $albumnr; ?> " /> <input type="hidden" name="numberofimages" value="<?php echo $numberofimages; ?> " /> <input type="hidden" name="imagenumber" value="<?php echo $imagenumber; ?> " /> <input type="hidden" name="imagefile" value="<?php echo html_encode($imagefile); ?> " /> <?php if (!empty($linkstyle)) { echo '<p style="' . $linkstyle . '">'; } ?> <a class="slideshowlink" id="slideshowlink_<?php echo $slideshow_instance; ?> " href="javascript:document.slideshow_<?php echo $slideshow_instance; ?> .submit()"><?php echo $linktext; ?> </a> <?php if (!empty($linkstyle)) { echo '</p>'; } ?> </form> <?php } $slideshow_instance++; break; case 'colorbox': $theme = $_zp_gallery->getCurrentTheme(); $script = stripSuffix($_zp_gallery_page); if (!getOption('colorbox_' . $theme . '_' . $script)) { setOptionDefault('colorbox_' . $theme . '_' . $script, 1); $themes = $_zp_gallery->getThemes(); ?> <div class="errorbox"><?php printf(gettext('Slideshow not available because colorbox is not enabled on %1$s <em>%2$s</em> pages.'), $themes[$theme]['name'], $script); ?> </div> <?php break; } if ($numberofimages > 1) { if (in_context(ZP_SEARCH_LINKED) && !in_context(ZP_ALBUM_LINKED) || in_context(ZP_SEARCH) && is_null($_zp_current_album)) { $images = $_zp_current_search->getImages(0); } else { $images = $_zp_current_album->getImages(0); } $count = ''; ?> <script type="text/javascript"> $(document).ready(function() { $("a[rel='slideshow']").colorbox({ slideshow: true, loop: true, transition: '<?php echo getOption('slideshow_colorbox_transition'); ?> ', slideshowSpeed: <?php echo getOption('slideshow_speed'); ?> , slideshowStart: '<?php echo gettext("start slideshow"); ?> ', slideshowStop: '<?php echo gettext("stop slideshow"); ?> ', previous: '<?php echo gettext("prev"); ?> ', next: '<?php echo gettext("next"); ?> ', close: '<?php echo gettext("close"); ?> ', current: '<?php printf(gettext('image %1$s of %2$s'), '{current}', '{total}'); ?> ', maxWidth: '98%', maxHeight: '98%', photo: true }); }); </script> <?php foreach ($images as $image) { if (is_array($image)) { $suffix = getSuffix($image['filename']); } else { $suffix = getSuffix($image); } $suffixes = array('jpg', 'jpeg', 'gif', 'png'); if (in_array($suffix, $suffixes)) { $count++; if (is_array($image)) { $albobj = newAlbum($image['folder']); $imgobj = newImage($albobj, $image['filename']); } else { $imgobj = newImage($_zp_current_album, $image); } if (in_context(ZP_SEARCH_LINKED) || $_zp_gallery_page != 'image.php') { if ($count == 1) { $style = ''; } else { $style = ' style="display:none"'; } } else { if ($_zp_current_image->filename == $image) { $style = ''; } else { $style = ' style="display:none"'; } } switch (getOption('slideshow_colorbox_imagetype')) { case 'fullimage': $imagelink = getFullImageURL($imgobj); break; case 'sizedimage': $imagelink = $imgobj->getCustomImage(getOption("slideshow_width"), NULL, NULL, NULL, NULL, NULL, NULL, false, NULL); break; } $imagetitle = ''; if (getOption('slideshow_colorbox_imagetitle')) { $imagetitle = html_encode(getBare($imgobj->getTitle())); } ?> <a href="<?php echo html_encode(pathurlencode($imagelink)); ?> " rel="slideshow"<?php echo $style; ?> title="<?php echo $imagetitle; ?> "><?php echo $linktext; ?> </a> <?php } } } break; } }
<?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;
</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> <br></font><?php echo getImageDesc(); ?>
function getEXIF() { $er = new phpExifRW("../" . getFullImageURL()); $er->processFile(); $er->showImageInfo(); }
?> <a href="<?php echo htmlspecialchars(getNextImageURL()); ?> ">Next</a><?php } else { ?> <span>Next</span><?php } ?> </li> </ul> </div> <?php if (isImagePhoto() && extensionEnabled('colorbox_js') && zp_has_filter('theme_head', 'colorbox::css')) { $imgURL = getFullImageURL(); $boxclass = " class=\"fullimage\""; $cb = true; } else { $cb = false; } ?> <div id="content" class="c"> <div class="view c"> <?php if ($cb == true) { ?> <a href="<?php echo html_encode($imgURL); ?> "<?php
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; }
?> </div><?php } ?> <?php printImageMetaData(); ?> </div> </div> <div class="image suffix_5"> <?php $linkImage = getFullImageURL(); ?> <?php if (!empty($linkImage)) { echo '<a href="' . getFullImageURL() . '" alt="' . getImageTitle() . '">'; } $iL = isLandscape($_zp_current_image); if ($iL) { setOption('image_size', 776, false); } else { setOption('image_size', 456, false); } setOption('image_use_side', 'longest', false); printDefaultSizedImage(getImageTitle()); if (!empty($linkImage)) { echo '</a>'; } ?> </div> <div class="clear"></div>
/** * To show the content of an media album with .flv/.mp4/.mp3 movie/audio files only as a playlist or as separate players with flv player * NOTE: The flv player plugin needs to be installed (This plugin currently internally uses FLV player 3 because of FLV player 4 Api changes!) * * The playlist is meant to replace the 'next_image()' loop on a theme's album.php. * It can be used with a special 'album theme' that can be assigned to media albums with with .flv/.mp4/.mp3s * movie/audio files only. See the examples below * You can either show a 'one player window' playlist or show all items as separate players paginated * (set in the settings for thumbs per page) on one page (like on a audio or podcast blog). * * If there is no preview image for a mp3 file existing only the player control bar is shown. * * The two modes: * a) 'playlist' * Replace the entire 'next_image()' loop on album.php with this: * <?php flvPlaylist("playlist"); ?> * * It uses a xspf file found in 'zp-core/flvplayer/flvplayer/playlist.php' for the playlist that you also can modify. You can also use other XML formats for a playlist See http://developer.longtailvideo.com/trac/wiki/FlashFormats * * b) 'players' * Modify the 'next_image()' loop on album.php like this: * <?php * while (next_image(): * printImageTitle(); * flvPlaylist("players"); * endwhile; * ?> * Of course you can add further functions to b) like title, description, date etc., too. * * @param string $option the mode to use "playlist" or "players" */ function flvPlaylist($option = '') { global $_zp_current_album, $_zp_current_image, $_flv_player, $_zp_flash_player; if (checkAlbumPassword($_zp_current_album->getFolder(), $hint)) { if ($option === "players") { $moviepath = getUnprotectedImageURL(); $ext = strtolower(strrchr(getUnprotectedImageURL(), ".")); } $imagetitle = getImageTitle(); } $albumid = getAlbumID(); switch ($option) { case "playlist": if (getNumImages() != 0) { ?> <div id="flvplaylist"><?php echo gettext("The flv player is not installed. Please install or activate the flv player plugin."); ?> </div> <script type="text/javascript"> var so = new SWFObject('<?php echo WEBPATH . '/' . USER_PLUGIN_FOLDER; ?> /flvplayer/<?php echo $_flv_player; ?> ','flvplaylist','<?php echo getOption('flvplaylist_width'); ?> ','<?php echo getOption('flvplaylist_height'); ?> ','8'); so.addParam('allowfullscreen','true'); so.addVariable('stretching','<?php echo getOption('flv_player_stretching'); ?> '); so.addVariable('playlist', '<?php echo getOption('flvplaylist_position'); ?> '); so.addVariable('playlistsize','<?php echo getOption('flvplaylist_size'); ?> '); so.addVariable('repeat','<?php echo getOption('flvplaylist_repeat'); ?> '); so.addVariable('backcolor','<?php echo getOptionColor('flv_player_backcolor'); ?> '); so.addVariable('frontcolor','<?php echo getOptionColor('flv_player_frontcolor'); ?> '); so.addVariable('lightcolor','<?php echo getOptionColor('flv_player_lightcolor'); ?> '); so.addVariable('screencolor','<?php echo getOptionColor('flv_player_screencolor'); ?> '); so.addVariable('file','<?php echo WEBPATH . "/" . USER_PLUGIN_FOLDER; ?> /flvplayer/playlist.php?albumid=<?php echo $albumid; ?> '); so.addVariable('javascriptid','jstest'); so.addVariable('enablejs','true'); so.write('flvplaylist'); </script> <?php } break; case "players": if ($ext == ".flv" || $ext == ".mp3" || $ext == ".mp4") { if (is_null($_zp_flash_player)) { echo "<img src='" . WEBPATH . '/' . ZENFOLDER . "'/images/err-noflashplayer.gif' alt='" . gettext('The flv player is not installed. Please install or activate the flv player plugin.') . "' />"; } else { $_zp_flash_player->printPlayerConfig(getFullImageURL(), $_zp_current_image->getTitle(), $_zp_current_image->get("id")); } } break; } }
} } ?> </ul> </div> <div id="fullplate-navigation"> <ul> <?php if (hasPrevPage()) { echo "\t\t" . '<li id="previous"><a href="' . getPrevPageURL() . '" title="Previous Image"><img src="' . $_zp_themeroot . '/images/arrow_left.png" width="16" height="16" alt="left ' . 'arrow" /></a></li>' . "\n"; } else { echo "\t\t" . '<li> </li>' . "\n"; } if (in_context(ZP_IMAGE)) { echo "\t\t" . '<li><a href="' . getFullImageURL() . '" title="Full Size Image"><img src="' . $_zp_themeroot . '/images/arrow_out.png" width="16" height="16" alt="arrows ' . 'pointing out" /></a></li>' . "\n"; } else { echo "\t\t" . '<li> </li>' . "\n"; } if (hasNextPage()) { echo "\t\t" . '<li id="next"><a href="' . getNextPageURL() . '" title="Next Image"><img src="' . $_zp_themeroot . '/images/arrow_right.png" width="16" height="16" alt="right ' . 'arrow" /></a></li>' . "\n"; } else { echo "\t\t" . '<li> </li>' . "\n"; } ?> </ul> </div> <div id="foot"> <div id="logo"> <?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 = ''; } $rating = $_zp_current_image->get('rating'); 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" . " rating: " . (isset($rating) ? $rating : 0) . ", \n" . " object_id: " . $_zp_current_image->id . "});\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;