• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getImageThumb函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getImageThumb函数的典型用法代码示例。如果您正苦于以下问题:PHP getImageThumb函数的具体用法?PHP getImageThumb怎么用?PHP getImageThumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getImageThumb函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: printShutterfly

/**
 * Prints the Shutterfly logo and links to print an image.
 *
 */
function printShutterfly()
{
    echo '<script type="text/javascript">' . "\n";
    echo '<!--/* Code from http://www.netlobo.com/div_hiding.html */-->' . "\n";
    echo '	function toggleLayer(whichLayer) {' . "\n";
    echo '		if (document.getElementById) {' . "\n";
    echo '// this is the way the standards work' . "\n";
    echo '			var style2 = document.getElementById(whichLayer).style;' . "\n";
    echo '			style2.display = style2.display? "":"block";' . "\n";
    echo '		} else if (document.all) {' . "\n";
    echo '// this is the way old msie versions work' . "\n";
    echo '			var style2 = document.all[whichLayer].style;' . "\n";
    echo '			style2.display = style2.display? "":"block";' . "\n";
    echo '		} else if (document.layers) {' . "\n";
    echo '// this is the way nn4 works' . "\n";
    echo '			var style2 = document.layers[whichLayer].style;' . "\n";
    echo '			style2.display = style2.display? "":"block";' . "\n";
    echo '		}' . "\n";
    echo '	}' . "\n";
    echo '</script>' . "\n";
    echo "<div id=\"zp-shutterfly\" onClick=\"toggleLayer('extended')\">\n";
    echo '	<div id="extended">' . "\n";
    echo '		<form action="http://www.shutterfly.com/c4p/UpdateCart.jsp" method="post">' . "\n";
    echo '			<input type="hidden" name="addim" value="1" />' . "\n";
    echo '			<input type="hidden" name="protocol" value="SFP,100" />' . "\n";
    echo '			<input type="hidden" name="pid" value="C4P" />' . "\n";
    echo '			<input type="hidden" name="psid" value="AFFL" />' . "\n";
    echo '			<input type="hidden" name="puid" value="visitor" />' . "\n";
    echo '			<input type="hidden" name="imnum" value="1" />' . "\n";
    echo '			<input type="hidden" name="imraw-1" value="http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars(getUnprotectedImageURL()) . '" />' . "\n";
    echo '			<input type="hidden" name="imrawwidth-1" value="' . getFullWidth() . '" />' . "\n";
    echo '			<input type="hidden" name="imrawheight-1" value="' . getFullHeight() . '" />' . "\n";
    echo '			<input type="hidden" name="imthumb-1" value="http://' . $_SERVER['HTTP_HOST'] . getImageThumb() . '" />' . "\n";
    echo '			<input type="hidden" name="imthumbheight-1" value="' . getOption('thumb_crop_height') . '" />' . "\n";
    echo '			<input type="hidden" name="imthumbwidth-1" value="' . getOption('thumb_crop_width') . '" />' . "\n";
    echo '			<input type="hidden" name="returl" value="http://' . $_SERVER['HTTP_HOST'] . htmlspecialchars(getImageLinkURL()) . '" />' . "\n";
    echo '			<input type="submit" value="Add to Shutterfly Cart &raquo;" />' . "\n";
    echo '		</form>' . "\n";
    echo '	</div>' . "\n";
    echo '</div>' . "\n";
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:45,代码来源:shutterfly.php


示例2: loadAlbum

function loadAlbum($album)
{
    global $gallery, $_zp_current_album, $_zp_current_image;
    $subalbums = $album->getSubAlbums();
    $count = 0;
    foreach ($subalbums as $folder) {
        $subalbum = new Album($gallery, $folder);
        $count = $count + loadAlbum($subalbum);
    }
    $_zp_current_album = $album;
    if (getNumImages() > 0) {
        echo "<br />" . $album->name . "{";
        while (next_image(true)) {
            if (isImagePhoto($_zp_current_image)) {
                echo '<img src="' . getImageThumb() . '" height="8" width="8" /> | <img src="' . getDefaultSizedImage() . '" height="20" width="20" />' . "\n";
            } else {
                echo '<img src="' . getImageThumb() . '" height="8" width="8" /> | ';
            }
            $count++;
        }
        echo "}<br/>\n";
    }
    return $count;
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:24,代码来源:admin-cache-images.php


示例3: printAlbumMap

/**
 * 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";
        }
    }
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:93,代码来源:google_maps.php


示例4: printImageThumb

/**
 * @param string $alt Alt text
 * @param string $class optional class tag
 * @param string $id optional id tag
 */
function printImageThumb($alt, $class = NULL, $id = NULL)
{
    global $_zp_current_image;
    if (is_null($_zp_current_image)) {
        return;
    }
    if (!$_zp_current_image->getShow()) {
        $class .= " not_visible";
    }
    $album = $_zp_current_image->getAlbum();
    $pwd = $album->getPassword();
    if (zp_loggedin() && !empty($pwd)) {
        $class .= " password_protected";
    }
    if (getOption('thumb_crop') && !is_null($cy = $_zp_current_image->get('thumbY'))) {
        $ts = getOption('thumb_size');
        $sw = getOption('thumb_crop_width');
        $sh = getOption('thumb_crop_height');
        $cx = $_zp_current_image->get('thumbX');
        $cw = $_zp_current_image->get('thumbW');
        $ch = $_zp_current_image->get('thumbH');
        // upscale to thumb_size proportions
        if ($sw == $sh) {
            // square crop, set the size/width to thumbsize
            $sw = $sh = $ts;
        } else {
            if ($sw > $sh) {
                $r = $ts / $sw;
                $sw = $ts;
                $sh = $sh * $r;
            } else {
                $r = $ts / $sh;
                $sh = $ts;
                $sh = $r * $sh;
            }
        }
        $url = getCustomImageURL(NULL, $sw, $sh, $cw, $ch, $cx, $cy, true);
    } else {
        $url = getImageThumb();
    }
    $h = getOption('thumb_crop_height');
    if (!empty($h)) {
        $h = " height=\"{$h}\"";
    }
    $w = getOption('thumb_crop_width');
    if (!empty($w)) {
        $w = " width=\"{$w}\"";
    }
    $class = trim($class);
    echo "<img src=\"" . htmlspecialchars($url) . "\" alt=\"" . html_encode($alt) . "\"" . (getOption('thumb_crop') ? $w . $h : "") . ($class ? " class=\"{$class}\"" : "") . ($id ? " id=\"{$id}\"" : "") . " />";
}
开发者ID:ItsHaden,项目名称:epicLanBootstrap,代码行数:56,代码来源:template-functions.php


示例5: getAlbumURL

        $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++;
    }
}
?>
	
</div>
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:30,代码来源:fetch-thumbs.php


示例6: printImageThumb

/**
 * @param string $alt Alt text
 * @param string $class optional class tag
 * @param string $id optional id tag
 */
function printImageThumb($alt, $class = NULL, $id = NULL)
{
    global $_zp_current_image;
    if (is_null($_zp_current_image)) {
        return;
    }
    if (!$_zp_current_image->getShow()) {
        $class .= " not_visible";
    }
    $album = $_zp_current_image->getAlbum();
    $pwd = $album->getPassword();
    if (!empty($pwd)) {
        $class .= " password_protected";
    }
    $url = getImageThumb();
    $sizes = getSizeDefaultThumb();
    $size = ' width="' . $sizes[0] . '" height="' . $sizes[1] . '"';
    $class = trim($class);
    if ($class) {
        $class = ' class="' . $class . '"';
    }
    if ($id) {
        $id = ' id="' . $id . '"';
    }
    $html = '<img src="' . html_encode(pathurlencode($url)) . '"' . $size . ' alt="' . html_encode($alt) . '"' . $class . $id . " />";
    $html = zp_apply_filter('standard_image_thumb_html', $html);
    echo $html;
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:33,代码来源:template-functions.php


示例7: loadAlbum

function loadAlbum($album)
{
    global $gallery, $_zp_current_album, $_zp_current_image;
    $subalbums = $album->getAlbums();
    $started = false;
    $tcount = $count = 0;
    foreach ($subalbums as $folder) {
        $subalbum = new Album($gallery, $folder);
        if (!$subalbum->isDynamic()) {
            $tcount = $tcount + loadAlbum($subalbum);
        }
    }
    $theme = $gallery->getCurrentTheme();
    $id = 0;
    $parent = getUrAlbum($album);
    $albumtheme = $parent->getAlbumTheme();
    if (!empty($albumtheme)) {
        $theme = $albumtheme;
        $id = $parent->id;
    }
    loadLocalOptions($id, $theme);
    $_zp_current_album = $album;
    if ($album->getNumImages() > 0) {
        echo "<br />" . $album->name . ' ';
        while (next_image(true)) {
            $thumb = getImageThumb();
            if (strpos($thumb, 'i.php?') === false) {
                $thumb = NULL;
            }
            if (isImagePhoto($_zp_current_image)) {
                $image = getDefaultSizedImage();
                if (strpos($image, 'i.php?') === false) {
                    $image = NULL;
                }
            } else {
                $image = NULL;
                if ($_zp_current_image->objectsThumb == NULL) {
                    $thumb = NULL;
                }
            }
            if (!empty($thumb) || !empty($image)) {
                if (!$count) {
                    $started = true;
                    echo "{ ";
                } else {
                    echo ' | ';
                }
            }
            if (!empty($thumb)) {
                echo '<img src="' . $thumb . '" height="8" width="8" /> ';
            }
            if (!empty($image)) {
                echo ' <img src="' . $image . '" height="20" width="20" />';
            }
            if (!empty($thumb) || !empty($image)) {
                echo "\n";
            }
            $count++;
        }
        if ($started) {
            echo ' } ';
        }
        printf(ngettext('[%u image]', '[%u images]', $count), $count);
        echo "<br />\n";
    }
    return $count + $tcount;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:67,代码来源:cache_images.php


示例8: googleCheckout

/**
 * 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;" />&nbsp;&nbsp;
   <span class="googlecart-add-button"></span>
</div>
<?php 
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:50,代码来源:GoogleCheckout.php


示例9: str_replace

         $desc2 = str_replace("\r", '<br />', $desc2);
         $desc = $desc1 . $desc2;
         echo 'description: \'' . js_encode($desc) . '\',' . "\n";
         echo 'link: \'' . html_encode(getAlbumURL()) . '\'' . "\n";
         echo '}' . "\n";
         $c++;
     }
 }
 while (next_image(true)) {
     if (isImagePhoto($_zp_current_image)) {
         if ($c == 0) {
             echo '{' . "\n";
         } else {
             echo ',{' . "\n";
         }
         echo 'thumb: \'' . getImageThumb() . '\',' . "\n";
         echo 'image: \'' . getDefaultSizedImage() . '\',' . "\n";
         echo 'big: \'' . getCustomImageURL(getOption('zpbase_galbigsize')) . '\',' . "\n";
         echo 'title: \'' . html_encode(getBareImageTitle()) . '\',' . "\n";
         $desc = getBareImageDesc();
         $desc = str_replace("\r\n", '<br />', $desc);
         $desc = str_replace("\r", '<br />', $desc);
         echo 'description: \'' . js_encode($desc) . '\',' . "\n";
         if (!getOption('zpbase_nodetailpage')) {
             echo 'link: \'' . html_encode(getImageURL()) . '\'' . "\n";
         }
         echo '}' . "\n";
         $c++;
     }
 }
 ?>
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:31,代码来源:album-galleria.php


示例10: getImageThumb

?>
    <div class="layoutlm">
        <div class="layout-main">
            <!-- 密码修改-->
            <div class="user_right_layout">
                <ul class="user_right_menu">
                    <li class="current"><a href="">编辑资料</a></li>
                </ul>
                <div class="user_right_content user_right_content_form">
                    <div class="module_form ucenter">
                        <div class="ucenter_edit_box">
                            <div class="edit_btn">编辑<span class="icon icon_edit_down"></span></div>
                            <div class="input_wrap">
                                <span class="input_head">用户头像:</span>
                                <img class="lazy face_img user_head" src="<?php 
echo getImageThumb($loginUser[head], '106x106');
?>
" alt="<?php 
echo $loginUser[username];
?>
"/>
                                <span class="tips" style="display:inline-block; width: 300px;">提示:上传图片时,双击裁剪框可以对图片进行裁剪</span>
                            </div>
                            <form class="edit_form" action="" id="update_head_form" autocomplete="off">

                                <div class="input_wrap" style="zoom: 1; overflow: hidden;">
                                    <div>
                                        <input type="hidden" name="data[head]" id="header" tip-text="logo" required/>
                                        <input type="file" id="user_logo"/>
                                        <input type="hidden" id="x" name="x" />
                                        <input type="hidden" id="y" name="y" />
开发者ID:jifangshiyanshi,项目名称:tuonews,代码行数:31,代码来源:profile.html.php


示例11: getHTMLMetaData

    /**
     * Prints html meta data to be used in the <head> section of a page
     *
     */
    static function getHTMLMetaData()
    {
        global $_zp_gallery, $_zp_galley_page, $_zp_current_album, $_zp_current_image, $_zp_current_zenpage_news, $_zp_current_zenpage_page, $_zp_gallery_page, $_zp_current_category, $_zp_authority, $_zp_conf_vars, $_myFavorites, $htmlmetatags_need_cache;
        zp_register_filter('image_processor_uri', 'htmlmetatags::ipURI');
        $host = sanitize("http://" . $_SERVER['HTTP_HOST']);
        $url = $host . getRequestURI();
        // Convert locale shorttag to allowed html meta format
        $locale = str_replace("_", "-", getUserLocale());
        $canonicalurl = '';
        // generate page title, get date
        $pagetitle = "";
        // for gallery index setup below switch
        $date = strftime(DATE_FORMAT);
        // if we don't have a item date use current date
        $desc = getBareGalleryDesc();
        $thumb = '';
        if (getOption('htmlmeta_sitelogo')) {
            $thumb = getOption('htmlmeta_sitelogo');
        }
        $type = 'article';
        switch ($_zp_gallery_page) {
            case 'index.php':
                $desc = getBareGalleryDesc();
                $canonicalurl = $host . getGalleryIndexURL();
                $type = 'website';
                break;
            case 'album.php':
                $pagetitle = getBareAlbumTitle() . " - ";
                $date = getAlbumDate();
                $desc = getBareAlbumDesc();
                $canonicalurl = $host . getAlbumURL();
                if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                    $thumb = $host . getAlbumThumb();
                }
                break;
            case 'image.php':
                $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
                $date = getImageDate();
                $desc = getBareImageDesc();
                $canonicalurl = $host . getImageURL();
                if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                    $thumb = $host . getImageThumb();
                }
                break;
            case 'news.php':
                if (function_exists("is_NewsArticle")) {
                    if (is_NewsArticle()) {
                        $pagetitle = getBareNewsTitle() . " - ";
                        $date = getNewsDate();
                        $desc = trim(getBare(getNewsContent()));
                        $canonicalurl = $host . $_zp_current_zenpage_news->getLink();
                    } else {
                        if (is_NewsCategory()) {
                            $pagetitle = $_zp_current_category->getTitlelink() . " - ";
                            $date = strftime(DATE_FORMAT);
                            $desc = trim(getBare($_zp_current_category->getDesc()));
                            $canonicalurl = $host . $_zp_current_category->getLink();
                            $type = 'category';
                        } else {
                            $pagetitle = gettext('News') . " - ";
                            $desc = '';
                            $canonicalurl = $host . getNewsIndexURL();
                            $type = 'website';
                        }
                    }
                }
                break;
            case 'pages.php':
                $pagetitle = getBarePageTitle() . " - ";
                $date = getPageDate();
                $desc = trim(getBare(getPageContent()));
                $canonicalurl = $host . $_zp_current_zenpage_page->getLink();
                break;
            default:
                // for all other possible static custom pages
                $custompage = stripSuffix($_zp_gallery_page);
                $standard = array('contact' => gettext('Contact'), 'register' => gettext('Register'), 'search' => gettext('Search'), 'archive' => gettext('Archive view'), 'password' => gettext('Password required'));
                if (is_object($_myFavorites)) {
                    $standard['favorites'] = gettext('My favorites');
                }
                if (array_key_exists($custompage, $standard)) {
                    $pagetitle = $standard[$custompage] . " - ";
                } else {
                    $pagetitle = $custompage . " - ";
                }
                $desc = '';
                $canonicalurl = $host . getCustomPageURL($custompage);
                break;
        }
        // shorten desc to the allowed 200 characters if necesssary.
        $desc = html_encode(trim(substr(getBare($desc), 0, 160)));
        $pagetitle = $pagetitle . getBareGalleryTitle();
        // get master admin
        $admin = $_zp_authority->getMasterUser();
        $author = $admin->getName();
        $meta = '';
//.........这里部分代码省略.........
开发者ID:andrewfandrew,项目名称:ferdinand-miranda,代码行数:101,代码来源:html_meta_tags.php


示例12: foreach

    <div class="list">
        <?php 
foreach ($editorRec as $value) {
    ?>
        <dl class="item">
            <!-- 66x58-->
            <dd class="img">
                <a href="<?php 
    echo url("/article_article_detail/?id={$value['id']}");
    ?>
">
                    <img class="lazy" src="<?php 
    echo $appConfigs[image_block];
    ?>
"  data-original="<?php 
    echo getImageThumb($value[thumb], '66x58');
    ?>
" alt="<?php 
    echo $value[title];
    ?>
"/>
                </a>
            </dd>
            <dt class="head">
                <a href="<?php 
    echo url("/article_article_detail/?id={$value['id']}");
    ?>
"><?php 
    echo $value[title];
    ?>
</a>
开发者ID:jifangshiyanshi,项目名称:tuonews,代码行数:31,代码来源:module_aside_recommend.html.php


示例13: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $_zp_current_album, $points;
        if (isImagePage()) {
            ?>
			<!-- Gallery section -->
			<div id="content">
				<div id="main">
					<div id="images">
						<?php 
            $points = array();
            $firstImage = null;
            $lastImage = null;
            if (getNumImages() > 0) {
                ?>
							<div id="gallery" class="ad-gallery">
								<div class="ad-image-wrapper"></div>
								<div class="ad-controls"></div>
								<div class="ad-nav">
									<div class="ad-thumbs">
										<ul class="ad-thumb-list">
											<?php 
                while (next_image(true)) {
                    if ($map) {
                        $coord = getGeoCoord($_zp_current_image);
                        if ($coord) {
                            $points[] = $coord;
                        }
                    }
                    if (isImagePhoto()) {
                        // does not do video
                        if (is_null($firstImage)) {
                            $lastImage = imageNumber();
                            $firstImage = $lastImage;
                        } else {
                            $lastImage++;
                        }
                        ?>
													<li>
														<a href="<?php 
                        echo html_encode(getDefaultSizedImage());
                        ?>
">
															<img src="<?php 
                        echo html_encode(pathurlencode(getImageThumb()));
                        ?>
"
																	 class="image<?php 
                        echo $lastImage;
                        ?>
"
																	 alt="<?php 
                        echo html_encode(getImageDesc());
                        ?>
">
														</a>
													</li>
													<?php 
                    }
                }
                ?>
										</ul>
									</div>
								</div>
							</div>
							<?php 
            }
            ?>

						<div id="caption"<?php 
            if (getOption('effervescence_caption_location') == 'none') {
                echo ' style="display:none"';
            }
            ?>
>
						</div>
						<div class="clearage"></div>
						<?php 
            if (!empty($points) && $map) {
                function map_callback($map)
                {
                    global $points;
                    foreach ($points as $coord) {
                        addGeoCoord($map, $coord);
                    }
                }
                ?>
							<div id="map_link">
							<?php 
                printGoogleMap(NULL, NULL, NULL, 'album_page', 'map_callback');
                ?>
							</div>
						<?php 
            }
            ?>
					</div><!-- images -->
			<?php 
            if (function_exists('printAddToFavorites')) {
                printAddToFavorites($_zp_current_album);
            }
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:functions.php


示例14: foreach

    <ul class="list">
        <?php 
foreach ($items as $value) {
    ?>
        <li class="item">
            <div class="img_box">
                <a href="<?php 
    echo url("/article_article_detail/?id={$value['id']}");
    ?>
">
                    <img class="lazy" src="<?php 
    echo $appConfigs[image_block];
    ?>
"
                         data-original="<?php 
    echo getImageThumb($value[thumb], '180x126');
    ?>
" alt="<?php 
    echo $value[title];
    ?>
"/>
                </a>
            </div>
            <div class="text_box">
                <h1 class="head"><a href="<?php 
    echo $value[url];
    ?>
"><?php 
    echo $value[title];
    ?>
</a></h1>
开发者ID:jifangshiyanshi,项目名称:tuonews,代码行数:31,代码来源:module_article_small_img_list.html.php


示例15: printImageThumb

/**
 * @param string $alt Alt text
 * @param string $class optional class tag
 * @param string $id optional id tag
 */
function printImageThumb($alt, $class = NULL, $id = NULL)
{
    global $_zp_current_image;
    if (is_null($_zp_current_image)) {
        return;
    }
    if (!$_zp_current_image->getShow()) {
        $class .= " not_visible";
    }
    $album = $_zp_current_image->getAlbum();
    $pwd = $album->getPassword();
    if (!empty($pwd)) {
        $class .= " password_protected";
    }
    $url = getImageThumb();
    $s = getOption('thumb_size');
    if (getOption('thumb_crop')) {
        $w = getOption('thumb_crop_width');
        $h = getOption('thumb_crop_height');
        if ($w > $h) {
            $h = round($h * $s / $w);
            $w = $s;
        } else {
            $w = round($w * $s / $w);
            $h = $s;
        }
    } else {
        $w = $h = $s;
        getMaxSpaceContainer($w, $h, $_zp_current_image, true);
    }
    $size = ' width="' . $w . '" height="' . $h . '"';
    $class = trim($class);
    if ($class) {
        $class = ' class="' . $class . '"';
    }
    if ($id) {
        $id = ' id="' . $id . '"';
    }
    $html = '<img src="' . html_encode($url) . '"' . $size . ' alt="' . html_encode($alt) . '"' . $class . $id . " />";
    $html = zp_apply_filter('standard_image_thumb_html', $html);
    echo $html;
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:47,代码来源:template-functions.php


示例16: printBaseSlideShow

function printBaseSlideShow()
{
    global $_zp_gallery, $_zp_gallery_page, $_myFavorites, $_zp_conf_vars, $_zp_themeroot, $isMobile, $isTablet;
    if (!isset($_POST['albumid'])) {
        return '<div class="errorbox" id="message"><h2>' . gettext('Invalid linking to the slideshow page.') . '</h2></div>';
    }
    //getting the image to start with
    if (!empty($_POST['imagenumber'])) {
        $imagenumber = sanitize_numeric($_POST['imagenumber']) - 1;
        // slideshows starts with 0, but zp with 1.
    } else {
        $imagenumber = 0;
    }
    // set pagenumber to 0 if not called via POST link
    if (isset($_POST['pagenr'])) {
        $pagenumber = sanitize_numeric($_POST['pagenr']);
    } else {
        $pagenumber = 1;
    }
    // getting the number of images
    if (!empty($_POST['numberofimages'])) {
        $numberofimages = sanitize_numeric($_POST['numberofimages']);
    } else {
        $numberofimages = 0;
    }
    //if ($imagenumber < 2 || $imagenumber > $numberofimages) {
    //	$imagenumber = 0;
    //}
    //getting the album to show
    if (!empty($_POST['albumid'])) {
        $albumid = sanitize_numeric($_POST['albumid']);
    } else {
        $albumid = 0;
    }
    if (isset($_POST['preserve_search_params'])) {
        // search page
        $search = new SearchEngine();
        $params = sanitize($_POST['preserve_search_params']);
        $search->setSearchParams($params);
        $searchwords = $search->getSearchWords();
        $searchdate = $search->getSearchDate();
        $searchfields = $search->getSearchFields(true);
        $page = $search->page;
        $returnpath = getSearchURL($searchwords, $searchdate, $searchfields, $page);
        $albumobj = new AlbumBase(NULL, false);
        $albumobj->setTitle(gettext('Search'));
        $albumobj->images = $search->getImages(0);
        $albumtitle = gettext('Search');
    } else {
        if (isset($_POST['favorites_page'])) {
            $albumobj = $_myFavorites;
            $returnpath = rewrite_path($_myFavorites->getLink() . '/' . $pagenumber, FULLWEBPATH . '/index.php?p=favorites' . '&page=' . $pagenumber);
            $albumtitle = gettext('Favorites');
        } else {
            $albumq = query_single_row("SELECT title, folder FROM " . prefix('albums') . " WHERE id = " . $albumid);
            $albumobj = newAlbum($albumq['folder']);
            $albumtitle = $albumobj->getTitle();
            if (empty($_POST['imagenumber'])) {
                $returnpath = $albumobj->getLink($pagenumber);
            } else {
                $image = newImage($albumobj, sanitize($_POST['imagefile']));
                $returnpath = $image->getLink();
            }
        }
    }
    if (!$albumobj->isMyItem(LIST_RIGHTS) && !checkAlbumPassword($albumobj)) {
        return '<div class="errorbox" id="message"><h2>' . gettext('This album is password protected!') . '</h2></div>';
    }
    $slideshow = '';
    $numberofimages = $albumobj->getNumImages();
    if ($numberofimages == 0) {
        return '<div class="errorbox" id="message"><h2>' . gettext('No images for the slideshow!') . '</h2></div>';
    }
    $images = $albumobj->getImages(0);
    // slideshow generate data for galleria
    ?>
		<script>
			var data = [
			<?php 
    for ($c = 0, $idx = 0; $c < $numberofimages; $c++, $idx++) {
        if (is_array($images[$idx])) {
            $filename = $images[$idx]['filename'];
            $album = newAlbum($images[$idx]['folder']);
            $image = newImage($album, $filename);
        } else {
            $filename = $images[$idx];
            $image = newImage($albumobj, $filename);
        }
        if (isImagePhoto($image)) {
            makeImageCurrent($image);
            echo '{' . "\n";
            echo 'thumb: \'' . getImageThumb() . '\',' . "\n";
            echo 'image: \'' . getDefaultSizedImage() . '\',' . "\n";
            echo 'big: \'' . getCustomImageURL(getOption('zpbase_galbigsize')) . '\',' . "\n";
            echo 'title: \'' . js_encode($image->getTitle()) . '\',' . "\n";
            $desc = $image->getDesc();
            $desc = str_replace("\r\n", '<br />', $desc);
            $desc = str_replace("\r", '<br />', $desc);
            echo 'description: \'' . js_encode($desc) . '\',' . "\n";
            if (!getOption('zpbase_nodetailpage')) {
//.........这里部分代码省略.........
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:101,代码来源:functions.php


示例17: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $points;
        if (isImagePage()) {
            ?>
			<!-- Gallery section -->
			<div id="images">
				<?php 
            $points = array();
            $firstImage = null;
            $lastImage = null;
            if (getNumImages() > 0) {
                ?>
					<div id="gallery" class="ad-gallery">
						<div class="ad-image-wrapper"></div>
						<div class="ad-controls"></div>
						<div class="ad-nav">
							<div class="ad-thumbs">
								<ul class="ad-thumb-list">
									<?php 
                while (next_image(true)) {
                    if ($map) {
                        $coord = getGeoCoord($_zp_current_image);
                        if ($coord) {
                            $points[] = $coord;
                        }
                    }
                    if (isImagePhoto()) {
                        // does not do video
                        if (is_null($firstImage)) {
                            $lastImage = imageNumber();
                            $firstImage = $lastImage;
                        } else {
                            $lastImage++;
                        }
                        ?>
											<li>
												<a href="<?php 
                        echo html_encode(getDefaultSizedImage());
                        ?>
">
													<img src="<?php 
                        echo html_encode(pathurlencode(getImageThumb()));
                        ?>
"
															 class="image<?php 
                        echo $lastImage;
                        ?>
"
															 alt="<?php 
                        echo html_encode(getImageDesc());
                        ?>
">
												</a>
											</li>
											<?php 
                    }
                }
        

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getImageTitle函数代码示例发布时间:2022-05-15
下一篇:
PHP getImageSrc函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap