/** * Prints the JS configuration of flv player * * @param string $moviepath the direct path of a movie (within the slideshow), if empty (within albums) the zenphoto function getUnprotectedImageURL() is used * @param string $imagetitle the title of the movie to be passed to the player for display (within slideshow), if empty (within albums) the function getImageTitle() is used * @param string $count unique text for when there are multiple player items on a page */ function getPlayerConfig($moviepath = '', $imagetitle = '', $count = '') { global $_zp_current_image, $_zp_current_album; if (empty($moviepath)) { $moviepath = getUnprotectedImageURL(); $ext = strtolower(strrchr(getUnprotectedImageURL(), ".")); } else { $ext = strtolower(strrchr($moviepath, ".")); } if (empty($imagetitle)) { $imagetitle = getImageTitle(); } if (!empty($count)) { $count = "-" . $count; } $imgextensions = array(".jpg", ".jpeg", ".gif", ".png"); if (is_null($_zp_current_image)) { $albumfolder = $moviepath; $filename = $imagetitle; $videoThumb = ''; } else { $album = $_zp_current_image->getAlbum(); $albumfolder = $album->name; $filename = $_zp_current_image->filename; $videoThumb = checkObjectsThumb(getAlbumFolder() . $albumfolder, $filename); if (!empty($videoThumb)) { $videoThumb = getAlbumFolder(WEBPATH) . $albumfolder . '/' . $videoThumb; } } $output = ''; $output .= '<p id="player' . $count . '"><a href="http://www.macromedia.com/go/getflashplayer">' . gettext("Get Flash") . '</a> to see this player.</p> <script type="text/javascript">'; if ($ext === ".mp3" and !isset($videoThumb)) { $output .= ' var so = new SWFObject("' . WEBPATH . '/' . ZENFOLDER . '/plugins/flvplayer/' . getOption("flv_player_version") . '.swf","player' . $count . '","' . getOption('flv_player_width') . '","' . FLV_PLAYER_MP3_HEIGHT . '","7");'; } else { $output .= ' var so = new SWFObject("' . WEBPATH . '/' . ZENFOLDER . '/plugins/flvplayer/' . getOption("flv_player_version") . '.swf","player' . $count . '","' . getOption('flv_player_width') . '","' . getOption('flv_player_height') . '","7");'; $output .= 'so.addVariable("displayheight","' . getOption('flv_player_displayheight') . '");'; } $output .= 'so.addParam("allowfullscreen","true"); so.addVariable("file","' . $moviepath . '&title=' . strip_tags($imagetitle) . '"); ' . (!empty($videoThumb) ? 'so.addVariable("image","' . $videoThumb . '")' : '') . ' so.addVariable("backcolor","' . getOption('flv_player_backcolor') . '"); so.addVariable("frontcolor","' . getOption('flv_player_frontkcolor') . '"); so.addVariable("lightcolor","' . getOption('flv_player_lightcolor') . '"); so.addVariable("screencolor","' . getOption('flv_player_screencolor') . '"); so.addVariable("autostart","' . (getOption('flv_player_autostart') ? 'true' : 'false') . '"); so.addVariable("overstretch","true"); so.addVariable("bufferlength","' . getOption('flv_player_buffer') . '"); so.addVariable("controlbar","' . getOption('flv_player_controlbar') . '"); so.write("player' . $count . '"); </script>'; return $output; }
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 m9GetRSS($option) { global $_zp_current_album; $host = htmlentities($_SERVER['HTTP_HOST'], ENT_QUOTES, 'UTF-8'); $lang = getOption('locale'); switch ($option) { case 'gallery': return 'http://' . $host . WEBPATH . '/rss.php?lang=' . $lang; case 'album': return 'http://' . $host . WEBPATH . '/rss.php?albumtitle=' . urlencode(getAlbumTitle()) . '&albumname=' . urlencode($_zp_current_album->getFilename()) . '&lang=' . $lang; case 'collection': return 'http://' . $host . WEBPATH . '/rss.php?albumtitle=' . urlencode(getAlbumTitle()) . '&folder=' . urlencode($_zp_current_album->getFilename()) . '&lang=' . $lang; case 'comments': return 'http://' . $host . WEBPATH . '/rss-comments.php?lang=' . $lang; case 'comments-image': return 'http://' . $host . WEBPATH . '/rss-comments.php?id=' . $_zp_current_image->getID() . '&title=' . urlencode(getImageTitle()) . '&type=image&lang=' . $lang; case 'comments-album': return 'http://' . $host . WEBPATH . '/rss-comments.php?id=' . $_zp_current_album->getID() . '&title=' . urlencode(getAlbumTitle()) . '&type=album&lang=' . $lang; case 'albums-rss': return 'http://' . $host . WEBPATH . '/rss.php?lang=' . $lang . '&albumsmode'; } }
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'); }
<?php require_once 'theme_functions.php'; define("AREA", GALLERY); TileSet::init(getGalleryTitle() . ' : ' . getAlbumTitle() . ' : ' . getImageTitle(), "album"); include_once 'template.php';
<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> <?php } ?> </div> </div> <div id="data"> <?php if (getImageMetaData()) { echo '<div>' . printImageMetadata() . '</div>'; } ?> </div>
<div id="images_tlg"> <?php while (next_image()) { ?> <div class="image"> <div id="image_box"> <div id="image_position"> <a href="<?php echo getImageURL(); ?> " title="<?php echo getImageTitle(); ?> "><?php printImageThumb(getImageTitle()); ?> </a> </div> </div> </div> <?php } ?> <p style="margin:0px;padding:0px;clear: both; "> </p> </div> <?php printPageListWithNav("« prev", "next »");
?> "> <?php printDefaultSizedImage(html_encode(getImageTitle()), 'image', 'player'); ?> </a> <?php } else { printDefaultSizedImage(html_encode(getImageTitle()), 'image', 'player'); } ?> </div> <div class="data"> <?php if (getImageTitle()) { echo '<div class="c"><h4 class="box title">' . getImageTitle() . '</h4></div>'; } ?> <?php if (getImageDesc()) { echo '<div class="c"><div class="box desc">' . getImageDesc() . '</div></div>'; } ?> <?php if (getImageLocation()) { echo '<div class="c"><small class="box location">' . getImageLocation() . '</small></div>'; } ?> <?php if (getImageDate()) { echo '<div class="c"><small class="box date">' . getImageDate('%d.%m.%y %H:%M') . '</small></div>';
/** * Prints title of the current image * * @author Ozh */ function printImageTitle() { echo html_encodeTagged(getImageTitle()); }
?> </ul> </div> <?php } ?> <?php while (next_image()) { ?> <div class="box <?php echo $zpmas_col_image; ?> "> <?php if ($zpmas_imagetitle) { echo '<h3>' . getImageTitle() . '</h3>'; } ?> <div class="image-block" style="width:<?php echo $zpmas_image_size; ?> px;height:<?php echo $zpmas_image_size; ?> px;"> <div class="back"> <a class="thumb-link" href="<?php echo html_encode(getImageURL()); ?> " title="<?php echo getBareImageTitle();
/** * @deprecated * @since 1.4.3 */ function printImageDiv() { deprecated_functions::notify(gettext('Use printImageThumb().')); if (!isset($_GET['sortable'])) { echo '<a href="' . html_encode(getImageURL()) . '" title="' . html_encode(getImageTitle()) . '">'; } printImageThumb(getImageTitle()); if (!isset($_GET['sortable'])) { echo '</a>'; } }
<?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 src="<?php echo getCustomImageURL(100, 100, 100, 100); ?> " alt="<?php echo 'Image ' . ($count + ($currentPage - 1) * $imagesPerPage) . ' of ' . getNumImages(); ?> " width="100" height="100"<?php if ($pc_AjaxFx) { echo ' onLoad="new Effect.Fade(this, {from: 1 , to: .5, queue: \'parallel\', duration: .3});"
/** * Prints the JS configuration of flv player * * @param string $moviepath the direct path of a movie (within the slideshow), if empty (within albums) the ZenPhoto function getUnprotectedImageURL() is used * @param string $imagetitle the title of the movie to be passed to the player for display (within slideshow), if empty (within albums) the function getImageTitle() is used * @param string $count unique text for when there are multiple player items on a page */ function getPlayerConfig($moviepath = '', $imagetitle = '', $count = '') { global $_zp_current_image, $_zp_current_album, $_flv_player; if (empty($moviepath)) { $moviepath = getUnprotectedImageURL(); $ext = strtolower(strrchr(getUnprotectedImageURL(), ".")); } else { $ext = strtolower(strrchr($moviepath, ".")); } if (empty($imagetitle)) { $imagetitle = getImageTitle(); } if (!empty($count)) { $count = "-" . $count; } $imgextensions = array(".jpg", ".jpeg", ".gif", ".png"); if (is_null($_zp_current_image)) { $albumfolder = $moviepath; $filename = $imagetitle; $videoThumb = ''; } else { $album = $_zp_current_image->getAlbum(); $albumfolder = $album->name; $filename = $_zp_current_image->filename; $videoThumb = $_zp_current_image->objectsThumb; if (!empty($videoThumb)) { $videoThumb = getAlbumFolder(WEBPATH) . $albumfolder . '/' . $videoThumb; } } $output = ''; $output .= '<p id="player' . $count . '">' . gettext('The flv player is not installed. Please install or activate the flv player plugin.') . '</p> <script type="text/javascript">' . "\n\n"; if ($ext === ".mp3" and !isset($videoThumb)) { $output .= 'var so = new SWFObject("' . WEBPATH . "/" . USER_PLUGIN_FOLDER . '/flvplayer/' . $_flv_player . '","player' . $count . '","' . getOption('flv_player_width') . '","' . FLV_PLAYER_MP3_HEIGHT . '",7);' . "\n"; } else { $output .= 'var so = new SWFObject("' . WEBPATH . "/" . USER_PLUGIN_FOLDER . '/flvplayer/' . $_flv_player . '","player' . $count . '","' . getOption('flv_player_width') . '","' . getOption('flv_player_height') . '","7");' . "\n"; } $output .= 'so.addVariable("file","' . $moviepath . '&title=' . strip_tags($imagetitle) . '");' . "\n"; if (!empty($videoThumb)) { $output .= 'so.addVariable("image","' . $videoThumb . '");' . "\n"; } $output .= 'so.addVariable("backcolor","' . getOptionColor('flv_player_backcolor') . '");' . "\n"; $output .= 'so.addVariable("frontcolor","' . getOptionColor('flv_player_frontcolor') . '");' . "\n"; $output .= 'so.addVariable("lightcolor","' . getOptionColor('flv_player_lightcolor') . '");' . "\n"; $output .= 'so.addVariable("screencolor","' . getOptionColor('flv_player_screencolor') . '");' . "\n"; $output .= 'so.addVariable("autostart",' . (getOption('flv_player_autostart') ? 'true' : 'false') . ');' . "\n"; $output .= 'so.addVariable("stretching","' . getOption('flv_player_stretching') . '");' . "\n"; $output .= 'so.addVariable("bufferlength",' . getOption('flv_player_buffer') . ');' . "\n"; $output .= 'so.addVariable("controlbar","' . getOption('flv_player_controlbar') . '");' . "\n"; $output .= 'so.addParam("allowfullscreen",true);' . "\n"; $output .= 'so.write("player' . $count . '");' . "\n"; $output .= "\n</script>\n"; return $output; }
foreach ($set['content'] as $image) { if ($image['extension'] == "txt") { // Read in text file and use contents for description $f = $image['path'] . '/' . $image['file']; $fh = fopen($f, 'r'); $contents = fread($fh, filesize($f)); fclose($fh); // Add description attribute to this set if available $g->setAttribute('description', $contents); } else { $img = $doc->createElement('img'); //$img->setAttribute('path', $image['path']); $img->setAttribute('src', $image['file']); $img->setAttribute('width', $image['width']); $img->setAttribute('height', $image['height']); $img->setAttribute('title', getImageTitle($image['file'])); $img->setAttribute('data-extension', $image['extension']); $img->setAttribute('data-last-modified', $image['modified']); $g->appendChild($img); } } $c->appendChild($g); } } // Close the category tag $a->appendChild($c); } } // Close the album tag $r->appendChild($a); }
printCustomSizedImageMaxSpace(getImageTitle(), 490, 700); ?> </a><?php } ?> <?php if ($zpgal_final_link == 'standard-new') { ?> <a target="_blank" href="<?php echo htmlspecialchars(getFullImageURL()); ?> " title="<?php echo getBareImageTitle(); ?> "><?php printCustomSizedImageMaxSpace(getImageTitle(), 490, 700); ?> </a><?php } ?> </div> <?php if (function_exists('printGoogleMap')) { setOption('gmap_width', 490, false); printGoogleMap(); } ?> </div> <?php if (function_exists('printCommentForm')) {
/** * Places Google Checkout Options on your page. * * @param array $pricelist optional array of specific pricing for the image. */ function googleCheckout($pricelist = NULL) { if (!is_array($pricelist)) { $pricelist = GoogleCheckoutPricelistFromString(getOption('GoogleCheckout_pricelist')); } ?> <div id="GoogleCheckout" class="product"> <input type="hidden" class="product-image" value="<?php echo getImageThumb(); ?> " /> <input type="hidden" class="product-title" value="Album: <?php echo getAlbumTitle(); ?> Photo: <?php echo getImageTitle(); ?> " /> <input type="hidden" class="product-shipping" value="<?php echo getOption('googleCheckout_ship_cost'); ?> " /> Size/Finish: <select class="product-attr-sizefinish"> <option googlecart-set-product-price=""></option> <?php foreach ($pricelist as $key => $price) { ?> <option googlecart-set-product-price="<?php echo $price; ?> "><?php echo $key; ?> </option> <?php } ?> </select><br /> Price: <span class="product-price">Choose Size/Finish</span><br /> How Many: <input type="text" class="googlecart-quantity" value="1" style="width:20px;" /> <span class="googlecart-add-button"></span> </div> <?php }
$fullimage = getFullImageURL(); } else { $fullimage = NULL; } if (!empty($fullimage)) { ?> <a href="<?php echo html_encode(pathurlencode($fullimage)); ?> " title="<?php printBareImageTitle(); ?> " class="thickbox"> <?php } printCustomSizedImage(getImageTitle(), null, 520); if (!empty($fullimage)) { ?> </a> <?php } ?> </div> <?php if (function_exists('printAddToFavorites')) { printAddToFavorites($_zp_current_image); } @call_user_func('printRating'); @call_user_func('printCommentForm'); printCodeblock(2); footer();
" class="image"> <a title="<?php echo html_encode(getImageTitle()); ?> " href="<?php echo html_encode($imgURL); ?> "<?php echo $boxclass . $cbRel; ?> > <img src="<?php echo getCustomImageURL(NULL, 298, 187, 298, 187, NULL, NULL, true); ?> " alt="<?php echo html_encode(getImageTitle()); ?> " /> </a> </li> <?php } ?> </ul> <div class="data"> <?php if (getAlbumTitle()) { echo '<div class="c"><h4 class="box title">' . getAlbumTitle() . '</h4></div>'; } ?> <?php
/** * @deprecated */ function printCustomSizedImageMaxHeight($maxheight) { deprecated_function_notify(gettext('Use printCustomSizedImageMaxSpace().')); if (getFullWidth() === getFullHeight() or getDefaultHeight() > $maxheight) { printCustomSizedImage(getImageTitle(), null, null, $maxheight, null, null, null, null, null, null); } else { printDefaultSizedImage(getImageTitle()); } }
/** * Causes a Google map to be printed based on the gps data in the current image * @param string $zoomlevel the zoom in for the map * @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 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 printImageMap($zoomlevel = NULL, $defaultmaptype = NULL, $width = NULL, $height = NULL, $text = NULL, $toggle = true, $id = 'googlemap', $mapselections = NULL, $addwiki = NULL, $background = NULL, $mapcontrol = NULL, $maptypecontrol = NULL, $customJS = NULL) { global $_zp_phoogle; if (getOption('gmaps_apikey') != '') { $exif = getImageEXIFData(); if (!empty($exif['EXIFGPSLatitude']) && !empty($exif['EXIFGPSLongitude'])) { $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; } $lat = $exif['EXIFGPSLatitude']; $long = $exif['EXIFGPSLongitude']; if ($exif['EXIFGPSLatitudeRef'] == 'S') { $lat = '-' . $lat; } if ($exif['EXIFGPSLongitudeRef'] == 'W') { $long = '-' . $long; } $desc = getImageDesc(); if (empty($desc)) { $desc = getImageTitle(); } addPoint($lat, $long, js_encode($desc)); $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(); echo " </div>\n"; } } }
<?php } else { ?> <li class="disabled"><a href="#"><?php echo gettext('next'); ?> →</a></li> <?php } ?> </ul> </div> <div class="center"> <?php printDefaultSizedImage(getImageTitle(), 'image ombre remove-attributes'); ?> </div> <div class="row photo-description"> <div class="span3 offset2"> <h4> <?php if (getOption('zpB_show_exif') && getImageMetaData()) { ?> <a href="#exif_data" data-toggle="modal"><i class="icon-info-sign"></i></a> <?php } ?> <?php printImageTitle(true);
printCustomSizedImageMaxSpace(getImageTitle(), 600, 900); ?> </a><?php } ?> <?php if ($zpfocus_final_link == 'standard-new') { ?> <a target="_blank" href="<?php echo htmlspecialchars(getFullImageURL()); ?> " title="<?php echo getBareImageTitle(); ?> "><?php printCustomSizedImageMaxSpace(getImageTitle(), 600, 900); ?> </a><?php } ?> </div> </div> <?php if (function_exists('printThumbNav')) { printThumbNav(5, NULL, 87, 87, 87, 87, false); } else { if (function_exists("printPagedThumbsNav")) { printPagedThumbsNav(5, true, ' ', ' ', 87, 87); } }
function zp_side_bar() { ?> <div id="sidebar"> <?php //-------------If you are in the Image Page if (in_context(ZP_IMAGE)) { ?> <div class="imgnav"> <?php if (hasPrevImage()) { ?> <div class="imgprevious"><a href="<?php echo getPrevImageURL(); ?> " title="Previous Image"><img src="<?php echo getPrevImageThumb(); ?> " /><br /><small>« prev |</small></a></div> <?php } if (hasNextImage()) { ?> <div class="imgnext"><a href="<?php echo getNextImageURL(); ?> " title="Next Image"><img src="<?php echo getNextImageThumb(); ?> " /><br /><small>| next »</small></a></div> <?php } ?> </div> <div id="sbinfo"> <b>Album Name:</b> <?php printAlbumTitle(true); ?> <br /> <b>Number of Photos:</b> <?php echo getNumImages(); ?> <br /> <b>Album Date:</b> <?php printAlbumDate($before = "Date: ", $format = "%F"); ?> <br /> <b>Album Description:</b> <?php printAlbumDesc(true); ?> <br /> <b>Image Name:</b> <?php echo getImageTitle(); ?> <br /> <b>Image Description:</b> <?php printImageDesc(true); ?> <br /> </div> <?php //--------------- If you are in the Album Page } else { if (in_context(ZP_ALBUM)) { ?> <b>Album Name:</b> <?php printAlbumTitle(true); ?> <br /> <b>Number of Pictures:</b> <?php echo getNumImages(); ?> <br /> <b>Album Date:</b> <?php printAlbumDate($before = "Date: ", $format = "%F"); ?> <br /> <b>Album Description:</b> <?php printAlbumDesc(true); ?> <br /> <?php //--------------- If you are in the Index Page } else { if (in_context(ZP_INDEX)) { } } } ?> </div> <?php }
/** * Prints the RDF trackback url information for external clients to autodiscover. * This code is invisible and within comments on the theme page. * * For theme usage. * */ function printTrackbackRDF() { global $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_current_album, $_zp_current_image; // check if Zenpage is there... if (getOption('zp_plugin_zenpage')) { if (is_NewsArticle()) { $trackback = $this->getTrackbackURL($_zp_current_zenpage_news); $title = getNewsTitle(); $permalink = $this->getPermalinkURL($_zp_current_zenpage_news, $host); } if (is_Pages()) { $trackback = $this->getTrackbackURL($_zp_current_zenpage_page); $title = getPageTitle(); $permalink = $this->getPermalinkURL($_zp_current_zenpage_page); } } if (in_context(ZP_ALBUM)) { $trackback = $this->getTrackbackURL($_zp_current_album); $title = getAlbumTitle(); $permalink = $this->getPermalinkURL($_zp_current_album); } if (in_context(ZP_IMAGE)) { $trackback = $this->getTrackbackURL($_zp_current_image); $title = getImageTitle(); $permalink = $this->getPermalinkURL($_zp_current_image); } echo $this->rdf_autodiscover("", $title, "", $permalink, $trackback, ""); }
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(); ?> ]]></caption></image><?php } ?> </simpleviewerGallery><?php }
/** * Places a Paypal button on your form * * @param array $pricelist optional array of specific pricing for the image. * @param bool $pricelistlink set to true to include link for exposing pricelist * @param string $text The text to place for the link (defaults to "Price List") * @param string $textTag HTML tag for the link text. E.g. h3, ... * @param string $idtag the division ID for the price list. (NB: a div named $id appended with "_data" is */ function zenPaypal($pricelist = NULL, $pricelistlink = false, $text = NULL, $textTag = "l1", $idtag = "zenPaypalPricelist") { if (!is_array($pricelist)) { $pricelist = zenPaypalPricelistFromString(getOption('zenPaypal_pricelist')); } ?> <script language="javascript"> function paypalCalculateOrder(myform) { <?php $sizes = array(); $media = array(); foreach ($pricelist as $key => $price) { $itemparts = explode(':', $key); $media[] = $itemparts[1]; $sizes[] = $itemparts[0]; echo 'if (myform.os0.value == "' . $itemparts[0] . '" && myform.os1.value == "' . $itemparts[1] . '") {' . "\n"; echo 'myform.amount.value = ' . $price . ';' . "\n"; echo 'myform.item_name.value = "' . getImageTitle() . ' - Photo Size ' . $itemparts[0] . ' - ' . $itemparts[1] . '";' . "\n"; echo '}' . "\n"; } ?> } </script> <?php $locale = getOption('locale'); if (empty($locale)) { $locale = 'en_US'; } ?> <div id="BuyNow"> <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" name="myform"> <input type="hidden" name="on0" value="Size"> <label>Size</label> <select name="os0"> <?php $media = array_unique($media); $sizes = array_unique($sizes); foreach ($sizes as $size) { echo '<option value="' . $size . '" selected>' . $size . "\n"; } ?> </select> <input type="hidden" name="on1" value="Color"> <label><?php echo gettext("Stock"); ?> </label> <select name="os1"> <?php foreach ($media as $paper) { echo '<option value="' . $paper . '" selected>' . $paper . "\n"; } ?> </select> <input type="image" src="https://www.paypal.com/<?php echo $locale; ?> /i/btn/x-click-butcc.gif" border="0" name="submit" onClick="paypalCalculateOrder(this.form)" alt=<?php gettext("Make payments with PayPal - it's fast, free and secure!"); ?> class="buynow_button"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="<?php echo getOption('zenPaypal_userid'); ?> "> <input type="hidden" name="item_name" value="Options Change Amount"> <input type="hidden" name="amount" value="1.00"> <input type="hidden" name="shipping" value="<?php echo getOption('zenPaypal_ship_cost'); ?> "> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="<?php echo getOption('zenPaypal_currency'); ?> "> <input type="hidden" name="return" value="<?php echo 'http://' . $_SERVER['SERVER_NAME'] . htmlspecialchars(getNextImageURL()); ?> "> <input type="hidden" name="cancel_return" value="<?php echo 'http://' . $_SERVER['SERVER_NAME'] . htmlspecialchars(getImageLinkURL()); ?> "> </form> <?php if ($pricelistlink) { zenPaypalPrintPricelist($pricelistlink, $text, $textTag, $idtag); } ?> </div> <?php }
if ($isAlbumPage) { $u = 0; while (next_album()) { $a = $_zp_current_album; $thumb = $a->getAlbumThumbImage(); $title = $a->getTitle(); $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++;
$firstImage = $lastImage; } else { $lastImage++; } if (isLandscape()) { $iw = 89; $ih = NULL; $cw = 89; $ch = 67; } else { $iw = NULL; $ih = 89; $ch = 89; $cw = 67; } echo "\n<li class=\"thumb\"><span><em style=\"background-image:url(" . htmlspecialchars($_zp_current_image->getCustomImage(NULL, $iw, $ih, $cw, $ch, NULL, NULL, true)) . '); "><a href="' . htmlspecialchars(getImageLinkURL()) . '" title="' . getAnnotatedImageTitle() . '" style="background:#fff;">"' . getImageTitle() . '"</a></em></span></li>'; } if (!is_null($lastImage) && $lastImage < getNumImages()) { $np = getCurrentPage() + 1; ?> <li class="thumb"><span class="forward"><em style="background-image:url('<?php echo $_zp_themeroot; ?> /images/moreslide_next.gif');"> <a href="<?php echo htmlspecialchars(getPageURL($np, $np)); ?> " style="background:#fff;"><?php echo gettext('Next page'); ?> </a></em></span></li>
<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); ?> </div> <div id="smaller_tlg"> <?php echo "<h3>EXIF Data</h3>";
echo "</li>\n"; } */ if (hasNextImage()) { $link = getNextImageURL(); } else { $link = "#"; } echo "<li><a href=\"{$link}\" title=\"Next Image\">»</a></li>"; ?> </ul> </div> <div id="imageList"> <?php printCustomSizedImage(getImageTitle(), 320); ?> </div> <div id="text"> <?php printImageDesc(true); ?> <div id="commentbox"> <?php if (function_exists('printCommentForm')) { printCommentForm(); } ?>