14
September
2006

Flash Flickr Badge Widget for WordPress

10 Votes | Average: 3.9 out of 510 Votes | Average: 3.9 out of 510 Votes | Average: 3.9 out of 510 Votes | Average: 3.9 out of 510 Votes | Average: 3.9 out of 5 (10 votes, average: 3.9 out of 5)
Loading ... Loading ...

I love the Flickr Flash Badges, but the content of the iframe that you have to put on your page is not valid XHTML. That just won’t do. So I decided to take matters into my own hands…

While I was investigating the parameters that Flickr’s flash file takes, and figured out how to change the numbers of rows and columns, as well as the size of the images in the badge.

With a little PHP tinkering, a plug-in was born!

flickr-badge-widget.tar.gz

Features

  • Simple widget interface
  • Easily set up to use whatever Flickr account you wish
  • Easily change the size of the thumbnails
  • Easily define the number of rows and columns
  • Easily limit your pictures by Flickr tags
  • Choose between two transitions:
    • Big Then Small
    • Fade

Requirements

Installation

  1. Download the plugin here: flickr-badge-widget.tar.gz (16 kB)
  2. Unzip the plugin into your /wp-content/plugins directory.
  3. Activate the plugin in your WordPress admin.
  4. Enter your Flickr account details into the widget settings on the Sidebar Widgets page in your WordPress admin (see screenshot).
  5. Drag the widget onto the sidebar where you want it on the Sidebar Widgets page in your WordPress admin.

Screenshots

Widget Settings Screenshot

The plugin can be seen in action on the sidebar on the left side of this page.

How can I find my @N00 Flickr ID?

One easy way is to use Big Huge Lab’s Flickr DNA page. Simply enter your username into the box and hit ‘Apply’.

Why was this hard?

Flickr has a magic variable called “magisterLudi” (which seems to be a literary reference) that changes every 24 hours. When you use their default method with the iframe, the content of the iframe contains the current value of the magisterLudi. This prevents you from just pasting the <object> tag to run the flash file on their server and bypassing their iframe. (It will work, but not for more than 24 hours.)

To solve this problem, this plugin goes to fetch the contents of the iframe from Flickr, parses it to get the current magisterLudi value, and uses that to display the flash object directly on your page, thereby avoiding the iframe and bypassing their mechanism intended to force use of their iframe.

A caching mechanism is in place to reduce these server-side calls to Flickr. By default, it will only update the magisterLudi value from Flickr every two minutes. Therefore, for two minutes (after Flickr changes the value) every day the plugin will fail. You may change this value in flickr-badge-widget.php if you wish.

Questions and Comments

You may leave questions and comments on this blog, or email them directly to me at erikwordpressplugins -at- gmail.

31 Comments

  1. 插件 » Blog Archive » Flash Flickr Badge Widget UNITED STATES:

    [...] 插件页面: 点击进入 [...]

  2. Wordpress QuickStart GuyNo Gravatar SINGAPORE:

    Indeed an interesting plugin I would love to try it. Thanks for providing this plugin.

    Cheers!

  3. LoveginNo Gravatar INDIA:

    Great plugin it seems. But, I find some issues like I dont find any ways to administer it through the admin console. Seems some bug in it.

  4. erikNo Gravatar SPAIN:

    Lovegin, it is administered from the “Presentation > Widgets” page in the admin. You have to click on the little icon next to the widget once you’ve added it to your sidebar (just like all other widgets).

    Hope that helps. I’m fond of gin too. :-)

  5. Web Hosting ReviewsNo Gravatar UNITED STATES:

    awesome

  6. MikeNo Gravatar THAILAND:

    Excellent plugin! I’d really like to be able to use it so that it inside the main posting with text wrapping around it. Do you know if there is any way to achieve this?

    Keep up the good work

  7. PGNo Gravatar UNITED STATES:

    Congrats on the wedding!

    I was wondering if there is anyway to modify the widget so it will pull from random pics, not just the most recent.

    No hurry on an answer, even if it’s a simple “no”. I know the whole post wedding rigmarole. It takes a while to get back in the swing!

  8. aprilia gayatriNo Gravatar INDONESIA:

    Hello erick…
    thank you so much for this badge…

  9. RobNo Gravatar UNITED STATES:

    Hi Erick,

    I just came across your Flickr plugin and first wanted to say thanks for writing it and giving it away!

    I have it installed but my photos are showing up at all in the sidebar widget. I see the title of the widget, but no photos. In Firefox, I am getting this error “FlickrBadge is not defined”, even though I have defined my FlickrID.

    Any suggestions or ideas why I’m not able to get it working properly?

    Thanks.

  10. Erik R.No Gravatar SPAIN:

    I’ve never seen that error, Rob. I just re-enabled it on my blog to make sure it still works, and it does.

    “flickrBadge” (with lowercase f) is the id of the <object> tag that is output into the page. Make sure that tag is in your source.

  11. PepeNo Gravatar SPAIN:

    Very nice plugin, but how can I call it directly from a page in Wordpress. I have an Initial page in the web and I would like to call it from there instead of putting it on the sidebar.
    Thanks in advance.

  12. Erik R.No Gravatar SPAIN:

    Pepe, at the moment that functionality is not provided. You’d have to hack that together yourself.

  13. Mitch ArgonNo Gravatar UNITED STATES:

    I have been looking for a solution like this that i can place on any page (not restricted to WordPress). Does anyone know if something like this exists? Help Please!
    Thank you.

  14. Chiang MaiNo Gravatar THAILAND:

    Yes, You Can

  15. AlvaroNo Gravatar SPAIN:

    Hola! estupendo trabajo con el widget, acabo de probarlo con un blog que me han encargado y funciona estupendamente.

    un saludete desde Asturias vecino!

  16. Erik R.No Gravatar SPAIN:

    Me alegro, Alvaro. Gracias!

  17. Jeff HesterNo Gravatar UNITED STATES:

    Erik, this plug-in looks GREAT in concept, but after I activate it (I’m using WordPress 2.3.2) my plug-in page in the admin console only displays a blank page. Will this work in 2.3.2? If so, maybe there is a conflict with the theme I’m using (Glossy Blue: http://www.ndesign-studio.com/resources/wp-themes/glossyblue/).

  18. Erik R.No Gravatar SPAIN:

    Jeff, I’m using the latest 2.4-bleeding (see bottom right of this page) version of WordPress and the plugin works great (as it did when I was using 2.3.x. As I understand it, your theme should have nothing to do with the plugin page in the admin. Other plugins work fine?

  19. Harriman HikersNo Gravatar UNITED STATES:

    Running WP2.3.1 and K2 Theme when I try to activate the plugin I get a fatal error:

    Fatal error: Cannot redeclare class snoopy in /home/user/public_html/test/wp-includes/class-snoopy.php on line 40

    ???
    thx
    R. Richard Hobbs

  20. Erik R.No Gravatar SPAIN:

    Richard, You must have some other plugin that’s using the “snoopy” code and they are conflicting. Try removing (or commenting) the line in flickr-badge-widget.php that contains the word “snoopy”.

  21. AngelNo Gravatar UNITED STATES:

    Love it! Thanks so much got sharing it.

  22. ShobbaNo Gravatar GERMANY:

    I just want to pick up PGs question:
    I was wondering if there is anyway to modify the widget so it will pull from random pics, not just the most recent.

  23. Erik R.No Gravatar UNITED STATES:

    Shobba: Not that I know of. That’s just the default behavior of the flash badge from Flickr. The fact that it’s only the most recent pictures annoys me as well. If you find a way, please post it here, and I will try to incorporate it into the widget.

  24. Fernando AndradeNo Gravatar SPAIN:

    Only to say thanks for your work. The widget rule.

  25. PaulNo Gravatar NETHERLANDS:

    Hi,

    It seems that this plugin does not work in combination with WP-dTree 3.3.1. A shame really, because i really like this plugin …

  26. PaulNo Gravatar NETHERLANDS:

    After some tweaking around it works perfectly, with WP-dtree, in widget options… Transition: big then small. That did the trick.

    Btw > another flikr: http://www.lukeh.com/ seems to have figured out the random issue. You can select a random option in the way the images are shown.

  27. Erik R.No Gravatar SPAIN:

    Btw > another flikr: http://www.lukeh.com/ seems to have figured out the random issue. You can select a random option in the way the images are shown.

    From what I can tell, that “anotherFlickr” plugin is using a different Flickr API. My plugin is limited to the parameters Flickr allows for the flash badge.

    Thanks for reporting back, Paul.

  28. crissNo Gravatar UNITED STATES:

    Nice, but I can’t get it to pull photos based on tags. I get photos not found message

  29. AmyNo Gravatar UNITED STATES:

    Hi Erik, did you also develop the widget for Wordpress.com? It’s great to have such a widget but was not able to get the images to load on my wordpress.com site (although the alt text is coming through). Turns out Flickr is using Atom feeds, not RSS. Any chance of getting the widget to support Atom, too? (Better yet, both)

  30. Erik R.No Gravatar SPAIN:

    Amy, I have not investigated what would need to happen to get my plugin accepted for wordpress.com blogs.

    This plugin does not use Flickr feeds directly. All it does is load Flickr’s official flash badge, and then the flash application goes to fetch the photos. So there’s nothing to change from RSS to Atom.

  31. AmyNo Gravatar UNITED STATES:

    Ok, thanks for the clarification. Looks like someone else developed that Flickr widget…sucks.

Want to change the avatar that shows up next to your comment? Sign up with gravatar.com and upload a new avatar. Make sure you use the same email address you leave comments with.

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

 
©Copyright 2007 - All rights reserved.