//
// First download the phpflickr source code from http://phpflickr.com/
// and copy the folder phpFlickr-2.2.0 into your smf source folder
//
// You need to assign the following variables...
// $api_key - This is the API key given to you by flickr.com.
// Replace [API Key] with you API key.
// You can get an API Key at: http://www.flickr.com/services/api/key.gne
// e.g. $api_key = "z28afz1861e2byb888325695c7fx4df6";
$api_key = "df5148b364953e6376b1fae84f4e0adc";
// replace [Flickr ID] with your Flickr User ID
// e.g. $UserID = "Fred 08";
$UserID = "kris.secor";
// The number of images to display
$NumberOfPhotos=5;
require_once("phpFlickr.php");
// Create new phpFlickr object
$f = new phpFlickr($api_key);
if (!empty($UserID)) {
// Find the NSID of the username
$person = $f->people_findByUsername($UserID);
// Get the friendly URL of the user's photos
$photos_url = $f->urls_getUserPhotos($person['id']);
// Get the user's first $NumberOfPhotos public photos
$photos = $f->people_getPublicPhotos($person['id'], NULL, $NumberOfPhotos);
// Loop through the photos and output the html
$i = 0;
shuffle($photos['photo']);
foreach ((array)$photos['photo'] as $photo) {
echo "";
echo "
buildPhotoURL($photo, "Square") . ">";
echo "";
$i++;
// If it reaches the 8th photo, insert a line break
if ($i % 8 == 0) {
echo "
\n";
}
}
}
?>