MooFlickrBadge

  • 13 April

The latest MooTools-more RC version introduced this little cool thing called JSONP. Figured I'll give it a swing and create something that's actually using it – a flickr badge.

Possible options

new in 1.3

  • [new] toImage: returns the large image instead of a link to flickr.
  • [new] onComplete: fires an event when all images are loaded, passing an array of links as reference.

1.2

  • apikey: your API key if you have one, otherwise just use the one provided.
  • size: the size of displayed photos. Possible values are “s”, “m”, “l”.
  • method: the method you want to use, defaults to flickr.photos.getRecent. You can use any public method, such as flickr.photos.search and set the post data using passData.
  • amount: the number of photos to fetch and display.
  • passData: post data you want to pass with the request when using flickr.photos.search method.
  • onProgress: fires an event every time a photo is loaded and passes the image element reference.

new MooFlickrBadge('badge', {
	amount: 18
});
<div id="badge"></div>

6 responses so far. Care to add one yourself?

  1. Dominic Jones September 18th, 2009 at 11:03

    • Hi, this doesn’t seem to be working in Internet Explorer (6 or 7) - An error is thrown “MooFlickrBadge is undefined”

  2. Oskar Krawczyk September 21st, 2009 at 12:16

    • Update to MooTools 1.2.3.

  3. Dominic Jones September 23rd, 2009 at 10:56

    • have done that - doesn’t fix it - your demo page itself doesn’t work mate - sorry!

  4. Dominic Jones September 24th, 2009 at 10:35

    • Well, I fixed it.

  5. Winfried February 19th, 2010 at 20:14

    • I get the same “MooFlickrBadge is undefined” error in IE. Hm… Dominic, could you please tell us how you fixed it? Thanks a lot.

  6. Winfried February 19th, 2010 at 23:54

    • Ok, I fixed it as well. The error is at the line 28. You have to delete the comma!

Leave a Reply

Fill-in all the forms

Categories