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


PHP phpFlickr::photosets_getPhotos方法代码示例

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


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

示例1: flickr_show_set

function flickr_show_set($set_id, $size = 's', $start = 0, $limit = 0, $bigsize = '')
{
    global $FLICKR_API_KEY;
    $f = new phpFlickr($FLICKR_API_KEY);
    $set = $f->photosets_getPhotos($set_id);
    $start = $start;
    $limit = $limit > 0 ? $limit : count($set['photo']);
    flickr_output_from_set($set, $size, $start, $limit, $bigsize);
}
开发者ID:andyinabox,项目名称:mnkino,代码行数:9,代码来源:flickr.php

示例2: elseif

		<?php 
                if (!(($key + 1) % 3)) {
                    echo "</tr>\n<tr>";
                }
            } else {
                echo "<td>No matching pictures were found.</td>";
            }
        }
        echo "</tr></table>";
    } else {
        print "No matching pictures were found.";
    }
} elseif ($this->attributes['details']['show'] == "photosets") {
    if (isset($this->attributes['details']['photoset'])) {
        echo "<table cellpadding='3' style='border: none; width: 100%'>\n<tr>";
        $photos = $f->photosets_getPhotos($this->attributes['details']['photoset'], "owner_name,owner");
        $isError = $f->getErrorMsg();
        if (!$isError) {
            foreach ($photos['photo'] as $key => $photo) {
                if ($key >= $this->attributes['details']['max_photoset']) {
                    break;
                }
                $myPhoto = $f->photos_getInfo($photo['id']);
                ?>
            <td style="vertical-align: top; text-align: center; width: 33%">
				<a href="http://www.flickr.com/photos/<?php 
                echo $myPhoto['owner']['nsid'];
                ?>
/<?php 
                echo $photo['id'];
                ?>
开发者ID:bscofield,项目名称:movielist,代码行数:31,代码来源:view.php

示例3: phpFlickr

                <div id="overview">
				<?php 
        the_content('Read more on "' . the_title('', '', false) . '" &raquo;');
        ?>
    
                </div>

    <?php 
        $flickr_photoset_id = '72157626966312775';
        $flickr_api_key = '2d589541fd6f617409903e97d0e10bbe';
        $flickr_username = 'remodelingappleton';
        $flickr_gallery = new phpFlickr($flickr_api_key);
        $flickr_gallery->enableCache('fs', 'cache');
        $flickr_gallery_people = $flickr_gallery->people_findByUsername($flickr_username);
        $flickr_gallery_user_id = $flickr_gallery_people['id'];
        $flickr_gallery_photos = $flickr_gallery->photosets_getPhotos($flickr_photoset_id, null, null);
        ?>

        <div id="slider" class="flickr-gallery">
        <h2>Interior Design Gallery</h2>
          <div class="infiniteCarousel">
              <div class="wrapper">
                  <ul>
                    <?php 
        foreach ($flickr_gallery_photos['photoset']['photo'] as $photo) {
            ?>
                      <li><a href="<?php 
            echo $flickr_gallery->buildPhotoURL($photo, 'Large');
            ?>
" rel="facebox" title="<?php 
            echo $photo['title'];
开发者ID:htmlgraphic,项目名称:Remodeling-Appleton,代码行数:31,代码来源:page-team.php

示例4: mkdir

            mkdir($cacheFolderPath);
        }
        $lifetime = 860 * 860;
        // 60 * 60=One hour
        $f->enableCache("fs", "{$cacheFolderPath}", "{$lifetime}");
    }
    ?>

		<?php 
    if ($flickrCaption == "1") {
        ?>

			<div id="gallery">
				<div class="photosets">
					<?php 
        $photos = $f->photosets_getPhotos($flickrSet, NULL, NULL, $flickrNumber);
        ?>

					<?php 
        foreach ($photos['photoset']['photo'] as $photo) {
            $d = $f->photos_getInfo($photo['id']);
            ?>

						<div class="photos">
			<ul>
				<li>
					<a href="#"><img src="<?php 
            echo $f->buildPhotoURL($photo, $flickrThumb);
            ?>
" data-large="<?php 
            echo $f->buildPhotoURL($photo, 'large');
开发者ID:greyhat777,项目名称:vuslinterliga,代码行数:31,代码来源:default.php

示例5: intval

        if (isset($_GET['start'])) {
            $page['start'] = intval($_GET['start']);
        } else {
            $page['start'] = 0;
        }
        if (isset($_GET['display'])) {
            $page['display'] = $_GET['display'] == 'all' ? 500 : intval($_GET['display']);
        } else {
            $page['display'] = 20;
        }
        // get photos
        if ($_GET['album'] == 'not_in_set') {
            $all_photos = $flickr->photos_getNotInSet(NULL, NULL, NULL, NULL, 'photos', NULL, NULL, 500);
            $all_photos = $all_photos['photos']['photo'];
        } else {
            $all_photos = $flickr->photosets_getPhotos($_GET['album'], NULL, NULL, 500, NULL, 'photos');
            $all_photos = $all_photos['photoset']['photo'];
        }
        // get existing photos
        $query = '
SELECT id, file
  FROM ' . IMAGES_TABLE . '
  WHERE file LIKE "' . $flickr_prefix . '%"
;';
        $existing_photos = simple_hash_from_query($query, 'id', 'file');
        $existing_photos = array_map(create_function('$p', 'return preg_replace("#^' . $flickr_prefix . '([0-9]+)\\.([a-z]{3,4})$#i", "$1", $p);'), $existing_photos);
        // remove existing photos
        $duplicates = 0;
        foreach ($all_photos as $i => $photo) {
            if (in_array($photo['id'], $existing_photos)) {
                unset($all_photos[$i]);
开发者ID:biffhero,项目名称:Flickr2Piwigo,代码行数:31,代码来源:import.php

示例6:

							<a href="http://www.lomodroid.com/">HOME</a>
							<a href="http://www.flickr.com/groups/lomodroid/">FLICKR</a>
							<a href="http://twitter.com/lomodroid">TWITTER</a>
						</div>
					</div>
					
					<div id="rhs-header-container" class="unit">
						<img id="robot" src="lomodroid_robot.gif"/>
					</div>
					
				</div>
			</div>		
		<div class="main-content-container">
				<ul id="photo-list">
				<?php 
$photos = $f->photosets_getPhotos($photoset_id, null, null, 7);
foreach ($photos['photoset']['photo'] as $photo) {
    // Build image and link tags for each photo
    $photoInfo = $f->photos_getInfo($photo[id]);
    echo "<li><a href=http://www.flickr.com/photos/" . $photoInfo['owner']['username'] . "/{$photo['id']}>";
    echo "<img border='0' alt='{$photo['title']}' " . "src=" . $f->buildPhotoURL($photo, "Large") . "><div class='metaContainer'><span>" . $photoInfo['title'] . "</span>";
    echo '
								</a>
								<div class="addthis_toolbox addthis_default_style shareBox">
									<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
									<a class="addthis_button_tweet"></a>
									<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=lomodroid" class="addthis_button_compact">Share</a>
								</div>
									<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
									<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=lomodroid"></script>
							</div>
开发者ID:joelviseu,项目名称:lomodroid,代码行数:31,代码来源:index_mobile.php

示例7: flickrps_createGallery


//.........这里部分代码省略.........
        }
    }
    if ($action === 'set') {
        if (!isset($id) || strlen($id) == 0) {
            return flickrps_formatError(__('You must specify the id of the set, using the "id" attribute', 'flickr-photostream'));
        }
    }
    if ($action === 'tag') {
        if (!isset($tags) || strlen($tags) == 0) {
            return flickrps_formatError(__('You must specify the tags using the "tags" attribute', 'flickr-photostream'));
        }
        if ($tags_mode !== 'any' && $tags_mode !== 'all') {
            return flickrps_formatError(__('You must specify a valid tags_mode: "any" or "all"', 'flickr-photostream'));
        }
    }
    if ($action === 'grp') {
        if (!isset($id) || strlen($id) == 0) {
            return flickrps_formatError(__('You must specify the id of the group, using the "id" attribute', 'flickr-photostream'));
        }
    }
    if ($pagination !== 'none' && $pagination !== 'prevnext' && $pagination !== 'numbers') {
        return flickrps_formatError(__('The pagination attribute can be only "none", "prevnext" or "numbers".', 'flickr-photostream'));
    }
    if ($last_row !== 'hide' && $last_row !== 'justify' && $last_row !== 'nojustify') {
        return flickrps_formatError(__('The last_row attribute can be only "hide", "justify" or "nojustify".', 'flickr-photostream'));
    }
    if ($lightbox !== 'none' && $lightbox !== 'colorbox' && $lightbox !== 'swipebox') {
        return flickrps_formatError(__('The lightbox attribute can be only "none", "colorbox" or "swipebox".', 'flickr-photostream'));
    }
    //Photo loading----------------
    $extras = "description, original_format, url_l, url_z";
    if ($action === 'set') {
        //Show the photos of a particular photoset
        $photos = $f->photosets_getPhotos($id, $extras, 1, $max_num_photos, $page_num, NULL);
        $photos_main_index = 'photoset';
    } else {
        if ($action === 'gal') {
            //Show the photos of a particular gallery
            $photos_url[$user_id] = $f->urls_getUserPhotos($user_id);
            if ($f->getErrorCode() != NULL) {
                return flickrps_formatFlickrAPIError($f->getErrorMsg());
            }
            $gallery_info = $f->urls_lookupGallery($photos_url[$user_id] . 'galleries/' . $id);
            if ($f->getErrorCode() != NULL) {
                return flickrps_formatFlickrAPIError($f->getErrorMsg());
            }
            $photos = $f->galleries_getPhotos($gallery_info['gallery']['id'], $extras, $max_num_photos, $page_num);
            $photos_main_index = 'photos';
        } else {
            if ($action === 'tag') {
                $photos = $f->photos_search(array('user_id' => $user_id, 'tags' => $tags, 'tag_mode' => $tags_mode, 'extras' => $extras, 'per_page' => $max_num_photos, 'page' => $page_num));
                $photos_main_index = 'photos';
            } else {
                if ($action === 'grp') {
                    //Show the photos of a particular group pool
                    //groups_pools_getPhotos ($group_id, $tags = NULL, $user_id = NULL, $jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
                    $photos = $f->groups_pools_getPhotos($id, $tags, NULL, NULL, $extras, $max_num_photos, $page_num);
                    $photos_main_index = 'photos';
                } else {
                    //Show the classic photostream
                    $photos = $f->people_getPublicPhotos($user_id, NULL, $extras, $max_num_photos, $page_num);
                    //Need the authentication (TODO)
                    //$photos = $f->people_getPhotos($user_id,
                    //	array("privacy_filter" => "1", "extras" => "description", "per_page" => $max_num_photos, "page" => $page_num));
                    $photos_main_index = 'photos';
                }
开发者ID:jlederman,项目名称:subproj,代码行数:67,代码来源:flickr-photostream.php

示例8: phpFlickr

$f = new phpFlickr("26b2abba37182aca62fe0eb2c7782050");
$set_id = get_input("set_id");
$album_id = get_input("album_id");
$page_pp = get_input("page");
$return_url = get_input("return_url");
$user = get_loggedin_user();
$flickr_id = get_metadata_byname($user->guid, "flickr_id");
if (empty($flickr_id)) {
    register_error(elgg_echo('flickr:errorusername2'));
    forward($return_url);
    die;
    //just in case
}
// Get the friendly URL of the user's photos
$photos_url = $f->urls_getUserPhotos($flickr_id->value);
$photos = $f->photosets_getPhotos($set_id, null, null, 10, $page_pp);
$photos_to_upload = array();
foreach ($photos["photoset"]["photo"] as $photo) {
    //check if we already have this image
    $meta = get_metadata_byname($user->guid, $photo["id"]);
    /*
    	if ($meta->value == 1) { //we've downloaded this already
    		register_error( elgg_echo( 'flickr:errorimageimport' ));
    		continue;
    	} */
    /* Disabled By Rijo Joy  */
    //store this so we don't download the same photo multiple times
    create_metadata($user->guid, $photo["id"], "1", "text", $user->guid, ACCESS_PUBLIC);
    $photo_info = $f->photos_getInfo($photo["id"], $photo["secret"]);
    $tags = array();
    foreach ($photo_info["tags"]["tag"] as $tag) {
开发者ID:rijojoy,项目名称:MyIceBerg,代码行数:31,代码来源:flickrImportPhotoset1.php

示例9: phpFlickr

define('UID', '');
// === S T E P 3 ===
// Download and include the phpFlickr project from http://code.google.com/p/phpflickr/
require 'phpFlickr/phpFlickr.php';
// === S T E P 4 ===
// Run the script via the command line using: "php download-all.php"
// Connect to Flickr
$f = new phpFlickr(API_KEY, API_SECRET, true);
$f->setToken(API_TOKEN);
// Get all of our photosets
$sets = $f->photosets_getList(UID);
foreach ($sets['photoset'] as $set) {
    echo "### " . $set['title'] . "\n";
    @mkdir("photos/{$set['title']}", 0777, true);
    // Get all the photos in this set
    $photos = $f->photosets_getPhotos($set['id']);
    // And download each one...
    foreach ($photos['photoset']['photo'] as $photo) {
        $url = null;
        $sizes = $f->photos_getSizes($photo['id']);
        foreach ($sizes as $size) {
            if ($size['label'] == 'Original') {
                $url = $size['source'];
            }
        }
        if (!is_null($url)) {
            $dir = escapeshellarg("photos/{$set['title']}");
            $filename = parse_url($url, PHP_URL_PATH);
            // Only download if file does not exist...
            if (!file_exists("photos/{$set['title']}/{$filename}")) {
                shell_exec("cd {$dir}; /usr/bin/curl -O {$url}");
开发者ID:airpwn,项目名称:tylerhall,代码行数:31,代码来源:download-all.php

示例10: slider_pro


//.........这里部分代码省略.........
                                }
                            }
                            // end terms loop
                        }
                    }
                    // end fields loop
                    array_push($dynamic_slides, $dynamic_slide);
                    unset($dynamic_slide);
                }
                unset($slide_dynamic_terms);
            } else {
                if (sliderpro_get_slide_setting($slide['settings'], 'slide_type', 'dynamic') == 'flickr') {
                    if (isset($slide['visibility']) && $slide['visibility'] == 'disabled') {
                        continue;
                    }
                    $slide_settings = $slide['settings'];
                    $slide_content = $slide['content'];
                    foreach ($slide_content as $key => $value) {
                        $slide_content[$key] = sliderpro_decode($value, true, true);
                    }
                    // instantiate the Flickr object
                    global $sliderpro_flickr;
                    if (!isset($sliderpro_flickr)) {
                        include_once 'includes/flickr/phpFlickr.php';
                        $sliderpro_flickr = new phpFlickr(sliderpro_get_slide_setting($slide_settings, 'dynamic_flickr_api_key', 'dynamic'));
                        $sliderpro_flickr->enableCache("fs", WP_PLUGIN_DIR . '/slider-pro/includes/flickr/cache');
                    }
                    $dynamic_flickr_data_type = sliderpro_get_slide_setting($slide_settings, 'dynamic_flickr_data_type', 'dynamic');
                    $dynamic_flickr_data_id = sliderpro_get_slide_setting($slide_settings, 'dynamic_flickr_data_id', 'dynamic');
                    $dynamic_flickr_maximum = sliderpro_get_slide_setting($slide_settings, 'dynamic_flickr_maximum', 'dynamic');
                    $flickr_response;
                    $flickr_array_name;
                    if ($dynamic_flickr_data_type == 'set') {
                        $flickr_response = $sliderpro_flickr->photosets_getPhotos($dynamic_flickr_data_id, 'description,date_upload,owner_name');
                        $flickr_array_name = 'photoset';
                    } else {
                        if ($dynamic_flickr_data_type == 'username') {
                            $flickr_response = $sliderpro_flickr->people_getPublicPhotos($dynamic_flickr_data_id, NULL, 'description,date_upload,owner_name');
                            $flickr_array_name = 'photos';
                        }
                    }
                    $slide_dynamic_terms = array();
                    // get all the dynamic terms used in the content fields
                    foreach ($slide_content as $key => $value) {
                        if ($value != '') {
                            $matches = array();
                            preg_match_all('/' . $flickr_terms_pattern . '/s', $value, $matches);
                            // check if a match is found
                            if (!empty($matches)) {
                                // loop through all terms found in the field
                                foreach ($matches[0] as $counter => $match_item) {
                                    // check if the exact term is not already added to the collection
                                    if (!isset($slide_dynamic_terms[$match_item])) {
                                        // get the array of arguments specified for the term/tag
                                        $args = explode('|', trim($matches[3][$counter]));
                                        // create an array of argument pairs (name => value)
                                        $arg_pair = array('term_name' => $matches[2][$counter]);
                                        foreach ($args as $arg) {
                                            if ($arg != '') {
                                                $arg_item = explode('=', $arg);
                                                $arg_pair[trim($arg_item[0])] = substr(trim($arg_item[1]), 1, -1);
                                            }
                                        }
                                        // associate the term found with its array of argument pairs
                                        $slide_dynamic_terms[$match_item] = $arg_pair;
                                    }
开发者ID:SayenkoDesign,项目名称:procarewindowcleaning.com,代码行数:67,代码来源:slider-pro.php

示例11: elseif

if ($NV_imgheight >= '350') {
    $img_size = "large";
} elseif ($NV_imgheight >= '150') {
    $img_size = "medium";
} else {
    $img_size = "small";
}
require_once NV_FILES . "/adm/inc/phpFlickr/phpFlickr.php";
$f = new phpFlickr('7caca0370ede756c26832c28b266ead5');
// API
//$f->enableCache("fs", "cache");
$user = of_get_option('flickr_userid');
if (is_array($NV_flickrset)) {
    $NV_flickrset = implode($NV_flickrset, ',');
}
$photos = $f->photosets_getPhotos($NV_flickrset);
$post_count = count($photos);
// count query
/* ------------------------------------
	:: BLACK AND WHITE EFFECT	
	------------------------------------ */
if ($NV_imageeffect == 'shadowblackwhite' || $NV_imageeffect == 'frameblackwhite' || $NV_imageeffect == 'blackwhite') {
    $NV_blackwhite = 'blackwhite';
    if ($NV_imageeffect == 'shadowblackwhite') {
        $NV_imageeffect = 'shadow';
    }
    if ($NV_imageeffect == 'frameblackwhite') {
        $NV_imageeffect = 'frame';
    }
    if ($NV_imageeffect == 'blackwhite') {
        $NV_imageeffect = 'none';
开发者ID:jgeletka,项目名称:simskin,代码行数:31,代码来源:flickr-class.php

示例12: 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'];
开发者ID:neufuture,项目名称:FlickrCMS,代码行数:30,代码来源:getMedia.php

示例13: getFlickrPhotos

function getFlickrPhotos($target)
{
    global $blogURL, $pluginURL, $configVal;
    requireModel('reader.common');
    requireComponent('Textcube.Model.Paging');
    requireComponent('Textcube.Function.misc');
    $data = misc::fetchConfigVal($configVal);
    $flickruserid = isset($data['flickruserid']) ? $data['flickruserid'] : "";
    require_once "lib/phpFlickr.php";
    $flickr_api_key = "d1038f051000214af2bf694014ca8f98";
    //It's key for plugin. It does not change.
    $f = new phpFlickr($flickr_api_key);
    $listLength = isset($_GET['length']) ? $_GET['length'] : 16;
    $searchKey = isset($_GET['search']) && !empty($_GET['search']) ? urldecode($_GET['search']) : "";
    $photoSets = isset($_GET['photoSets']) && !empty($_GET['photoSets']) ? $_GET['photoSets'] : "";
    $personMode = isset($_GET['person']) ? $_GET['person'] : "my";
    $page = isset($_GET['page']) ? $_GET['page'] : 1;
    $zoomStyle = "flickr";
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="<?php 
    echo $pluginURL;
    ?>
/style/default.css" />
	</head>
	<script type="text/javascript">
	//<![CDDA[
		function insertPhoto(_link, _src_m, _src_l, _title, _style){
			var linkTag_A = '', linkTag_B = '', imgTag = '';
			linkTag_A = '<a href="' + _link + '" title="' + _title + '" target="_blank">'; 
			linkTag_B = '</a>';
			imgTag	= '<img src="' + _src_m + '" border="0" />';

			var isWYSIWYG = false;
			try{
				if(parent.editor.editMode == 'WYSIWYG')
					isWYSIWYG = true;
			}
			catch(e){ }
			if(isWYSIWYG) {
				parent.editor.command('Raw', (linkTag_A + imgTag), linkTag_B);
			}else{
				parent.insertTag(parent.editor.textarea, (linkTag_A + imgTag), linkTag_B);
			}
		}
	//]]>
	</script>
	<body style="margin:0;padding:0;border:none;background-color:#ffffff;">
	<div id="photosBody" style="height:200px;width:100%;overflow-x:hidden;overflow-y:auto;background-color:#fff;">
	<?php 
    if ($personMode == "my" && !empty($flickruserid) && empty($searchKey)) {
        if (!empty($photoSets)) {
            $photoset = $f->photosets_getPhotos($photoSets, "owner_name", NULL, $listLength, $page);
            $photos['photos'] = $photoset['photoset'];
        } else {
            $photos = $f->people_getPublicPhotos($flickruserid, NULL, NULL, $listLength, $page);
        }
        foreach ($photos['photos']['photo'] as $photo) {
            $_output = getFlickrPhotosInfo($photo, $zoomStyle, $flickruserid);
            echo $_output;
        }
    } else {
        if (($personMode == "my" || $personMode == "all") && !empty($searchKey)) {
            if ($personMode == "my" && !empty($flickruserid)) {
                $searchArray = array("user_id" => $flickruserid, "text" => $searchKey, "sort" => "date-posted-desc", "per_page" => $listLength, "page" => $page);
            } else {
                $searchArray = array("text" => $searchKey, "sort" => "date-posted-desc", "per_page" => $listLength, "page" => $page);
            }
            $photos['photos'] = $f->photos_search($searchArray);
            if ($photos['photos']['total'] > 0) {
                foreach ($photos['photos']['photo'] as $photo) {
                    $_output = getFlickrPhotosInfo($photo, $zoomStyle);
                    echo $_output;
                }
            } else {
                echo '<p style="margin-top:30px; text-align:center; font-size:9pt;">Flickr did not find any photos. Please input title, description or tags.</p>';
            }
        } else {
            if ($personMode == "all" && empty($searchKey)) {
                $photos['photos'] = $f->photos_getRecent(NULL, $listLength, $page);
                foreach ($photos['photos']['photo'] as $photo) {
                    $_output = getFlickrPhotosInfo($photo, $zoomStyle);
                    echo $_output;
                }
            } else {
                echo '<p style="margin-top:30px; text-align:center; font-size:9pt;">Flickr did not find any photos.', !$nickName ? '(Input title, description or tags.)' : '', '</p>';
            }
        }
    }
    $pageLink = '?person=' . $personMode . '&photoSets=' . $photoSets . '&length=' . $listLength . '&search=' . rawurlencode($searchKey);
    //$photos['total'] = $photos['total'] > 996 ? 996 : $photos['total'];
    $paging = HC_getFetchWithPaging($photos['photos']['total'], $page, $listLength, "{$blogURL}/plugin/flickrPhotos", $pageLink . "&page=");
    $pagingTemplate = '[##_paging_rep_##]';
    $pagingItemTemplate = '<a [##_paging_rep_link_##] class="num">[##_paging_rep_link_num_##]</a>';
    $prev_page = isset($paging['prev']) ? " href=\"{$pageLink}&page={$paging['prev']}\" " : '';
    $next_page = isset($paging['next']) ? " href=\"{$pageLink}&page={$paging['next']}\" " : '';
    $no_more_prev = isset($paging['prev']) ? '' : 'no-more-prev';
//.........这里部分代码省略.........
开发者ID:hinablue,项目名称:TextCube,代码行数:101,代码来源:index.php

示例14: UserSets_Get_Photos

function UserSets_Get_Photos($photosets_id, $path)
{
    $o = new phpFlickr('6791ccf468e1c2276c1ba1e0c41683a4');
    $extras = 'url_o,url_l';
    $d = $o->photosets_getPhotos($photosets_id, $extras);
    $total_pages = $d['photoset']['pages'];
    $total_photos = $d['photoset']['total'];
    print "total photos : {$total_photos} \ntotal_pages : {$total_pages} \n";
    #print_r($d);
    for ($index_page = 1; $index_page <= $total_pages; $index_page++) {
        print "page : {$index_page} \n";
        $key = new phpFlickr('6791ccf468e1c2276c1ba1e0c41683a4');
        $extras = 'url_o,url_l';
        $set_data = $key->photosets_getPhotos($photosets_id, $extras, NULL, NULL, $index_page);
        for ($index = 0; $index <= 500; $index++) {
            if (!empty($set_data['photoset']['photo'][$index]['url_m'])) {
                #print_r( "photo $index : ". $set_data['photoset']['photo'][$index]['url_o'] ."\n");
                $downfile = $set_data['photoset']['photo'][$index]['url_m'];
                system("wget -nc {$downfile} -P {$path}");
            } elseif (!empty($set_data['photoset']['photo'][$index]['url_z'])) {
                #print_r( "photo $index : ".$set_data['photoset']['photo'][$index]['url_l'] ."\n");
                $downfile = $set_data['photoset']['photo'][$index]['url_z'];
                system("wget -nc {$downfile} -P {$path}");
            }
            # else{
            #     print ("orignal and large size is not available \n");
            # }
        }
    }
}
开发者ID:hannibal0112,项目名称:php_flickr_download,代码行数:30,代码来源:download_ID_Sets_V1.php

示例15: fjgwpp_createGallery


//.........这里部分代码省略.........
        }
    }
    if ($action === 'set') {
        if (!isset($id) || strlen($id) == 0) {
            return fjgwpp_formatError(__('You must specify the id of the set, using the "id" attribute', 'fjgwpp'));
        }
    }
    if ($action === 'tag') {
        if (!isset($tags) || strlen($tags) == 0) {
            return fjgwpp_formatError(__('You must specify the tags using the "tags" attribute', 'fjgwpp'));
        }
        if ($tags_mode !== 'any' && $tags_mode !== 'all') {
            return fjgwpp_formatError(__('You must specify a valid tags_mode: "any" or "all"', 'fjgwpp'));
        }
    }
    if ($action === 'grp') {
        if (!isset($id) || strlen($id) == 0) {
            return fjgwpp_formatError(__('You must specify the id of the group, using the "id" attribute', 'fjgwpp'));
        }
    }
    if ($pagination !== 'none' && $pagination !== 'prevnext' && $pagination !== 'numbers') {
        return fjgwpp_formatError(__('The pagination attribute can be only "none", "prevnext" or "numbers".', 'fjgwpp'));
    }
    if ($last_row !== 'hide' && $last_row !== 'justify' && $last_row !== 'nojustify') {
        return fjgwpp_formatError(__('The last_row attribute can be only "hide", "justify" or "nojustify".', 'fjgwpp'));
    }
    if ($lightbox !== 'none' && $lightbox !== 'colorbox' && $lightbox !== 'swipebox') {
        return fjgwpp_formatError(__('The lightbox attribute can be only "none", "colorbox" or "swipebox".', 'fjgwpp'));
    }
    //Photo loading----------------
    $extras = "description, original_format, url_l, url_z";
    if ($action === 'set') {
        //Show the photos of a particular photoset
        $photos = $f->photosets_getPhotos($id, $extras, NULL, $max_num_photos, $page_num, NULL);
        $photos_main_index = 'photoset';
    } else {
        if ($action === 'gal') {
            //Show the photos of a particular gallery
            $photos_url[$user_id] = $f->urls_getUserPhotos($user_id);
            if ($f->getErrorCode() != NULL) {
                return fjgwpp_formatFlickrAPIError($f->getErrorMsg());
            }
            $gallery_info = $f->urls_lookupGallery($photos_url[$user_id] . 'galleries/' . $id);
            if ($f->getErrorCode() != NULL) {
                return fjgwpp_formatFlickrAPIError($f->getErrorMsg());
            }
            $photos = $f->galleries_getPhotos($gallery_info['gallery']['id'], $extras, $max_num_photos, $page_num);
            $photos_main_index = 'photos';
        } else {
            if ($action === 'tag') {
                $photos = $f->photos_search(array('user_id' => $user_id, 'tags' => $tags, 'tag_mode' => $tags_mode, 'extras' => $extras, 'per_page' => $max_num_photos, 'page' => $page_num));
                $photos_main_index = 'photos';
            } else {
                if ($action === 'grp') {
                    //Show the photos of a particular group pool
                    //groups_pools_getPhotos ($group_id, $tags = NULL, $user_id = NULL, $jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
                    $photos = $f->groups_pools_getPhotos($id, $tags, NULL, NULL, $extras, $max_num_photos, $page_num);
                    $photos_main_index = 'photos';
                } else {
                    //Show the classic photostream
                    $photos = $f->people_getPublicPhotos($user_id, NULL, $extras, $max_num_photos, $page_num);
                    //Need the authentication (TODO)
                    //$photos = $f->people_getPhotos($user_id,
                    //	array("privacy_filter" => "1", "extras" => "description", "per_page" => $max_num_photos, "page" => $page_num));
                    $photos_main_index = 'photos';
                }
开发者ID:emirpprime,项目名称:flickr-justified-gallery,代码行数:67,代码来源:flickr-justified-gallery.php


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