• After trying several other flickr plugins, I finally found Flickr Gallery. I don’t see why all the others have to be so complex, this is simple and exactly what I was looking for… almost:

    I just want a page that shows my most recent flickr photos, but the [flickr-gallery] shortcode put photo sets and most “interesting” as well. I just added an option to that tag: [flickr-gallery mode=”recent”]

    Here is the code to make it work:

    case 'recent' :
    	if ( !empty($attr['user_id']) ) {
    		?>
    			<div id="photostream">
    				<?php $photos = $phpFlickr->people_getPublicPhotos($attr['user_id'], null, $attr['per_page']); ?>
    				<div class="flickr-photos">
    					<?php foreach ( $photos['photo'] as $photo ) : ?>
    						<div class="flickr-thumb">
    							<a href="<?php echo $url . $photo['id'] ?>"><img title="<?php echo str_replace("\"", "\\\"", $photo['title']) ?>" alt="<?php echo str_replace("\"", "\\\"", $photo['title']) ?>" title="<?php echo str_replace("\"", "\\\"", $photo['title']) ?>" src="<?php echo $phpFlickr->buildPhotoURL($photo, 'square') ?>" /></a>
    						</div>
    					<?php endforeach; ?>
    				</div>
    				<div class="clear"></div>
    			</div>
    		<?php
    	}
    	break;

    It goes in flickr-gallery.php at line 226 in the current version… something like that might be good to include in future versions.

    Edit: You can see the result at http://jk3.us/photos/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jk3us

    (@jk3us)

    Update: I figured out that you *can* get just a list of your most recent photos with method=”search”… you just search for yourself:

    [flickr-gallery mode="search" user_id="NSID"]

    On flickr’s api page for the search method, they say you can use user_id=”me” to get your own photos, but that doesn’t seem to work in this case. You can get your NSID at http://www.flickr.com/services/api/explore/ (in case you’ve set your url to use your username instead)

    Also, perhaps all of the gallery methods should accept a “size” argument in case you don’t really want the squares.

    Thread Starter jk3us

    (@jk3us)

    I’ve got a patch for that, but can’t figure out how to get it on this forum… let me know if you’re interested.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Flickr Gallery] Just Recent images’ is closed to new replies.