if (($num = getNumImages()) > 1) { printf(gettext('%1$u of %2$u photos'), imageNumber(), getNumImages()); } ?> </li> <li class="date"><?php printImageDate(); ?> </li> <li class="tags"><?php echo getAlbumPlace(); ?> </li> <li class="exif"> <?php if (getImageEXIFData()) { echo "<a href=\"#TB_inline?height=345&width=300&inlineId=imagemetadata\" title=\"" . gettext("image details") . "\" class=\"thickbox\">" . gettext('Image Info') . "</a>"; printImageMetadata('', false); echo " / "; } ?> <a href="<?php echo htmlspecialchars(getFullImageURL()); ?> " title="<?php echo getBareImageTitle(); ?> "><?php echo gettext('Full Size'); ?> </a>
<div class="gallerymeta"> <?php if (getBareImageDesc()) { ?> <p> <?php printImageDesc(true); ?> </p> <br /> <?php } ?> <?php if ($exif = getImageEXIFData() and $exif['EXIFMake'] != '') { ?> <ul> <li> <strong>Camera Make:</strong> <?php echo $exif['EXIFMake']; ?> </li> <li> <strong>Camera Model:</strong> <?php echo $exif['EXIFModel']; ?> </li> <li>
/** * 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"; } } }
/** * Prints the EXIF data of the current image, and make each value editable in place if applicable * * @param string $title title tag for the class * @param bool $toggle set to true to get a javascript toggle on the display of the data * @param string $id style class id * @param string $class style class * @param bool $editable set true to allow editing by the admin * @param string $editclass CSS class applied to element when editable * @param mixed $messageIfEmpty Either bool or string. If false, echoes nothing when description is empty. If true, echoes default placeholder message if empty. If string, echoes string. * @author Ozh */ function printImageMetadata($title = NULL, $toggle = true, $id = 'imagemetadata', $class = null, $editable = false, $editclass = '', $messageIfEmpty = '') { if (false === ($exif = getImageEXIFData())) { return; } global $_zp_exifvars, $_zp_current_image; if (is_null($title)) { $title = gettext('Image Info'); } // EXIF values will be editable only with sufficient privileges and if values are stored in the database $editable = $editable && zp_loggedin() && $_zp_current_image->get('EXIFValid') == 1; if ($messageIfEmpty === true) { $messageIfEmpty = gettext('(No data)'); } $dataid = $id . '_data'; echo "<div" . ($class ? " class=\"{$class}\"" : "") . ($id ? " id=\"{$id}\"" : "") . ">\n"; if ($toggle) { echo "<a href=\"javascript:toggle('{$dataid}');\">"; } echo "<span class='metadata_title'>{$title}</span>"; if ($toggle) { echo "</a>\n"; } echo "<table id=\"{$dataid}\"" . ($toggle ? " style=\"display: none;\"" : '') . ">\n"; foreach ($exif as $field => $value) { $display = $_zp_exifvars[$field][3]; if ($display) { $label = $_zp_exifvars[$field][2]; echo "<tr><td class=\"label\">{$label}:</td><td class=\"value\">"; printEditable('image', $field, $editable, $editclass, $messageIfEmpty, false, $value); echo "</td></tr>\n"; } } echo "</table>\n</div>\n"; }