✓ I'm available for hire! Check out my open source work on Github or drop me an email

Douglas F Shearer

Posts Tagged with flickr

There are 4 matching posts.

Flic.kr - Flickr Short URLs Explained

Flic.kr links recently began appearing on Twitter and around the web, so I did a little bit of digging. Twitter has brought about a wild storm of URl shortening services, and some issues surrounding them. James Duncan Davidson has a good summing up of these, and some of the solutions.

One of these solutions is to use a link tag on a page to give an alternative short URL. Flickr has started to support this, as so…

On a photo page, say http://www.flickr.com/photos/douglasfshearer/3447346323/, we find in the source:

<link rev="canonical" type="text/html" href="http://flic.kr/p/6fCxXz" >

Twitter clients can now take a pasted Flickr link, and go look up this short url on the Flickr page, without making use of a third party service such as tr.im. Good stuff.

This also works for user accounts, as an example, mine would be http://flic.kr/douglasfshearer.

Tools

The short photo URL is the photo ID converted to Base58, so you need to turn one into the other.

The item that really brought this to my attention was Fraser Speirs Base58Encode Objective-C class, ideal for those of you making Twitter clients.

I’ve released a RubyGem for this, Base58, and a CLI script that takes a flickr URL and gives you the short version.

 
 

September 5th 2007

Add your comment

2007 EUCC Site

Followers of this blog will know that I’m a devoted (I go to the pub EVERY week) Alumni member of the Edinburgh University Cycling Club. At the last AGM I took on the role of webmaster. And did nothing. Until yesterday!

The Brief

  • A simple design that gets information across in a clear manner.
  • A gallery to show people rides and social events.
  • Easy maintenance.

Preparation

The reason it took me so long to get round to building a site, was that Edinburgh University Computing Services weren’t willing to give me a MySQL database, so that ruled out Wordpress.

What’s up so far?

Yesterday I made a simple un-styled page to display all the information regarding upcoming events (especially Freshers Week) and regular rides.

I then styled this with a very basic style, which quickly grew into something a little more advanced. It even has my favourite style of navigation and orientation; tabs!

At the moment there is no login for updating content, mostly due to the lack of a database. I hope to solve this by building a Rails REST app running on my own servers, queried by PHP when edits are in progress.

The Gallery

Once I had the basic style done, the next thing people were asking for was a gallery. Instead of uploading images to the University servers, I decided to make use of Flickr and their APIs to power the gallery.

The advantages of this are obvious:

  • Many of our members already have a Flickr account with lots of club photos in.
  • Flickr already has a mature and advanced photo administration interface.
  • Everyone can add photos!

So a Flickr Group and a quick bit of PHP to query the API had it up and running!

A bit more PHP added paginations and a few other niceties. This was the first time I had done any PHP in a few months, but despite this, the only real issue I had was remembering to put semi-colons at the end of every line.

Obviously, this was a good time for Flickr to have an rare outage. Nothing to do with me.

So there you go, head over and check it out.

 
 

Flickr Is Broken

:"http://flickr.com/photos/douglasfshearer/396233179/

On Saturday I started to notice some strange things happening on Flickr. Photos were appearing that weren’t mine, such as the thumbnail (which isn’t even the thumnail size) and the square image above, supposedly smaller versions of my Carron Valley image, being some sort of glass building, and a random woman respectively.

I thought this was rather strange, and thought it might be some kind of caching error, rather than a DB or system error. It wouldn’t make sense for the photos to have been switched during processing and storage, or the DB corrupted. Cache corruption on the other hand is very possible.

Turns out I was right, yesterday Flickr published an explanation on their blog.

Now if only they would switch to Rails, I would gladly help them out with any problems.

This is the second article in what is becoming a series of Web 2.0 Gone Wrong.

 
 

Flickr and I

Happy new year to you all, did you enjoy all the wind and the rain?

Sandy had an interesting piece about his experiences with Flickr, and the few niggles he has encountered along the way. I just bought a Pro account, which allows you benefits such as unlimited upload bandwidth, no cap on the total number of photos or their resolutions. I decided to go for this since this site is rather dependent on Flickr for all the images I include in posts.

By using the Flickr API (with the wonderful flickr.rb) I can access all of my photos from within my gallery, allowing me to show my latest additions off to those visiting my blog. I plan to add a pane to my blog editor allowing me to search for and insert images without any tedious copy and paste, but with my current workload, and my wish to move my site to Rails 1.2 and it’s RESTful methods, it’s not going to be implemented till at least the end of the month.

So back to flickr, and those niggles. First up, Sandy would like to see Flickr allow your photos to be shown in the order they were taken, rather than that in which they were uploaded. While not explicitly supported (Discussion about possible implementation) you can get see your photos on a calendar from your “archive”: page. Almost there, but like Sandy, I’d like an option to globally show my photos in the order they were taken.

The second niggle was that of Flickr clevery inserting the keywords ‘Photo Sharing" into their generated link on each photo’s page:


<a href="http://www.flickr.com/photos/douglasfshearer/337366577/" title="@ *Photo Sharing* @"><img src="http://farm1.static.flickr.com/163/337366577_9ee4e721a9_o.jpg" width="1280" height="800" alt="Badger Badger Badger Wallpaper" /></a>

Certainly explains their high Google ranking for those keywords! Since I prefer to use Textile formatting, I manually make up my links without all the extra keywording:


!http://farm1.static.flickr.com/163/337366577_9ee4e721a9_m.jpg!:http://flickr.com/photos/douglasfshearer/337366577/

Which gives:


<a href="http://flickr.com/photos/douglasfshearer/337366577/"><img src="http://farm1.static.flickr.com/163/337366577_9ee4e721a9_m.jpg&#8221; title=&#8221;&#8221; alt=&#8221;&#8221; /></a>

Sorted! If you’re willing to put the effort in.

Last, but certainly not least, is the matter of the cost of a Flickr Pro account. At $25 (£12.50 currently) for a year, it’s not really going to break the bank. However, when you consider the cost of storage and bandwidth for each individual user, I would very much doubt that you get the best value in terms of these costs. I do however think that the other features of Flickr make it very worthwhile, so I’m happy to pay for it at the moment.

Still not happy? Try out Smugmug (Very customisable!) or Zooomr (Very clever uploader, and higher upload limits on a free account than Flickr). It’s an open market, I’m certainly not scared to jump ship if I feel the features are right.

I do like Flickr, and so does the badger.