Code SnippetsRetrieve Recent PhotosRetrieve recent photos. Could be used as a photo stream or just display your most recent photos uploaded. Default parameters are shown in the getRecentPhotos() function call. <?php
require_once(dirname(__FILE__).'/../../plugins/tantan-flickr/flickr/class-public.php');
$TanTanFlickrPlugin =& new TanTanFlickrPlugin();
$photos = $TanTanFlickrPlugin->getRecentPhotos($tags='', $offsetpage=0, $max=15, $everyone=false);
?> Get recent photos and randomly display someThis code block retrieves your 40 most recent photos, randomizes the order, and then displays 20 photos. Note that each photo links to "/photos/", and will probably have to be updated to reflect your own settings. <?php
require_once(dirname(__FILE__).'/../../plugins/tantan-flickr/flickr/class-public.php');
$TanTanFlickrPlugin =& new TanTanFlickrPlugin();
$photos = $TanTanFlickrPlugin->getRecentPhotos('', 0, 40);
shuffle($photos);
?>
<?php foreach (array_slice($photos, 0, 20) as $photo):?>
<a href="/photos/photo/<?php echo $photo['id'];?>/<?php echo $photo['pagename'];?>"
class="photo"><img src="<?php echo $photo['sizes']['Square']['source'];?>"
width="<?php echo $photo['sizes']['Square']['width'];?>" height="<?php echo $photo['sizes']['Square']['height'];?>" /></a>
<?php endforeach;?>Test if you're in a Flickr gallery pageUse this snippet to see if your inside a Flickr gallery page from within another WordPress template. global $TanTanFlickrPlugin;
if (is_object($TanTanFlickrPlugin)) {
// ... do stuff ...
}
|
Automatic width and height "detection" and
Does anyone know how to limit "getRecentPhotos" to a single set or collection? At the moment, it pulls in photos from your main stream, but I want to limit the scope.
any ideas?
I also want to get just a single set.
In albums, how would I utilize the words "Next" and "Previous" next to "View Slideshow" so the user could get the next or previous photos? It would be at the top navigation menu on albums. Any Ideas?
How do I use the popup lightbox? I added the code to wp-config but nothing has changed.
I also would like to be able to chose a set or collection for the sidebar display.
p><a href="http://www.pumaword.com/">puma shoes </a> </p> <p><a href="http://www.pumaword.com/womens-puma-future-cat-low-c-514.html">Women's Puma Future Cat Low </a> </p> <p> <a href="http://www.pumaword.com/womens-puma-engine-cat-low-c-503.html">Women's Puma ENGINE Cat Low </a> </p> <p> <a href="http://www.pumaword.com/mens-puma-trionfo-lo-l-ii-c-521.html">Men's Puma TRIONFO LO L II </a> <br> </
Is a way to refresh all albums using cron?? I would like to refreh them at night without using the menu :)