A Wired.com user account lets you create, edit and comment on Webmonkey articles. You will also be able to contribute to the Wired How-To Wiki and comment on news stories at Wired.com.
It's fast and free.
processing...Retrieve Sign In
Please enter your e-mail address or username below. Your username and password will be sent to the e-mail address you provided us.
processing...Welcome to Webmonkey
- edit articles
- add to the code library
- design and write a tutorial
- comment on any Webmonkey article
Sign In Information Sent
Build a thumbnail page using delicious and flickr
/skill level/
/viewed/
Contents |
Introduction
An example on how to use the power of flickr and del.icio.us (and some funky javascript) to build an easily configurable thumbnail page on your website.
The idea is to tag a picture of flickr on del.icio.us and show it magicallyon your web page.
What you'll need
You will need an account on http://flickr.com and one on http://del.icio.us.com (both free!)
Steps
Just visualize some image on flickr, go to the size you want to see in your page and tag it on del.icio.us with a "special tag": I use in the sample: WFTM+pictures .
Use this code to retrieve the items:
<script type="text/javascript" src="http://del.icio.us/feeds/json/maborg/WFTM+pictures?count=20"></script>
then add this element to your page:
<div class="container"> <span id="pictures-display"></span> </div> </code>
And then this code (to be called at the onload):
<script type="text/javascript">
function myload(){
var ct = document.getElementById('pictures-display');
for (var index in Delicious.posts) {
var k=Delicious.posts[index];
var span = document.createElement('span');
var a = document.createElement('a');
var img = document.createElement('img');
img.setAttribute('src', k.u);
img.setAttribute('title', k.d);
img.setAttribute('alt', k.d);
a.setAttribute('href', bigPictureUrl(k.u) );
a.appendChild(img);
span.appendChild(a);
span.appendChild(document.createTextNode(" "));
ct.appendChild(span);
}
}
function bigPictureUrl(url){
var parts = url.split("/",5);
var splits = parts[4].split("_");
return "http://www.flickr.com/photo_zoom.gne?id=" + splits[0] + "&size=l";
}
</script>
That's all!
suggestion welcome: marco.borgna@weshowthemoney.com
You can see an example here: http://weshowthemoney.com/pictures.html
USE THE CLOUD!
Alternate methods
Suggested readings
- This page was last modified 08:09, 20 May 2008.
/related_articles/
Special Offer For Webmonkey Users
WIRED magazine:
The first word on how technology is changing our world.