コード例 #1
0
/**
 * @deprecated
 */
function printImageEXIFData()
{
    deprecated_function_notify(gettext('Use printImageMetadata().'));
    if (isImageVideo()) {
    } else {
        printImageMetadata();
    }
}
コード例 #2
0
ファイル: image.php プロジェクト: eyalfyber/zpbase
/*	zpBase image.php 
*	This theme page shows the large default sized single image.
*	http://www.oswebcreations.com
================================================== */
if (isset($_GET['show'])) {
    include 'inc/image-popup.php';
} else {
    include 'inc/header.php';
    ?>
			
	<div class="container" id="middle">
		<div class="row">
			<div id="content">
				<div id="image-full" class="block clearfix">
					<div id="single-img-nav"<?php 
    if (isImageVideo()) {
        echo ' class="video-nav"';
    }
    ?>
>
						<?php 
    if (hasPrevImage()) {
        ?>
						<a class="prev-link" href="<?php 
        echo html_encode(getPrevImageURL());
        ?>
" title="<?php 
        echo gettext("Previous Image");
        ?>
"><span></span></a>
						<?php 
コード例 #3
0
ファイル: album.php プロジェクト: Imagenomad/Unsupported
    ?>
px;">
						<div class="back">
							<a class="thumb-link" href="<?php 
    echo html_encode(getImageURL());
    ?>
" title="<?php 
    echo getBareImageTitle();
    ?>
"><?php 
    printCustomSizedImage(getAnnotatedImageTitle(), null, $zpmas_image_size, $zpmas_image_size, $zpmas_image_size, $zpmas_image_size, null, null, null, null, true);
    ?>
</a>
						</div>
						<?php 
    if (!isImageVideo()) {
        ?>
						<div class="overlay">
							<a class="zpmas-cb" href="<?php 
        if ($zpmas_cbtarget) {
            echo htmlspecialchars(getDefaultSizedImage());
        } else {
            echo htmlspecialchars(getUnprotectedImageURL());
        }
        ?>
" title="<?php 
        echo getBareImageTitle();
        ?>
"><img src="<?php 
        echo $_zp_themeroot;
        ?>
コード例 #4
0
/**
 * Helper function to get the image/video extra entries for albums if the Google video extension is enabled
 * @return string
 */
function getSitemapGoogleImageVideoExtras($albumobj, $imageobj, $locale)
{
    $data = '';
    $host = PROTOCOL . '://' . html_encode($_SERVER["HTTP_HOST"]);
    $ext = strtolower(strrchr($imageobj->filename, "."));
    $location = '';
    if ($imageobj->getLocation()) {
        $location .= $imageobj->getLocation($locale) . ', ';
    }
    if ($imageobj->getCity()) {
        $location .= $imageobj->getCity($locale) . ', ';
    }
    if ($imageobj->getState()) {
        $location .= $imageobj->getState($locale) . ', ';
    }
    if ($imageobj->getCountry()) {
        $location .= $imageobj->getCountry($locale);
    }
    $license = get_language_string(getOption('sitemap_license'), $locale);
    if (isImageVideo($imageobj) && in_array($ext, array('.mpg', '.mpeg', '.mp4', '.m4v', '.mov', '.wmv', '.asf', '.avi', '.ra', '.ram', '.flv', '.swf'))) {
        // google says it can index these so we list them even if unsupported by Zenphoto
        $data .= sitemap_echonl("\t\t<video:video>\n\t\t\t<video:thumbnail_loc>" . $host . html_encode($imageobj->getThumb()) . "</video:thumbnail_loc>\n");
        $data .= sitemap_echonl("\t\t\t<video:title>" . html_encode($imageobj->getTitle($locale)) . "</video:title>");
        if ($imageobj->getDesc()) {
            $data .= sitemap_echonl("\t\t\t<video:description>" . html_encode(getBare($imageobj->getDesc($locale))) . "</video:description>");
        }
        $data .= sitemap_echonl("\t\t\t<video:content_loc>" . $host . pathurlencode($imageobj->getFullImageURL()) . "</video:content_loc>");
        $data .= sitemap_echonl("\t\t</video:video>");
    } else {
        if (in_array($ext, array('.jpg', '.jpeg', '.gif', '.png'))) {
            // this might need to be extended!
            $data .= sitemap_echonl("\t\t<image:image>\n\t\t\t<image:loc>" . $host . html_encode($imageobj->getSizedImage(getOption('image_size'))) . "</image:loc>\n");
            // disabled for the multilingual reasons above
            $data .= sitemap_echonl("\t\t\t<image:title>" . html_encode($imageobj->getTitle($locale)) . "</image:title>");
            if ($imageobj->getDesc()) {
                $data .= sitemap_echonl("\t\t\t<image:caption>" . html_encode(getBare($imageobj->getDesc($locale))) . "</image:caption>");
            }
            if (!empty($license)) {
                $data .= sitemap_echonl("\t\t\t<image:license>" . $license . "</image:license>");
            }
            // location is kept although the same multilingual issue applies
            if (!empty($location)) {
                $data .= sitemap_echonl("\t\t\t<image:geo_location>" . $location . "</image:geo_location>");
            }
            $data .= sitemap_echonl("\t\t</image:image>");
        }
    }
    return $data;
}
コード例 #5
0
ファイル: image.php プロジェクト: hatone/zenphoto-1.4.1.4
	<!-- The Image -->
 <?php 
//
if (function_exists('printjCarouselThumbNav')) {
    printjCarouselThumbNav(6, 50, 50, 50, 50, FALSE);
} else {
    if (function_exists("printPagedThumbsNav")) {
        printPagedThumbsNav(6, FALSE, gettext('&laquo; prev thumbs'), gettext('next thumbs &raquo;'), 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 
コード例 #6
0
/**
 * Returns the url to original image.
 * It will return a protected image is the option "protect_full_image" is set
 *
 * @return string
 */
function getFullImageURL()
{
    global $_zp_current_image;
    if (is_null($_zp_current_image)) {
        return false;
    }
    $outcome = getOption('protect_full_image');
    if ($outcome == 'No access') {
        return NULL;
    }
    if (isImageVideo()) {
        // Download, Protected View, and Unprotected access all allowed
        // Search for a high quality version of the video
        $album = $_zp_current_image->getAlbum();
        $folder = $album->getFolder();
        $video = $_zp_current_image->getFileName();
        $video = substr($video, 0, strrpos($video, '.'));
        foreach (array(".ogg", ".OGG", ".avi", ".AVI", ".wmv", ".WMV") as $ext) {
            if (file_exists(internalToFilesystem(ALBUM_FOLDER_SERVERPATH . $folder . "/" . $video . $ext))) {
                return ALBUM_FOLDER_WEBPATH . $folder . "/" . $video . $ext;
            }
        }
        return getUnprotectedImageURL();
    } else {
        if ($outcome == 'Unprotected') {
            return getUnprotectedImageURL();
        } else {
            return getProtectedImageURL();
        }
    }
}
コード例 #7
0
/**
 *
 * sets up for loading an image page
 * @return string
 */
function prepareImagePage()
{
    global $_zp_current_album, $_zp_current_image, $_zp_gallery_page, $_zp_script;
    handleSearchParms('image', $_zp_current_album, $_zp_current_image);
    $theme = setupTheme();
    $_zp_gallery_page = basename($_zp_script = THEMEFOLDER . "/{$theme}/image.php");
    // re-initialize video dimensions if needed
    if (isImageVideo()) {
        $_zp_current_image->updateDimensions();
    }
    return $theme;
}
コード例 #8
0
ファイル: index.php プロジェクト: ItsHaden/epicLanBootstrap
            $hc = $_zp_current_zenpage_news->get('hitcounter') + 1;
            $_zp_current_zenpage_news->set('hitcounter', $hc);
            $_zp_current_zenpage_news->save();
        }
        if (is_NewsCategory()) {
            $catname = sanitize($_GET['category']);
            query("UPDATE " . prefix('zenpage_news_categories') . " SET `hitcounter` = `hitcounter`+1 WHERE `cat_link` = '" . $catname . "'", true);
        }
        if (is_Pages()) {
            $hc = $_zp_current_zenpage_page->get('hitcounter') + 1;
            $_zp_current_zenpage_page->set('hitcounter', $hc);
            $_zp_current_zenpage_page->save();
        }
    }
    // re-initialize video dimensions if needed
    if (isImageVideo() & !is_null($_zp_flash_player)) {
        $_zp_current_image->updateDimensions();
    }
    // Display the page itself
    if (!is_null($_zp_HTML_cache)) {
        $_zp_HTML_cache->startHTMLCache();
    }
    // Include the appropriate page for the requested object, and a 200 OK header.
    header("HTTP/1.0 200 OK");
    header("Status: 200 OK");
    include $obj;
} else {
    // If the requested object does not exist, issue a 404 and redirect to the theme's
    // 404.php page, or a 404.php in the zp-core folder.
    list($album, $image) = rewrite_get_album_image('album', 'image');
    $_zp_gallery_page = '404.php';
コード例 #9
0
ファイル: image.php プロジェクト: Imagenomad/Unsupported
			<div>
				<a class="gallery" href="<?php 
echo html_encode(getFullImageURL());
?>
" rel="gallery" title="<?php 
printBareImageTitle();
?>
"><?php 
printDefaultSizedImage(getBareImageTitle());
?>
</a>
			</div>
				<div id="image_data">
						<?php 
$fullimage = getFullImageURL();
if (!empty($fullimage) && !isImageVideo()) {
    ?>
							<div id="fullsize_download_link">
								<em>
								<a class="gallery" href="<?php 
    echo htmlspecialchars($fullimage);
    ?>
" title="<?php 
    echo getBareImageTitle();
    ?>
"><?php 
    echo gettext("Original Size:");
    ?>
									<?php 
    echo getFullWidth() . "x" . getFullHeight();
    ?>
コード例 #10
0
/**
 * Gets the content of a news article
 *
 * If using the CombiNews feature this returns the description for gallery items (see printNewsContent for more)
 *
 * @param int $shorten The optional length of the content for the news list for example, will override the plugin option setting if set, "" (empty) for full content (not used for image descriptions!)
 * @param string $shortenindicator The placeholder to mark the shortening (e.g."(...)"). If empty the Zenpage option for this is used.
 * @param string $readmore The text for the "read more" link. If empty the term set in Zenpage option is used.
 *
 * @return string
 */
function getNewsContent($shorten = false, $shortenindicator = NULL, $readmore = NULL)
{
    global $_zp_flash_player, $_zp_current_image, $_zp_gallery, $_zp_current_zenpage_news, $_zp_page;
    $newstype = getNewsType();
    switch ($newstype) {
        case 'news':
            if (!$_zp_current_zenpage_news->checkAccess()) {
                return '<p>' . gettext('<em>This article belongs to a protected category.</em>') . '</p>';
            }
            break;
        case 'image':
            $album = getNewsAlbumName();
            $albumobj = new Album($_zp_gallery, $album);
            if (!$albumobj->checkAccess()) {
                return '<p>' . gettext('<em>This entry belongs to a protected album.</em>') . '</p>';
            }
            break;
        case 'album':
            if (!$_zp_current_zenpage_news->checkAccess()) {
                return '<p>' . gettext('<em>This entry belongs to a protected album.</em>') . '</p>';
            }
            break;
    }
    $excerptbreak = false;
    if (!$shorten && !is_NewsArticle()) {
        $shorten = ZP_SHORTEN_LENGTH;
    }
    $articlecontent = "";
    $size = ZP_CN_IMAGESIZE;
    $width = ZP_CN_THUMBWIDTH;
    $height = ZP_CN_THUMBHEIGHT;
    $cropwidth = ZP_CN_CROPWIDTH;
    $cropheight = ZP_CN_CROPHEIGHT;
    $cropx = ZP_CN_CROPX;
    $cropy = ZP_CN_CROPY;
    $mode = ZP_CN_MODE;
    switch ($newstype) {
        case 'news':
            $articlecontent = $_zp_current_zenpage_news->getContent();
            if (!is_NewsArticle()) {
                $articlecontent = getContentShorten($articlecontent, $shorten, $shortenindicator, $readmore, getNewsURL($_zp_current_zenpage_news->getTitlelink()));
            }
            break;
        case 'image':
            switch ($mode) {
                case 'latestimages-sizedimage':
                    if (isImagePhoto($_zp_current_zenpage_news)) {
                        $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '">';
                        $articlecontent .= '<img src="' . html_encode($_zp_current_zenpage_news->getSizedImage($size)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" />';
                        $articlecontent .= '</a>';
                    } else {
                        if (isImageVideo($_zp_current_zenpage_news)) {
                            $articlecontent .= $_zp_current_zenpage_news->getSizedImage($size);
                        } else {
                            $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '">';
                            $articlecontent .= '<img src="' . html_encode($_zp_current_zenpage_news->getCustomImage($size, NULL, NULL, NULL, NULL, NULL, NULL, true)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" />';
                            $articlecontent .= '</a>';
                        }
                    }
                    break;
                case 'latestimages-thumbnail':
                    $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($_zp_current_zenpage_news->getThumb()) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>';
                    break;
                case 'latestimages-thumbnail-customcrop':
                    if (isImagePhoto($_zp_current_zenpage_news)) {
                        $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($_zp_current_zenpage_news->getCustomImage(NULL, $width, $height, $cropwidth, $cropheight, $cropx, $cropy)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>';
                    } else {
                        $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getImageLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($_zp_current_zenpage_news->getCustomImage(NULL, $width, $height, $cropwidth, $cropheight, $cropx, $cropy, true)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>';
                    }
                    break;
            }
            $articlecontent .= getContentShorten($_zp_current_zenpage_news->getDesc(), $shorten, $shortenindicator, $readmore, $_zp_current_zenpage_news->getImageLink());
            break;
        case 'video':
            $articlecontent = getNewsVideoContent($_zp_current_zenpage_news, $shorten);
            break;
        case 'album':
            $_zp_page = 1;
            $albumdesc = getContentShorten($_zp_current_zenpage_news->getDesc(), $shorten, $shortenindicator, $readmore, $_zp_current_zenpage_news->getAlbumLink());
            $albumthumbobj = $_zp_current_zenpage_news->getAlbumThumbImage();
            switch ($mode) {
                case 'latestalbums-sizedimage':
                    if (isImagePhoto($albumthumbobj)) {
                        $imgurl = html_encode($albumthumbobj->getSizedImage($size));
                    } else {
                        $imgurl = html_encode($albumthumbobj->getCustomImage($size, NULL, NULL, NULL, NULL, NULL, NULL, true));
                    }
                    $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getAlbumLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . $imgurl . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>' . $albumdesc;
                    break;
                case 'latestalbums-thumbnail':
                    $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getAlbumLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($_zp_current_zenpage_news->getAlbumThumb()) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>' . $albumdesc;
                    break;
                case 'latestalbums-thumbnail-customcrop':
                    $articlecontent = '<a href="' . html_encode($_zp_current_zenpage_news->getAlbumLink()) . '" title="' . html_encode($_zp_current_zenpage_news->getTitle()) . '"><img src="' . html_encode($albumthumbobj->getCustomImage(NULL, $width, $height, $cropwidth, $cropheight, $cropx, $cropy, true)) . '" alt="' . html_encode($_zp_current_zenpage_news->getTitle()) . '" /></a>' . $albumdesc;
                    break;
                case 'latestimagesbyalbum-thumbnail':
                case 'latestimagesbyalbum-thumbnail-customcrop':
                case 'latestimagesbyalbum-sizedimage':
                    $images = query_full_array("SELECT title, filename FROM " . prefix('images') . " AS images WHERE date LIKE '" . $_zp_current_zenpage_news->getDateTime() . "%' AND albumid = " . $_zp_current_zenpage_news->id . " ORDER BY date DESC");
                    foreach ($images as $image) {
                        $imageobj = newImage($_zp_current_zenpage_news, $image['filename']);
                        if (getOption('combinews-latestimagesbyalbum-imgdesc')) {
                            $imagedesc = $imageobj->getDesc();
                            $imagedesc = getContentShorten($imagedesc, $shorten, $shortenindicator, $readmore, $imageobj->getImageLink());
                        } else {
                            $imagedesc = '';
                        }
                        $articlecontent .= '<div class="latestimagesbyalbum">';
                        // entry wrapper
                        switch ($mode) {
                            case 'latestimagesbyalbum-thumbnail':
                                if (getOption('combinews-latestimagesbyalbum-imgtitle')) {
                                    $articlecontent .= '<h4>' . html_encode($imageobj->getTitle()) . '</h4>';
                                }
                                $articlecontent .= '<a href="' . html_encode($imageobj->getImageLink()) . '" title="' . html_encode($imageobj->getTitle()) . '"><img src="' . html_encode($imageobj->getThumb()) . '" alt="' . html_encode($imageobj->getTitle()) . '" /></a>' . $imagedesc;
                                break;
                            case 'latestimagesbyalbum-thumbnail-customcrop':
                                if (getOption('combinews-latestimagesbyalbum-imgtitle')) {
                                    $articlecontent .= '<h4>' . html_encode($imageobj->getTitle()) . '</h4>';
                                }
                                if (isImagePhoto($imageobj)) {
                                    $articlecontent .= '<a href="' . html_encode($imageobj->getImageLink()) . '" title="' . html_encode($imageobj->getTitle()) . '"><img src="' . html_encode($imageobj->getCustomImage(NULL, $width, $height, $cropwidth, $cropheight, $cropx, $cropy)) . '" alt="' . html_encode($imageobj->getTitle()) . '" /></a>' . $imagedesc;
                                } else {
                                    if (isImageVideo($imageobj)) {
                                        $articlecontent .= getNewsVideoContent($imageobj) . $imagedesc;
                                    } else {
                                        $articlecontent .= '<a href="' . html_encode($imageobj->getImageLink()) . '" title="' . html_encode($imageobj->getTitle()) . '"><img src="' . html_encode($imageobj->getCustomImage(NULL, $width, $height, $cropwidth, $cropheight, $cropx, $cropy, true)) . '" alt="' . html_encode($imageobj->getTitle()) . '" /></a>' . $imagedesc;
                                    }
                                }
                                break;
                            case 'latestimagesbyalbum-sizedimage':
                                if (getOption('combinews-latestimagesbyalbum-imgtitle')) {
                                    $articlecontent .= '<h4>' . html_encode($imageobj->getTitle()) . '</h4>';
                                }
                                if (isImagePhoto($imageobj)) {
                                    $articlecontent .= '<a href="' . html_encode($imageobj->getImageLink()) . '" title="' . html_encode($imageobj->getTitle()) . '"><img src="' . pathurlencode($imageobj->getSizedImage($size)) . '" alt="' . html_encode($imageobj->getTitle()) . '" /></a>' . $imagedesc;
                                } else {
                                    if (isImageVideo($imageobj)) {
                                        $articlecontent .= getNewsVideoContent($imageobj) . $imagedesc;
                                    } else {
                                        $articlecontent .= '<a href="' . html_encode($imageobj->getImageLink()) . '" title="' . html_encode($imageobj->getTitle()) . '"><img src="' . html_encode($imageobj->getCustomImage($size, NULL, NULL, NULL, NULL, NULL, NULL, true)) . '" alt="' . html_encode($imageobj->getTitle()) . '" /></a>' . $imagedesc;
                                    }
                                }
                                break;
                        }
                        // switch "latest images by album end"
                        $articlecontent .= '</div>';
                        // entry wrapper end
                    }
                    // foreach end
                    break;
            }
            // switch "albums mode end"
    }
    // main switch end
    return $articlecontent;
}
コード例 #11
0
ファイル: image.php プロジェクト: rauldobrota/zenphoto
    ?>
							<img src="<?php 
    echo html_encode(pathurlencode(getDefaultSizedImage()));
    ?>
" alt="<?php 
    printBareImageTitle();
    ?>
" style="max-width:<?php 
    echo getDefaultWidth();
    ?>
px"/>
							<?php 
} else {
    printDefaultSizedImage(getImageTitle());
}
if (isImageVideo() && getOption('zpmobile_mediadirectlink')) {
    ?>
							<p><a href="<?php 
    echo html_encode(getUnprotectedImageURL());
    ?>
" title="<?php 
    echo gettext('Direct link');
    ?>
" rel="external"><?php 
    echo gettext('Direct link');
    ?>
</a></p>
							<?php 
}
?>
					</div>
コード例 #12
0
/**
 * Helper function to get the image/video extra entries for albums if the Google video extension is enabled
 * @return string
 */
function getSitemapGoogleImageVideoExtras($page, $loop_index, $albumobj, $images)
{
    if (getOption('sitemap_google') && !empty($loop_index)) {
        $data = '';
        $host = SERVER_PROTOCOL . '://' . html_encode($_SERVER["HTTP_HOST"]);
        $start = ($page - 1) * getOption('images_per_page');
        $end = ($page - 1) * getOption('images_per_page') + $loop_index[$page - 1];
        for ($x = $start; $x < $end; $x++) {
            $imageobj = newImage($albumobj, $images[$x]);
            $ext = strtolower(strrchr($imageobj->filename, "."));
            $location = '';
            if ($imageobj->getLocation()) {
                $location .= $imageobj->getLocation() . ', ';
            }
            if ($imageobj->getCity()) {
                $location .= $imageobj->getCity() . ', ';
            }
            if ($imageobj->getState()) {
                $location .= $imageobj->getState() . ', ';
            }
            if ($imageobj->getCountry()) {
                $location .= $imageobj->getCountry();
            }
            $license = getOption('sitemap_license');
            $path = FULLWEBPATH . '/' . rewrite_path(pathurlencode($albumobj->name) . '/' . urlencode($imageobj->filename) . getOption('mod_rewrite_image_suffix'), '?album=' . pathurlencode($albumobj->name) . '&amp;image=' . urlencode($imageobj->filename), false);
            if ($ext != '.mp3' && $ext != '.txt' && $ext != '.html') {
                // audio is not coverered specifically by Google currently
                if (isImageVideo($imageobj) && $ext != '.mp3') {
                    $data .= sitemap_echonl("\t\t<video:video>\n\t\t\t<video:thumbnail_loc>" . $host . html_encode($imageobj->getThumb()) . "</video:thumbnail_loc>\n\t\t\t<video:title>" . $imageobj->getTitle() . "</video:title>");
                    if ($imageobj->getDesc()) {
                        $data .= sitemap_echonl("\t\t\t<video:description>" . $imageobj->getDesc() . "</video:description>");
                    }
                    $data .= sitemap_echonl("\t\t\t<video:content_loc>" . $host . pathurlencode($imageobj->getFullImage()) . "</video:content_loc>");
                    $data .= sitemap_echonl("\t\t</video:video>");
                } else {
                    // this might need to be extended!
                    $data .= sitemap_echonl("\t\t<image:image>\n\t\t\t<image:loc>" . $host . html_encode($imageobj->getSizedImage(getOption('image_size'))) . "</image:loc>\n\t\t\t<image:title>" . $imageobj->getTitle() . "</image:title>");
                    if ($imageobj->getDesc()) {
                        $data .= sitemap_echonl("\t\t\t<image:caption>" . $imageobj->getDesc() . "</image:caption>");
                    }
                    if (!empty($license)) {
                        $data .= sitemap_echonl("\t\t\t<image:license>" . $license . "</image:license>");
                    }
                    if (!empty($location)) {
                        $data .= sitemap_echonl("\t\t\t<image:geo_location>" . $location . "</image:geo_location>");
                    }
                    $data .= sitemap_echonl("\t\t</image:image>");
                }
            }
        }
        return $data;
    }
}
コード例 #13
0
/**
 * Checks if the Zenphoto items is a video object (mp3,mp4,flv)
 *
 * @return string
 */
function checkIfImageVideo($imageobj)
{
    $video = '';
    if (isImageVideo($imageobj) && getOption('zp_plugin_flowplayer3')) {
        $imagesuffix = getSuffix($imageobj->filename);
        switch ($imagesuffix) {
            case 'flv':
            case 'mp4':
                $video = 'video';
                break;
            case 'mp3':
                $video = 'mp3';
                break;
        }
    } else {
        $video = '';
        $backgroundcss = 'border: 1px solid gray; padding: 1px;';
    }
    return $video;
}
コード例 #14
0
/**
 * Returns an array with the height & width
 *
 * @param int $size size
 * @param int $width width
 * @param int $height height
 * @param int $cw crop width
 * @param int $ch crop height
 * @param int $cx crop x axis
 * @param int $cy crop y axis
 * @param $image object the image for which the size is desired. NULL means the current image
 * @return array
 */
function getSizeCustomImage($size, $width = NULL, $height = NULL, $cw = NULL, $ch = NULL, $cx = NULL, $cy = NULL, $image = NULL)
{
    global $_zp_current_image;
    if (is_null($image)) {
        $image = $_zp_current_image;
    }
    if (is_null($image)) {
        return false;
    }
    $h = $image->getHeight();
    $w = $image->getWidth();
    if (isImageVideo($image)) {
        // size is determined by the player
        return array($w, $h);
    }
    //if we set width/height we are cropping and those are the sizes already
    if (is_null($size) && !is_null($width) && !is_null($height)) {
        return array($width, $height);
    }
    $side = getOption('image_use_side');
    $us = getOption('image_allow_upscale');
    $args = getImageParameters(array($size, $width, $height, $cw, $ch, $cx, $cy, NULL, NULL, NULL, NULL, NULL, NULL, NULL), $image->album->name);
    @(list($size, $width, $height, $cw, $ch, $cx, $cy, $quality, $thumb, $crop, $thumbstandin, $passedWM, $adminrequest, $effects) = $args);
    if (!empty($size)) {
        $dim = $size;
        $width = $height = false;
    } else {
        if (!empty($width)) {
            $dim = $width;
            $size = $height = false;
        } else {
            if (!empty($height)) {
                $dim = $height;
                $size = $width = false;
            } else {
                $dim = 1;
            }
        }
    }
    if ($w == 0) {
        $hprop = 1;
    } else {
        $hprop = round($h / $w * $dim);
    }
    if ($h == 0) {
        $wprop = 1;
    } else {
        $wprop = round($w / $h * $dim);
    }
    if ($size && ($side == 'longest' && $h > $w) || $side == 'height' || $side == 'shortest' && $h < $w || $height) {
        // Scale the height
        $newh = $dim;
        $neww = $wprop;
    } else {
        // Scale the width
        $neww = $dim;
        $newh = $hprop;
    }
    if (!$us && $newh >= $h && $neww >= $w) {
        return array($w, $h);
    } else {
        if ($cw && $cw < $neww) {
            $neww = $cw;
        }
        if ($ch && $ch < $newh) {
            $newh = $ch;
        }
        if ($size && $ch && $cw) {
            $neww = $cw;
            $newh = $ch;
        }
        return array($neww, $newh);
    }
}
コード例 #15
0
ファイル: pasteobj.php プロジェクト: ariep/ZenPhoto20-DEV
</label>
							<?php 
            }
            ?>
						<?php 
            if ($link2) {
                ?>
							<label class="nowrap">
								<input type="radio" name="link" value="link2" id="link_image_album" onchange="zenchange();" />
								<?php 
                echo gettext('image with link to album');
                ?>
							</label>
							<?php 
            }
        } elseif (isImageVideo($obj)) {
            $content_macros = getMacros();
            if (array_key_exists('MEDIAPLAYER', $content_macros)) {
                ?>
							<label class="nowrap"><input type="radio" name="link" value="player" id="link_image_none" onchange="zenchange();" /><?php 
                echo gettext('Mediaplayer macro');
                ?>
</label>
							<?php 
            }
        } else {
            if (!$imagef) {
                $content_macros = getMacros();
                if (array_key_exists('SLIDESHOW', $content_macros)) {
                    ?>
							<label class="nowrap"><input type="radio" name="link" value="show" id="link_image_none" onchange="zenchange();" /><?php 
コード例 #16
0
ファイル: index.php プロジェクト: hatone/zenphoto-1.4.1.4
            debugLog(sprintf('    ' . $extension . '(' . ($priority & PLUGIN_PRIORITY) . ')=>%.4fs', $end - $start));
        }
        //		$_zp_script_timer['load '.$extension] = microtime();
    }
    $_zp_loaded_plugins[] = $extension;
}
if ($zp_request) {
    $_zp_obj = zp_apply_filter('load_theme_script', $_zp_obj);
}
//$_zp_script_timer['theme scripts'] = microtime();
if ($zp_request && file_exists(SERVERPATH . "/" . internalToFilesystem($_zp_obj))) {
    $hint = $show = false;
    if (checkAccess($hint, $show)) {
        // ok to view
        // re-initialize video dimensions if needed
        if (isImageVideo() & isset($_zp_flash_player)) {
            $_zp_current_image->updateDimensions();
        }
        setThemeColumns();
    } else {
        if (is_object($_zp_HTML_cache)) {
            //	don't cache the logon page or you can never see the real one
            $_zp_HTML_cache->abortHTMLCache();
        }
        $_zp_gallery_page = 'password.php';
        $_zp_obj = SERVERPATH . '/' . THEMEFOLDER . '/' . $theme . '/password.php';
        if (!file_exists(internalToFilesystem($_zp_obj))) {
            $_zp_obj = SERVERPATH . '/' . ZENFOLDER . '/password.php';
        }
    }
    // Include the appropriate page for the requested object, and a 200 OK header.
コード例 #17
0
ファイル: search.php プロジェクト: ariep/ZenPhoto20-DEV
while (next_image()) {
    $c++;
    ?>
				<div class="thumb-maxspace">
					<a class="thumb-link" href="<?php 
    echo html_encode(getImageURL());
    ?>
" title="<?php 
    echo html_encode(getBareImageTitle());
    ?>
"><?php 
    printImageThumb(getAnnotatedImageTitle());
    ?>
</a>
	<?php 
    if ($zpmin_colorbox && $cbscript && !isImageVideo()) {
        ?>
						<div class="cblinks">
							<a class="thickbox" href="<?php 
        echo html_encode(getUnprotectedImageURL());
        ?>
" title="<?php 
        echo html_encode(getBareImageTitle());
        ?>
"><img src="<?php 
        echo $_zp_themeroot;
        ?>
/images/zoom.png" /></a>
							<a href="<?php 
        echo html_encode(getImageURL());
        ?>
コード例 #18
0
ファイル: album.php プロジェクト: Imagenomad/Unsupported
						<?php 
while (next_image()) {
    ?>
						<div class="thumb-maxspace">
							<a class="thumb-link" href="<?php 
    echo html_encode(getImageURL());
    ?>
" title="<?php 
    echo getBareImageTitle();
    ?>
"><?php 
    printImageThumb(getAnnotatedImageTitle());
    ?>
</a>
							<?php 
    if ($zpmin_colorbox && !isImageVideo()) {
        ?>
							<div class="cblinks">
								<a class="thickbox" href="<?php 
        echo html_encode(getUnprotectedImageURL());
        ?>
" title="<?php 
        echo getBareImageTitle();
        ?>
"><img src="<?php 
        echo $_zp_themeroot;
        ?>
/images/zoom.png" /></a>
								<a href="<?php 
        echo html_encode(getImageURL());
        ?>
コード例 #19
0
ファイル: zoom.php プロジェクト: hatone/zenphoto-1.4.1.4
</head>
<body>
<div style="text-align: center; width 450px;">
<?php 
if (isset($_GET['image']) && isset($_GET['album'])) {
    $imagename = sanitize($_GET['image']);
    $albumname = sanitize($_GET['album']);
    // getting the webpath manually since the offset does not work here
    $partialpath = strpos(FULLWEBPATH, '/' . ZENFOLDER);
    $webpath = substr(FULLWEBPATH, 0, $partialpath);
    $ext = strtolower(strrchr($imagename, "."));
    $galleryobj = new Gallery();
    $albumobj = new Album($galleryobj, $albumname);
    $imageobj = newImage($albumobj, $imagename);
    echo $imageobj->getTitle() . "<br />";
    if (isImageVideo($imageobj)) {
        if ($ext == ".flv" || $ext == ".mp3" || $ext == ".mp4") {
            echo '
				<a href="' . pathurlencode($imageobj->getFullImage()) . '" id="player" style="display:block; width: 420px; height: 400px;"></a>
				<script type="text/javascript">
				flowplayer("player","../../../flowplayer3/' . $swf . '", {
					clip: {
						autoPlay: false,
						autoBuffering: false,
						scaling: "orig"
					},
				});
				</script>';
        } else {
            if ($ext == ".3gp" || $ext == ".mov") {
                echo '</a>
コード例 #20
0
ファイル: album.php プロジェクト: kokyandrei/Unsupported
            ?>
" title="<?php 
            echo getBareImageTitle();
            ?>
">
					<?php 
            printCustomSizedImage(getBareImageTitle(), null, 160, 120, 160, 120, null, null, 'thumb', null, true);
            ?>
				</a>
			<?php 
        } else {
            ?>
			<li class="thumb-portrait">
				<div class="album-tools-portrait">
						<?php 
            if ($zpfocus_use_colorbox && !isImageVideo()) {
                ?>
<a class="album-tool" rel="zoom" href="<?php 
                if ($zpfocus_cbtarget) {
                    echo htmlspecialchars(getDefaultSizedImage());
                } else {
                    echo htmlspecialchars(getUnprotectedImageURL());
                }
                ?>
" title="<?php 
                echo getBareImageTitle();
                ?>
"><img src="<?php 
                echo $_zp_themeroot;
                ?>
/images/search.png" alt="Zoom Image" /></a><?php 
コード例 #21
0
/**
 * Returns a link to a custom sized version of he current image
 *
 * @param int $size size
 * @param int $width width
 * @param int $height height
 * @param int $cw crop width
 * @param int $ch crop height
 * @param int $cx crop x axis
 * @param int $cy crop y axis
 * @return string
 */
function getSizeCustomImage($size, $width = NULL, $height = NULL, $cw = NULL, $ch = NULL, $cx = NULL, $cy = NULL)
{
    if (!in_context(ZP_IMAGE)) {
        return false;
    }
    global $_zp_current_image, $_zp_flash_player;
    if (is_null($_zp_current_image)) {
        return false;
    }
    $h = $_zp_current_image->getHeight();
    $w = $_zp_current_image->getWidth();
    if (isImageVideo()) {
        // size is determined by the player
        return array($w, $h);
    }
    $h = $_zp_current_image->getHeight();
    $w = $_zp_current_image->getWidth();
    $side = getOption('image_use_side');
    $us = getOption('image_allow_upscale');
    $args = getImageParameters(array($size, $width, $height, $cw, $ch, $cx, $cy, null));
    @(list($size, $width, $height, $cw, $ch, $cx, $cy, $quality, $thumb, $crop, $thumbstandin, $thumbWM, $adminrequest) = $args);
    if (!empty($size)) {
        $dim = $size;
        $width = $height = false;
    } else {
        if (!empty($width)) {
            $dim = $width;
            $size = $height = false;
        } else {
            if (!empty($height)) {
                $dim = $height;
                $size = $width = false;
            } else {
                $dim = 1;
            }
        }
    }
    if ($w == 0) {
        $hprop = 1;
    } else {
        $hprop = round($h / $w * $dim);
    }
    if ($h == 0) {
        $wprop = 1;
    } else {
        $wprop = round($w / $h * $dim);
    }
    if ($size && ($side == 'longest' && $h > $w) || $side == 'height' || $side == 'shortest' && $h < $w || $height) {
        // Scale the height
        $newh = $dim;
        $neww = $wprop;
    } else {
        // Scale the width
        $neww = $dim;
        $newh = $hprop;
    }
    if (!$us && $newh >= $h && $neww >= $w) {
        return array($w, $h);
    } else {
        if ($cw && $cw < $neww) {
            $neww = $cw;
        }
        if ($ch && $ch < $newh) {
            $newh = $ch;
        }
        if ($size && $ch && $cw) {
            $neww = $cw;
            $newh = $ch;
        }
        return array($neww, $newh);
    }
}