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


PHP phpFlickr::photosets_getInfo方法代码示例

本文整理汇总了PHP中phpFlickr::photosets_getInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP phpFlickr::photosets_getInfo方法的具体用法?PHP phpFlickr::photosets_getInfo怎么用?PHP phpFlickr::photosets_getInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在phpFlickr的用法示例。


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

示例1: phpFlickr

$f = new phpFlickr($apiKey);
$page = $_GET['page'];
if ($page == null) {
    $page = 'home';
}
$setId = $_GET['setId'];
if ($page == "blog") {
    $setId = $blog;
}
if ($page == "about") {
    $setId = $about;
}
$collections = $f->collections_getTree($collectionId, $user);
if ($setId) {
    $photos = $f->photosets_getPhotos($setId);
    $info = $f->photosets_getInfo($setId);
    $title = $info['title'];
    $description = $info['description'];
    foreach ($photos['photoset']['photo'] as $photo) {
        $photoURL[] = "http://www.flickr.com/photos/" . $user . "/" . $photo['id'];
        $photoLink[] = $f->buildPhotoURL($photo, 'large');
        $info = $f->photos_getInfo($photo['id']);
        $pTitle[] = $info['title'];
        $pDescription[] = $info['description'];
    }
}
foreach ($collections['collections']['collection'] as $collection) {
    if ($collection['id'] != $collectionId) {
        $workId[] = $collection['set'][0]['id'];
        $workTitle[] = $collection['title'];
        foreach ($collection['set'] as $set) {
开发者ID:neufuture,项目名称:FlickrCMS,代码行数:31,代码来源:getMedia.php

示例2: header

<?php

if (!isset($_GET['id'])) {
    header('Location:index.php');
}
require_once "phpFlickr/phpFlickr.php";
$f = new phpFlickr("44449d9d74ed80abe095ab2a6f137dbe", "abde3a1309b8d8e1");
$photos = $f->photosets_getPhotos($_GET['id']);
if (sizeof($photos['photoset']['photo']) <= 0) {
    header('Location:index.php');
}
$p = $f->photosets_getInfo($photos['photoset']['id']);
$set_title = $p['title'];
include "header.php";
//include "sidebar.php";
?>
<div id="main_left">
	<img src="<?php 
echo $f->buildPhotoURL($photos['photoset']['photo'][0], 'medium');
?>
" />
</div>
<div id="main_right">
	<ul id="gallery" class="gallery">
<?php 
$i = 0;
foreach ((array) $photos['photoset']['photo'] as $photo) {
    //echo 'photo:'.$photo.'<hr />';
    echo "<li><a href='" . $f->buildPhotoURL($photo, "medium") . "' title='" . $photo['title'] . "'>";
    echo "<img alt='" . $photo['title'] . "' " . "src='" . $f->buildPhotoURL($photo, "square") . "' /></a></li>";
    $i++;
开发者ID:jimmytp,项目名称:PhotoCat,代码行数:31,代码来源:gallery.php

示例3: phpFlickr

        if (!class_exists('phpFlickr')) {
            require_once fenchurch_flickr_library_path() . '/phpFlickr.php';
        }
        if (module_exists('keys')) {
            $flickr_api_key = keys_get_key('flickr_theme_helper');
        }
        $f = new phpFlickr($flickr_api_key, NULL, FALSE);
        if (module_exists('fenchurch')) {
            $f->enableCache('db', fenchurch_flickr_cache_db_url(), variable_get('fenchurch_flickr_cache_lifetime', 64000));
        }
        if ($flickr_path[1] == 'photos' && is_numeric($flickr_path[3])) {
            $flickr_photo_info = $f->photos_getInfo($flickr_path[3]);
            $thumbnail_url = 'http://farm' . $flickr_photo_info['farm'] . '.static.flickr.com/' . $flickr_photo_info['server'] . '/' . $flickr_photo_info['id'] . '_' . $flickr_photo_info['secret'] . '_s.jpg';
        } else {
            if ($flickr_path[1] == 'photos' && $flickr_path[3] == 'sets') {
                $flickr_photo_set_info = $f->photosets_getInfo($flickr_path[4]);
                $flickr_photo_info = $f->photos_getInfo($flickr_photo_set_info['primary']);
                $thumbnail_url = 'http://farm' . $flickr_photo_info['farm'] . '.static.flickr.com/' . $flickr_photo_info['server'] . '/' . $flickr_photo_info['id'] . '_' . $flickr_photo_info['secret'] . '_s.jpg';
            }
        }
    }
    if ($thumbnail_url) {
        print '<div class="website-thumbnail">';
        $thumbnail = theme('image', $thumbnail_url, $title, '', NULL, FALSE);
        $link_attributes = array();
        $link_attributes['rel'] = $dead_link ? 'nofollow' : NULL;
        $link_attributes['html'] = TRUE;
        print l($thumbnail, check_url($node->field_url[0]['display_url']), $link_attributes);
        print '</div>';
    }
}
开发者ID:sillygwailo,项目名称:Fenchurch,代码行数:31,代码来源:node-mark.tpl.php


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