/ Published in: PHP
Expand |
Embed | Plain Text
require_once("phpFlickr/phpFlickr.php"); $username = ""; $apiKey = ""; $apiSecret =""; // Create new phpFlickr object $f = new phpFlickr($apiKey, $apiSecret); $f->enableCache("db","mysql://<dbname>:<dbpass>@mysql.localhost/<dbname>"); //$flickr->enableCache("fs", "/var/www/phpFlickrCache"); // Find the NSID of the username inputted via the form $nsid = $f->people_findByUsername($username); function returnPhotosDetailView($f,$setid) { $photosSetInfo = $f->photosets_getInfo($setid); $heading = "Photos: ".$photosSetInfo['title']; $photos = $f->photosets_getPhotos($setid, NULL, NULL); $i=0; $html .= "<ul id='photos-list' class='clearfix'>\n"; foreach ($photos['photo'] as $photo) { $i++; if ($i % 6 == 0) { $html .="<li class='right'>\n"; } else { $html .="<li>\n"; } $html .= "<a href='".$f->buildPhotoURL($photo, "medium")."' rel='lightbox' class='vtip round shadow' title='© All rights reserved'>"; $html .= "<img alt='$photo[title]' ". "src='".$f->buildPhotoURL($photo, "square")."' id='photo_".$photo['id']."' width='75' height='75' /></a>\n"; $html .="</li>\n"; } $html .="</ul>"; return $html; echo $html; } $action = "detailview"; $setid = ""; $img_out = returnPhotosDetailView($f,$setid); $smarty->assign("img_out",$img_out);
You need to login to post a comment.
