Today, I’m working on a Flickr search engine for FireFox. Why hasn’t someone done that already? Well, for one, Flickr isn’t really set up for external searches.
Today, I’m working on a Flickr search engine for FireFox. I was really surprised that no one had thought to create one yet, give Flickr’s huge popularity. Okay, maybe I’m more of a fan that your average Joe (or Jane), but it does seem to be pretty hip with the kids. Anyway, these little search plug-ins are really pretty easy to write and they are extremely handy.
That being said, when you look at the code from a search from Google, you’ll notice little remark tags before and after each search result item:
<!--m--><a href=https://www.jasoncoleman.net/>super_structure | <b>Jason</b> <b>Coleman</b></a><br><font size=-1><b>...</b> And The Coal Men — singer Dave <b>Coleman</b> and cohorts Dave Ray and <b>Jason</b> Hitchcock [yada, yada, yada]<!--n-->
As you can imagine, those little remarks containing m & n make for very nice search strings. The set of search results for each page returned are also bound in similar remarks, with a & z (get it? From “a” to “z”.). Yeah, anyway, most of your other sites don’t contain such luxuries (like, say, Yahoo). Flickr, sadly, has even less. The results from a tag search at Flickr, such as “cameraphone” don’t contain any deliminators to speak of. Of course, the idea here is that you just use part of the mark-up as a text string in your search for where an item begins and ends, but that doesn’t work so well. Of course, the natural markup would be <li> & </li> (Flickr uses <p>, which is the same for this argument), but alas, that’s no good when you add a class, id, or style which contain ” ‘s (quotation marks). The problem is that those ” ‘s truncate your text string prematurely. (Also, Firefox doesn’t seem to understand using " in this context).
All this being said, I’ve submitted my little code to the Mycroft people at Mozilla, so maybe it’ll be up there soon. You can download the file right now from me, and just stick it in the \Mozilla Firefox\searchplugins\ directory and restart Firefox. You won’t have an icon just yet for Flickr. They like those to be downloaded from their site, as opposed to just any old place.
I think that Google’s use of the remark tags as deliminators is a pretty nice little feature that 99.9% of users never know about, but can benefit from because of features like the toolbar search in Firefox. If you happen to have installed the sidebar search, and have my Flickr search, then doing a search on a term in both Flickr & Google simultaneously will show you the benefit. Google returns results just like the Google page. My Flickr plug-in only returns the thumbnail (non-hyperlinked) and the creator (also, non-hyperlinked). I had found a way to include the title of the photo, but then the link for the result went to the creator’s “photostream” and not the individual photo. Is there a way around all this? I’m sure, but I’m not a good enough code writer to do it. Plus, I doubt most people even know about the sidebar search, let alone use it.
Up next, a search plug-in for Wired News!