当前位置: 首页>>代码示例>>PHP>>正文


PHP getImageURL函数代码示例

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


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

示例1: outputRow

function outputRow($node)
{
    print "<tr><td><img src='../Common/Images/" . getImageURL($node->type) . "'>&nbsp;&nbsp;<a href='";
    print getURL($node);
    print "'>";
    print $node->cm_name;
    print "</a></td></tr>";
}
开发者ID:negabaro,项目名称:alfresco,代码行数:8,代码来源:index.php

示例2: __construct

 function __construct(PageInfo $pageInfo, ImagickTaskQueue $taskQueue)
 {
     $activeCategory = $pageInfo->getCategory();
     $activeExample = $pageInfo->getExample();
     $this->imageBaseURL = getImageURL($activeCategory, $activeExample);
     $this->customImageBaseURL = getCustomImageURL($activeCategory, $activeExample);
     $this->imageStatusBaseURL = getImageStatusURL($activeCategory, $activeExample);
     $this->taskQueue = $taskQueue;
 }
开发者ID:sdmmember,项目名称:Imagick-demos,代码行数:9,代码来源:ControlComposite.php

示例3: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $points;
        ?>
		<!-- Colorbox section -->
		<div id="images">
			<?php 
        $points = array();
        while (next_image()) {
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            ?>
				<div class="image">
					<div class="imagethumb">
						<?php 
            if (isImagePhoto()) {
                // colorbox is only for real images
                $link = html_encode(getDefaultSizedImage()) . '" class="thickbox"';
            } else {
                $link = html_encode(getImageURL()) . '"';
            }
            ?>
						<a href="<?php 
            echo $link;
            ?>
" title="<?php 
            echo getBareImageTitle();
            ?>
">
							<?php 
            printImageThumb(getImageTitle());
            ?>
						</a></div>
				</div>
				<?php 
        }
        ?>
		</div>
		<br class="clearall" />
		<?php 
        @call_user_func('printSlideShowLink');
    }
开发者ID:rb26,项目名称:zenphoto,代码行数:46,代码来源:functions.php

示例4: theme_content

    function theme_content($map)
    {
        global $_zp_current_image, $points;
        ?>
		<!-- Image page section -->
		<div id="images">
			<?php 
        $points = array();
        while (next_image()) {
            if ($map) {
                $coord = getGeoCoord($_zp_current_image);
                if ($coord) {
                    $points[] = $coord;
                }
            }
            ?>
				<div class="image">
					<div class="imagethumb"><a href="<?php 
            echo html_encode(getImageURL());
            ?>
" title="<?php 
            echo html_encode(getBareImageTitle());
            ?>
"><?php 
            printImageThumb(getImageTitle());
            ?>
</a></div>
				</div>
				<?php 
        }
        ?>
		</div>
		<br class="clearall" />
		<?php 
        @call_user_func('printSlideShowLink');
    }
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:36,代码来源:functions.php

示例5: html_encode

    echo html_encode(getImageURL());
    ?>
" title="<?php 
    echo getBareImageTitle();
    ?>
">
								<?php 
    printImageThumb(null, 'check-flagthumb scale');
    ?>
							</a>
							<div class="caption caption-image">
								<?php 
    if (isImagePhoto()) {
        ?>
								<a class="swipebox image-zoom" title="<?php 
        echo html_encode('<a href="' . getImageURL() . '">' . getBareImageTitle() . '</a>');
        ?>
" href="<?php 
        echo html_encode(getDefaultSizedImage());
        ?>
"><i class="fa fa-search-plus fa-lg"></i></a>
								<?php 
    }
    ?>
								<?php 
    if (function_exists('getCommentCount')) {
        if ($_zp_current_image->getCommentsAllowed() && getCommentCount() > 0) {
            ?>
									<div class="image-cr"><i class="fa fa-comments"></i><span> <?php 
            echo getCommentCount();
            ?>
开发者ID:ckfreeman,项目名称:libratus,代码行数:31,代码来源:album.php

示例6: getImageThumb

        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++;
        }
    }
    ?>
					];
				</script>
				<?php 
    if ($c > 0) {
        ?>
				<div id="galleria"></div>
				<?php 
    } else {
        ?>
开发者ID:BimbaLaszlo,项目名称:zpbase,代码行数:31,代码来源:album-galleria.php

示例7: while

    echo "<th class='zebra-striped' colspan='2'>Name</th>";
    echo "<th class='zebra-striped'>Subject</th>";
    echo "<th class='zebra-striped'>Internals</th>";
    echo "<th class='zebra-striped'>Externals</th>";
    echo "<th class='zebra-striped'>Credits</th>";
    while ($row = mysql_fetch_array($result)) {
        $x = lookupStudent($row['srno']);
        if ($x != "false") {
            echo "<tr>";
            $name = $x['sname'];
            $sid = $x['sid'];
            $subject = $row["subname"];
            $intm = $row["intm"];
            $extm = $row["extm"];
            $cre = $row["cre"];
            $imgurl = getImageURL($x['imgid']);
            echo "<td><img src='../{$imgurl}' width='50' height='50'></img></td>";
            echo "<td>{$name}</td>";
            echo "<td>{$subject}</td>";
            echo "<td>{$intm}</td>";
            echo "<td>{$extm}</td>";
            echo "<td>{$cre}</td>";
            echo "</tr>";
        }
    }
    echo "</table>";
    echo "</form>";
}
?>
			</div>
		</center>
开发者ID:neshkatrapati,项目名称:Portcullis---FreeEdu-Extension-,代码行数:31,代码来源:import.php

示例8: zenpageAlbumImage

/**
 * support to show an image from an album
 * The imagename is optional. If absent the album thumb image will be
 * used and the link will be to the album. If present the link will be
 * to the image.
 *
 * @param string $albumname
 * @param string $imagename
 * @param int $size the size to make the image. If omitted image will be 50% of 'image_size' option.
 * @param bool $linkalbum set true to link specific image to album instead of image
 */
function zenpageAlbumImage($albumname, $imagename = NULL, $size = NULL, $linkalbum = false)
{
    global $_zp_gallery;
    echo '<br />';
    $album = newAlbum($albumname);
    if ($album->loaded) {
        if (is_null($size)) {
            $size = floor(getOption('image_size') * 0.5);
        }
        $image = NULL;
        if (is_null($imagename)) {
            $linkalbum = true;
            $image = $album->getAlbumThumbImage();
        } else {
            $image = newImage($album, $imagename);
        }
        if ($image && $image->loaded) {
            makeImageCurrent($image);
            if ($linkalbum) {
                rem_context(ZP_IMAGE);
                echo '<a href="' . html_encode($album->getLink()) . '"   title="' . sprintf(gettext('View the %s album'), $albumname) . '">';
                add_context(ZP_IMAGE);
                printCustomSizedImage(sprintf(gettext('View the album %s'), $albumname), $size);
                rem_context(ZP_IMAGE | ZP_ALBUM);
                echo '</a>';
            } else {
                echo '<a href="' . html_encode(getImageURL()) . '" title="' . sprintf(gettext('View %s'), $imagename) . '">';
                printCustomSizedImage(sprintf(gettext('View %s'), $imagename), $size);
                rem_context(ZP_IMAGE | ZP_ALBUM);
                echo '</a>';
            }
        } else {
            ?>
			<span style="background:red;color:black;">
				<?php 
            printf(gettext('<code>zenpageAlbumImage()</code> did not find the image %1$s:%2$s'), $albumname, $imagename);
            ?>
			</span>
			<?php 
        }
    } else {
        ?>
		<span style="background:red;color:black;">
			<?php 
        printf(gettext('<code>zenpageAlbumImage()</code> did not find the album %1$s'), $albumname);
        ?>
		</span>
		<?php 
    }
}
开发者ID:rauldobrota,项目名称:zenphoto,代码行数:61,代码来源:zenpage-template-functions.php

示例9: 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_page;
        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');
        }
        if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
            $ogimage_width = getOption('htmlmeta_ogimage_width');
            $ogimage_height = getOption('htmlmeta_ogimage_height');
            if (empty($ogimage_width)) {
                $ogimage_width = 1280;
            }
            if (empty($ogimage_height)) {
                $ogimage_height = 900;
            }
        }
        $type = 'article';
        switch ($_zp_gallery_page) {
            case 'index.php':
                $desc = getBareGalleryDesc();
                //$canonicalurl = $host . getGalleryIndexURL();
                $canonicalurl = $host . getPageNumURL($_zp_page);
                $type = 'website';
                break;
            case 'album.php':
                $pagetitle = getBareAlbumTitle() . " - ";
                $date = getAlbumDate();
                $desc = getBareAlbumDesc();
                $canonicalurl = $host . getPageNumURL($_zp_page);
                if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                    $thumbimg = $_zp_current_album->getAlbumThumbImage();
                    getMaxSpaceContainer($ogimage_width, $ogimage_height, $thumbimg, false);
                    $thumb = $host . html_encode(pathurlencode($thumbimg->getCustomImage(NULL, $ogimage_width, $ogimage_height, NULL, NULL, NULL, NULL, false, NULL)));
                }
                break;
            case 'image.php':
                $pagetitle = getBareImageTitle() . " (" . getBareAlbumTitle() . ") - ";
                $date = getImageDate();
                $desc = getBareImageDesc();
                $canonicalurl = $host . getImageURL();
                if (getOption('htmlmeta_og-image') || getOption('htmlmeta_twittercard')) {
                    $thumb = $host . html_encode(pathurlencode(getCustomSizedImageMaxSpace($ogimage_width, $ogimage_height)));
                }
                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';
                        }
                    }
                    if ($_zp_page != 1) {
                        $canonicalurl .= '/' . $_zp_page;
                    }
                }
                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');
                }
//.........这里部分代码省略.........
开发者ID:rb26,项目名称:zenphoto,代码行数:101,代码来源:html_meta_tags.php

示例10: while

		</div>
		<?php 
}
?>
	</div>

    <div id="images_tlg">
		<?php 
while (next_image()) {
    ?>

		<div class="image">
			<div id="image_box">
			<div id="image_position">
			<a href="<?php 
    echo getImageURL();
    ?>
" title="<?php 
    echo getImageTitle();
    ?>
"><?php 
    printImageThumb(getImageTitle());
    ?>
</a>
			</div>
			</div>
		</div>


		<?php 
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:album.php

示例11: getURL

 public function getURL()
 {
     return getImageURL($this->activeCategory, $this->activeExample);
 }
开发者ID:finelinePG,项目名称:imagick,代码行数:4,代码来源:NullControl.php

示例12: getImageLinkURL

/**
 * @deprecated
 * @since 1.4.6
 *
 */
function getImageLinkURL()
{
    deprecated_functions::notify(gettext('use getImageURL()'));
    return getImageURL();
}
开发者ID:rb26,项目名称:zenphoto,代码行数:10,代码来源:deprecated-functions.php

示例13: trim

        $k = trim(strtolower($_GET["k"]));
    }
}
if ($k == "" && $user["id"] == "") {
    $k = "kitten";
}
$images = flickrTagmatch($k, $m, 500, 0, 0, "interestingness-desc", $user["id"]);
if (count($images["photo"]) > 0) {
    $rndID = rand(0, count($images["photo"]) - 1);
    if (isset($_GET["u"])) {
        if ("" . $_GET["u"] == "d") {
            $rndID = (-1 + (-1 + date("n", time())) * date("t", time()) + date("j", time())) % (count($images["photo"]) - 1);
        }
    }
    $selectedImage = $images["photo"][$rndID];
    $selectedImage["url"] = getImageURL($selectedImage, $w, $h);
    $selectedImage["licensename"] = getImageLicense($selectedImage);
    $selectedImage["fulltitle"] = $selectedImage["title"] . " by " . $selectedImage["ownername"];
}
if (!isset($selectedImage)) {
    $selectedImage["url"] = $site["flickr"]["defaultImage"];
    $selectedImage["licensename"] = $site["flickr"]["defaultLicense"];
    $selectedImage["fulltitle"] = $site["flickr"]["defaultFullTitle"];
}
$selectedImage["md5"] = md5($selectedImage["url"]);
$selectedImage["cached"] = $site["imageCache"] . $selectedImage["md5"] . ".jpg";
$selectedImage["cachedresized"] = $site["path"] . $site["folder"] . $site["imageCache"] . $selectedImage["md5"] . "." . $w . "." . $h . ".jpg";
$selectedImage["cachedresizedpublic"] = $site["folder"] . $site["imageCache"] . $selectedImage["md5"] . "." . $w . "." . $h . ".jpg";
cacheImage($selectedImage["url"], $selectedImage["cached"]);
smart_resize_image($selectedImage["cached"], null, $w, $h, false, $selectedImage["cachedresized"], true);
//Convert image to jpg
开发者ID:ntctbt,项目名称:LoremFlickr,代码行数:31,代码来源:image.php

示例14: parseImg

function parseImg($imgHtml)
{
    // 	$imgHtml='<IMG BORDER=2 HEIGHT=133 WIDTH=172 SRC="picts/FREAKME.jpg" alt="Ribbit">';
    preg_match_all('/(alt|width|height|src)=("[^"]*")/i', $imgHtml, $values);
    // 	print_r($values);
    // 	global $url ;
    // 	echo ($url).'<br/>';
    // 	$imgHtml = str_replace(">","/>",$imgHtml);
    // 	$imgHtml = str_replace("//>","/>",$imgHtml);
    // 	$parser = xml_parser_create();
    // 	echo $imgHtml.'\n';
    // 	xml_parse_into_struct($parser, $imgHtml, $values);
    // 	print_r($values);
    $arr = array();
    $blacklistImgs = array("ad.doubleclick.net");
    $imgSrc = "";
    $imgAlt = "";
    $height = 0;
    $width = 0;
    foreach ($values[1] as $key => $val) {
        //print_r($val);
        // 		echo $key;
        if ($val == "SRC" || $val == 'src') {
            $imgSrc = getImageURL($values[2][$key]);
        }
        if ($val == "ALT" || $val == 'alt') {
            $imgAlt = $values[2][$key];
        }
        if ($val == "HEIGHT" || $val == 'height') {
            $height = $values[2][$key];
        }
        if ($val == "WDITH" || $val == 'width') {
            $width = $values[2][$key];
        }
    }
    // 	echo $imgSrc.' '.$imgAlt.' '.$height.' '.$width;
    if ($imgSrc != "") {
        //echo "hi";
        $urlParams = parse_url($imgSrc);
        if (!in_array($urlParams["host"], $blacklistImgs)) {
            // 				print_r($val['attributes']);
            /*$width = 0; $height = 0;
            		if(isset($val['attributes']['WIDTH'])){
            			$width = $val['attributes']['WIDTH'];
            		}
            		if(isset($val['attributes']['HEIGHT'])){
            			$height = $val['attributes']['HEIGHT'];
            		}*/
            if ($width < 1 && $height < 1) {
                list($width, $height, $type, $attr) = @getimagesize($imgSrc);
            }
            if ($type == 17) {
                //If its fav ico with extn .ico
                return $arr;
            }
            $hwRatio = 0;
            if ($width > 0 && $height > 0) {
                $hwRatio = $width / $height;
            }
            // 				echo $width.' '.$height.' '.$hwRatio. ' '.$imgSrc .'<br/>';
            if ($hwRatio > 0.8 && $hwRatio < 2) {
                $minImg = 32;
                $isSmallSquare = $hwRatio == 1 ? $width > $minImg : $width > $minImg && $height > $minImg;
                if ($isSmallSquare) {
                    //To remove Background images used for UI, if square
                    $arr['src'] = $imgSrc;
                    if (isset($imgAlt)) {
                        $arr['alt'] = $imgAlt;
                    }
                    if (isset($width)) {
                        $arr['width'] = $width;
                    }
                    if (isset($height)) {
                        $arr['height'] = $height;
                    }
                }
            }
        }
    }
    // 	}
    // 	print_r($arr);
    return $arr;
}
开发者ID:sachsy,项目名称:php-url-embedder,代码行数:83,代码来源:parse.php

示例15: printImageURL

/**
 * Prints the link to the current  image.
 *
 * @param string $text text for the link
 * @param string $title title tag for the link
 * @param string $class optional style class for the link
 * @param string $id optional style id for the link
 */
function printImageURL($text, $title, $class = NULL, $id = NULL)
{
    printLinkHTML(getImageURL(), $text, $title, $class, $id);
}
开发者ID:IliyanGochev,项目名称:zenphoto,代码行数:12,代码来源:template-functions.php


注:本文中的getImageURL函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。