コード例 #1
0
ファイル: image.php プロジェクト: ariep/ZenPhoto20-DEV
}
?>
				<?php 
if (getTags() || zp_loggedin()) {
    ?>
<div class="sidebar-section"><?php 
    printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', '');
    ?>
</div><?php 
}
?>
				<?php 
if (!$zpmin_disablemeta) {
    ?>
					<?php 
    if (getImageMetaData() || zp_loggedin()) {
        ?>
<div class="sidebar-section"><?php 
        printImageMetadata('', false, null, 'full-image-meta', true);
        ?>
</div><?php 
    }
    ?>
				<?php 
}
?>
				<?php 
if (function_exists('printSlideShowLink')) {
    ?>
<div class="sidebar-section"><div class="slideshow-link"><?php 
    printSlideShowLink(gettext('View Slideshow'));
コード例 #2
0
/**
 * Prints the Metadata data of the current image
 *
 * @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
 * @author Ozh
 */
function printImageMetadata($title = NULL, $toggle = true, $id = 'imagemetadata', $class = null, $span = NULL)
{
    global $_zp_exifvars, $_zp_current_image;
    if (false === ($exif = getImageMetaData($_zp_current_image, true))) {
        return;
    }
    if (is_null($title)) {
        $title = gettext('Image Info');
    }
    if ($class) {
        $class = ' class="' . $class . '"';
    }
    if (!$span) {
        $span = 'exif_link';
    }
    $dataid = $id . '_data';
    if ($id) {
        $id = ' id="' . $id . '"';
    }
    $refh = $refa = $style = '';
    if ($toggle == 'colorbox' && zp_has_filter('theme_head', 'colorbox::css')) {
        $refh = '<a href="#" class="colorbox" title="' . $title . '">';
        $refa = '</a>';
        $style = ' style="display:none"';
    } else {
        if ($toggle) {
            $refh = '<a href="javascript:toggle(\'' . $dataid . '\');" title="' . $title . '">';
            $refa = '</a>';
            $style = ' style="display:none"';
        }
    }
    ?>
	<span id="<?php 
    echo $span;
    ?>
" class="metadata_title">
		<?php 
    echo $refh;
    echo $title;
    echo $refa;
    ?>
	</span>
	<div id="<?php 
    echo $dataid;
    ?>
"<?php 
    echo $style;
    ?>
>
		<div<?php 
    echo $id . $class;
    ?>
>
			<table>
				<?php 
    foreach ($exif as $field => $value) {
        $label = $_zp_exifvars[$field][2];
        echo "<tr><td class=\"label\">{$label}:</td><td class=\"value\">";
        switch ($_zp_exifvars[$field][6]) {
            case 'time':
                echo zpFormattedDate(DATE_FORMAT, strtotime($value));
                break;
            default:
                echo html_encode($value);
                break;
        }
        echo "</td></tr>\n";
    }
    ?>
			</table>
		</div>
	</div>
	<?php 
}
コード例 #3
0
ファイル: image.php プロジェクト: hatone/zenphoto-1.4.1.4
?>
</div>
		<?php 
printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', ', ');
?>
		<br style="clear:both;" /><br />
		<?php 
if (function_exists('printSlideShowLink')) {
    echo '<span id="slideshowlink">';
    printSlideShowLink(gettext('View Slideshow'));
    echo '</span>';
}
?>

		<?php 
if (getImageMetaData()) {
    echo "<div id=\"exif_link\"><a href=\"#\" title=\"" . gettext("Image Info") . "\" class=\"colorbox\">" . gettext("Image Info") . "</a></div>";
    echo "<div style='display:none'>";
    printImageMetadata('', false);
    echo "</div>";
}
?>

		<br style="clear:both" />
		<?php 
if (function_exists('printRating')) {
    printRating();
}
?>
		<?php 
if (function_exists('printGoogleMap')) {
コード例 #4
0
ファイル: image.php プロジェクト: ariep/ZenPhoto20-DEV
			<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);
?>
					</h4>
					<?php 
if (getOption('zpB_show_exif') && getImageMetaData()) {
    ?>
					<div id="exif_data" class="modal hide"><?php 
    printImageMetadata('', false);
    ?>
</div>
					<script type="text/javascript">
						jQuery(document).ready(function($) {
							$('#exif_data').modal({
								show: false
							});
						});
					</script>
					<?php 
}
?>
コード例 #5
0
ファイル: functions.php プロジェクト: ariep/ZenPhoto20-DEV
function zpardoise_printEXIF()
{
    $Meta_data = getImageMetaData();
    // put all exif data in a array
    if (!is_null($Meta_data)) {
        $Exifs_list = '';
        if (isset($Meta_data['EXIFModel'])) {
            $Exifs_list .= html_encode($Meta_data['EXIFModel']);
        }
        if (isset($Meta_data['EXIFFocalLength'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFFocalLength']);
        }
        if (isset($Meta_data['EXIFFNumber'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFFNumber']);
        }
        if (isset($Meta_data['EXIFExposureTime'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFExposureTime']);
        }
        if (isset($Meta_data['EXIFISOSpeedRatings'])) {
            $Exifs_list .= ' &ndash; ' . html_encode($Meta_data['EXIFISOSpeedRatings']) . ' ISO';
        }
        echo $Exifs_list;
    }
}
コード例 #6
0
ファイル: GoogleMap.php プロジェクト: hatone/zenphoto-1.4.1.4
/**
 * Returns true if the current image has EXIF location data
 *
 * @return bool
 */
function hasMapData()
{
    $exif = getImageMetaData(NULL, false);
    if (!empty($exif['EXIFGPSLatitude']) && !empty($exif['EXIFGPSLongitude'])) {
        return true;
    }
    return false;
}
コード例 #7
0
ファイル: VideoJS.php プロジェクト: JimBrown/VideoJS
    /**
     * Get the JS configuration of VideoJS
     *
     * @param mixed $movie the image object
     * @param string $movietitle the title of the movie
     *
     */
    function getPlayerConfig($movie, $movietitle = NULL)
    {
        global $_zp_current_album;
        $moviepath = $movie->getFullImageURL(FULLWEBPATH);
        $ext = getSuffix($moviepath);
        if (!in_array($ext, array('m4v', 'mp4', 'flv'))) {
            return '<span class="error">' . gettext('This multimedia format is not supported by VideoJS') . '</span>';
        }
        $autoplay = '';
        if (getOption('VideoJS_autoplay')) {
            $autoplay = ' autoplay';
        }
        $videoThumb = '';
        if (getOption('VideoJS_poster')) {
            $videoThumb = $movie->getCustomImage(null, $this->width, $this->height, $this->width, $this->height, null, null, true);
        }
        $videoRes = getOption('VideoJS_resolution');
        $metadata = getImageMetaData(NULL, false);
        $vidWidth = $metadata['VideoResolution_x'];
        $vidHeight = $metadata['VideoResolution_y'];
        $playerconfig = '
			<div id="player" >
				<video id="MyPlayer" class="video-js vjs-default-skin" controls' . $autoplay . ' preload="auto" width=' . $vidWidth . ' poster="' . $videoThumb . '">
					' . $this->getCounterpartFile($moviepath, "mp4", "HD") . '
					' . $this->getCounterpartFile($moviepath, "mp4", "SD") . '
					' . $this->getCounterpartFile($moviepath, "ogv", "HD") . '
					' . $this->getCounterpartFile($moviepath, "ogv", "SD") . '
					' . $this->getCounterpartFile($moviepath, "webm", "HD") . '
					' . $this->getCounterpartFile($moviepath, "webm", "SD") . '
				</video>
			</div>
			<script type="text/javascript">
				videojs("MyPlayer", {
					plugins: {
						videoJsResolutionSwitcher: {
							default: "' . $videoRes . '",
							dynamicLabel: true
						}
					}
				}, function(){
					var player = this;
					window.player = player
					player.on("play", function(){
						player.poster("")
					})
				})
			</script>';
        return $playerconfig;
    }
コード例 #8
0
/**
 * Prints the Metadata 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 = '')
{
    global $_zp_exifvars, $_zp_current_image;
    if (false === ($exif = getImageMetaData($_zp_current_image, true))) {
        return;
    }
    if (is_null($title)) {
        $title = gettext('Image Info');
    }
    // Metadata values will be editable only with sufficient privileges
    $editable = $editable && zp_loggedin();
    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) {
        $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";
}