Flickr

A photo sharing website you might have heard of.

The Flickrization of Yahoo
Yahoo!, more than Google or Microsoft, seems to understand the value of letting users create and categorize content for them.

A Comments Page for Each Individual del.icio.us Bookmark

Pinder was the only one to publicly call me on it. The idea was to mark as 'favorite' in Flickr photos of good-looking women and photos of myself. Since I'm a heterosexual man, if anyone wants to say it was a subconscious effort to 'surround myself with babes', then I won't argue. Consciously it was two separate endeavours: a) keep track of the photos of women whom I thought were attractive and b) promote photos of myself that are really great, since the photographers in question are really good and they make it easier for me to look at photos of myself, normally very difficult. (I make an effort most times when there's a camera around to stay out of the shot.) But, since they were grouped together, it was, to use Pinder's phrasing, “adventures in creepiness”. Criticism accepted.

The sidebar was an experiment without planning, hypothesis or expected results, and since I didn't end up liking the results, it's gone. In its place, another experiment, in this case, with del.icio.us. The ingredients are:

The end result if my del.icio.us bookmarks on the justagwailo.com domain, complete with comments. On the front page of the site, there should be a comments form and permanent link for each bookmark as well as for each tag. See, for instance, bookmarks I've tagged with 'me', which are external links of either stuff I've written or something about me. For those who are into that kind of thing, there's also my del.icio.us tag cloud: it just has a weighted list of the top tags, not all of them.

I have no idea if anybody's doing what I'm doing, at least with regards to setting up a comments page for each individual del.icio.us bookmark. del.icio.us bookmarks have been on the front page for a few months, just not a lot of people noticed them because they weren't in the RSS feed. Since I can post up to a dozen a day, it would be a little much for most people.

A public group, but you have to request an invitation for membership.

RSS Feeds for Photos With Multiple Tags in Flickr

There is an updated version of my script available!. Thanks Timtom!

In its RSS feeds, Flickr doesn't let you get photos tagged with all tags you tell it in an RSS feed, so I whipped up a script that, if you have your own server, creates RSS feeds of the tags you specify. If you called it 'multitags.php', and you put it on your site, say example.com, the URL would look something like http://www.example.com/multitags.php?tags=vancouver+seawall That would get you an RSS feed (in a format very similar to the format of the RSS feeds that Flickr outputs) of photos that are tagged with both 'vancouver' and 'seawall'.

If you used a comma instead of a plus, it looks for photos tagged with either of the tags, so http://www.example.com/multitags.php?tags=vancouver,seawall would get you photos tagged with 'vancouver' mixed in with the photos tagged with 'seawall'. There is a way to get RSS feeds of tags this way, but why figure that out. How to do it is in a forum somewhere, but I couldn't remember where, so I just coded that into the script.

You'll need two things to use the script: the excellent phpFlickr library (support for uploading coming, nice!) and a Flickr API key, which you can get at http://www.flickr.com/services/api/. You'll need to change the three variables at the top of the script, which follows, accordingly.

A note about the code: the first little bit about the XML declaration making up multiple lines is a workaround for the code dispaly. And yes, there are a lot of print statements. It makes it easier for me to debug.

It's probably best to keep the URL secret, so that the only person hitting the script is you. The RSS feeds work for me in NetNewsWire, but please do submit bug reports in the comments.

$php_flickr_cache = '/lib/phpflickr/cache';
$flickr_api_key = 'your Flickr API key here';
require_once($php_flickr_location . '/phpFlickr.php');
$f = new phpFlickr($flickr_api_key);
if (isset($php_flickr_cache)) {
$f-?>enableCache("fs", $php_flickr_cache);
}
if ($_GET && $_GET['tags']) {
$tags = urlencode($_GET['tags']);
$tag_mode = 'any';
if (strstr($tags, '+')) {
$tags = str_replace('+', ',', $tags);
$tag_mode = 'all';
}
else if (strstr($tags, "%2C")) {
$tags = str_replace('%2C', ',', $tags);
$tag_mode = 'any';
}
}
$photos = $f->photos_search(array('tags' => $tags, 'tag_mode' => $tag_mode, 'per_page' => '15'));
header("Content-type: text/xml");
$rss_feed = " $rss_feed .= "?>\n";
$rss_feed .= "\n";
$rss_feed .= " \n";
$rss_feed .= " Flickr Photos tagged with ";<br /> $rss_feed .= str_replace(",", ' and ', $tags);<br /> $rss_feed .= "\n";
$rss_feed .= " Script by Richard Eriksson http://justagwailo.com/\n";
$requested_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$rss_feed .= "
$requested_url\n";
$rss_feed .= "
\n";
foreach (
$photos['photo'] as $id) {
$u = $f->urls_getUserPhotos($id['owner']);
$rss_feed .= " \n";
$link = $u . $id['id'] . "/";
$rss_feed .= "
$link\n";
$rss_feed .= " $link\n";
$rss_feed .= " ";
$username_elements = explode("/", $u);
$username = $username_elements[4];
$rss_feed .= "<p><a href=\"$u\">$username</a> has posted a photo:</p>\n\n";
$rss_feed .= "<p><a href=\"$link\">";
$rss_feed .= "<img src=\"http://farm";
$rss_feed .= $id['farm'];
$rss_feed .= ".static.flickr.com/";
$rss_feed .= $id['server'];
$rss_feed .= '/';
$rss_feed .= $id['id'];
$rss_feed .= "_";
$rss_feed .= $id['secret'];
$rss_feed .= "_m.jpg";
$rss_feed .= "\" alt=\"". $id['title'] . "\" style=\"border: 1px solid #000000;\"/></a></p>";
$rss_feed .= "
\n";
$rss_feed .= "";<br /> $rss_feed .= $id['title'];<br /> $rss_feed .= "\n";
$rss_feed .= "
\n";
}
$rss_feed .= "
\n";
$rss_feed .= "
";
print $rss_feed;
?>

There is an updated version of my script available!. Thanks Timtom!

In its RSS feeds, Flickr doesn't let you get photos tagged with all tags you tell it in an RSS feed, so I whipped up a script that, if you have your own server, creates RSS feeds of the tags you specify. If you called it 'multitags.php', and you put it on your site, say example.com, the URL would look something like http://www.example.com/multitags.php?tags=vancouver+seawall That would get you an RSS feed (in a format very similar to the format of the RSS feeds that Flickr outputs) of photos that are tagged with both 'vancouver' and 'seawall'.

If you used a comma instead of a plus, it looks for photos tagged with either of the tags, so http://www.example.com/multitags.php?tags=vancouver,seawall would get you photos tagged with 'vancouver' mixed in with the photos tagged with 'seawall'. There is a way to get RSS feeds of tags this way, but why figure that out. How to do it is in a forum somewhere, but I couldn't remember where, so I just coded that into the script.

You'll need two things to use the script: the excellent phpFlickr library (support for uploading coming, nice!) and a Flickr API key, which you can get at http://www.flickr.com/services/api/. You'll need to change the three variables at the top of the script, which follows, accordingly.

Rasmus plays around with the Flickr API and PHP 5
Looks like he essentially rewrote the phpFlickr library.

It Was Worth 15 Bucks To Try It Out

Today I got my Qoop book in the mail. I got a book of 14 of the photos I took on "Red Tuesday" last month, made into a photoset on Flickr, then when I heard about Qoop—which prints in a book or poster your Flickr photos from photosets or tags—thought it was worth 15 bucks to try it out. It's about 10 inches high and about 8 inches, wide, and the printed photo quality is really great, though it helps that I was using Roland's camera. He's had good results with a 13x19 poster he got.

Kris writes about the coding I did over the weekend of a Flickr module for Drupal (it&#039;s only in alpha stage at this writing)
I'm only an intermediate-level PHP programmer, but Flickr's open API and a library that does the XML parsing for me made it a lot easier than it could have been.

Pages