本文整理汇总了PHP中isImageVideo函数的典型用法代码示例。如果您正苦于以下问题:PHP isImageVideo函数的具体用法?PHP isImageVideo怎么用?PHP isImageVideo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isImageVideo函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: printImageEXIFData
/**
* @deprecated
*/
function printImageEXIFData()
{
deprecated_function_notify(gettext('Use printImageMetadata().'));
if (isImageVideo()) {
} else {
printImageMetadata();
}
}
示例2: gettext
/* 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: html_encode
?>
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: getSitemapGoogleImageVideoExtras
/**
* 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: printjCarouselThumbNav
<!-- The Image -->
<?php
//
if (function_exists('printjCarouselThumbNav')) {
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
示例6: getFullImageURL
/**
* 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: prepareImagePage
/**
*
* 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: sanitize
$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: html_encode
<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: getNewsContent
/**
* 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;
//.........这里部分代码省略.........
示例11: html_encode
?>
<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: getSitemapGoogleImageVideoExtras
/**
* 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) . '&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: checkIfImageVideo
/**
* 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: getSizeCustomImage
/**
* 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: gettext
</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