[Plugin: Flickr Gallery] Just Recent images
-
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 https://jk3.us/photos/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Flickr Gallery] Just Recent images’ is closed to new replies.