" /> Yuan.CC Web Experiments: June 2005 Archives

Main | July 2005 »

June 28, 2005

GM script: Google Maps in Flickr (v1.0)

Tags: GMiF , Greasemonkey

Google Maps in Flickr

There's an easy way to see your geotagged photos on Gmap without leaving flickr. Just install the greasemonkey script to your firefox and see your photos shown on map right away. There will be a button added at the right-most of button bar if the photo is geotagged. Click the button to open and close the map.

Download: flickr.gmap.user.js

Sorry, there's still some errors shown in Javascript console of firefox. I'll figure out what happened.

June 24, 2005

GM script: del.icio.us Flickr Contacts (v1.3 + GM 0.5.1)

Tags: Flickr Hacks , Greasemonkey

Some of us have so many contacts in flickr, say 50+, 100+, even 200+. However it is kinda hard to find our contacts efficiently. So I wrote a Greasemonkey user script to add tags at our flickr contacts to del.icio.us bookmarks system. The use of adding tags and searching contacts is very easy. All have been integrated to flickr pages. You can see the group photo spool for screenshots.

Please note it will prompt to ask you to login to del.icio.us system. It is completely safe to login. The request comes from del.icio.us directly, not from my script. Additionally, the script will implicitly add a tag named "flickr:contacts" to your contacts. Please don't remove it from del.icio.us. It is for the script to identify the contacts from your flickr.

Download flickr.contact.user.js, and start to tag your contacts.

del.icio.us Contacts - Search Results

June 18, 2005

GM script: Toggle Recent Comments in Flickr Photostream

Tags: Greasemonkey

The work was first done by setre (http://flickr.com/photos/setre/) and announceed at Flickr Hacks group. It can show your recent photo comments without going to an inner page. I made an improvement to toggle the comments on and off.

The screenshot has been posted to the photo pool. You can download the improved script here: flickr.comments.toggle.user.js.

June 17, 2005

LfVr: recent comments added

Tags: LfVr

I am inspired by the topic of Recent comments in photostream in Flickr Hack group. The smart GM user script takes flickr RSS feeds to get the recent comments on one's photos. Although flickr API doesn't have anything about comments, we can get it from RSS feeds.

So I add a feature to LfVr to get recent comments of a user. You can see a new box called "Comments" on the left side. But the feed gives only the latest 10 comments.

FYI, the feed URL is "http://www.flickr.com/recent_comments_feed.gne?id=your_nsid&format=rss_200"

IDEA: many special photostreams

Tags: LfVr

This idea has been in my mind for a while. Now LfVr has some traditional photostreams such as recent photos, favorites, contact's photos, everyone's photos, group pool photos, tag search photos, and photo sets.

I'll add some special photostreams. e.g. geotagged photos of a user, photos that other users were viewing...

LfVr Tips

Tags: LfVr

The reason I wrote LfVr is to browser and enjoy so many wonderful photos in the world "FAST". So the response time is my first priority. LfVr uses text ony, no image banners, logo, or image buttons.

When you are surfing these photos, LfVr won't retrieve unnecessary data from flickr server. If you don't mind not to see the photo details, you can close the "photo information" so LfVr will not call API to get photo info.

I encourage to install Greasemonkey user script, so you can jump to LfVr from flickr anytime.

Use photo sets as far as possible. Prevent to use tag search or click on tag directly. The response of Flickr tag search is very slow.

There are many ways to jump to other's photostream. You can find new users by search, favorites, contacts, or at least everyone's photo. All photostreams you visit will be cached by LfVr, but will be clean when you switch to a new user.

I hope LfVr can satisfy all of you.

June 16, 2005

LfVr: v1.6 is released

Tags: LfVr

FlickrJS has released version 0.6, which support multiple calls simultaneously. Thus the web app can operate faster than before.

The release is mainly internal structure changes. No new feature is added, but some minor bugs were fixed. User won't see anything new but a better performance.

BTW, the GMap feature is broken now. Because Google uses a new gmap js library. I'll try to fixed it later.

GMap feature is fixed now. Solution is here. stuff.rancidbacon.com/google-maps-embed-how-to/demo2.html

June 13, 2005

Inside the LfVr - cache improvement

Tags: LfVr

With the cache mechanism built in the flickr API proxy, users can benefit from it when surfing photos in flickr. However, the default cache expiration is not suitable for each flickr API call.
For example,
-- "flickr.people.findByUsername" can lookup a user's nsid, but the nsid of a user will almost never be changed. So the result of this API should never be expired.
-- "flickr.photos.getRecent" is to get the recent photos of everyone, I set its expiration as 1 hour.
-- "flickr.people.getInfo" is to get info of a user, I give it a longer expiration, 5 days.


Following is a piece of code in "flickr.proxy.php".

$hour = 60*60;
$cache_expire = 3*24*$hour;

// Never expired API methods
if( eregi('flickr.people.findByUsername', $restURL) ||
eregi('flickr.people.findByEmail', $restURL) ||
eregi('flickr.urls.lookupUser', $restURL) ||
eregi('flickr.urls.lookupGroup', $restURL) ||
eregi('flickr.people.getInfo', $restURL) ) $never_expire = 1;
else $never_expire = 0;

// Setting different expiration for each API method
if( eregi('flickr.people.getInfo', $restURL) ) $cache_expire = 5*24*$hour;
if( eregi('flickr.people.getPublicPhotos', $restURL) ) $cache_expire = 6*$hour;
if( eregi('flickr.groups.pools.getPhotos', $restURL) ) $cache_expire = 3*$hour;
if( eregi('flickr.photos.getContactsPublicPhotos', $restURL) ) $cache_expire = 1*$hour;
if( eregi('flickr.photos.getInfo', $restURL) ) $cache_expire = 5*24*$hour;
if( eregi('flickr.photos.getRecent', $restURL) ) $cache_expire = 1*$hour;
if( eregi('flickr.favorites.getPublicList', $restURL) ) $cache_expire = 1*24*$hour;
if( eregi('flickr.tags.getListUserPopular', $restURL) ) $cache_expire = 5*24*$hour;
if( eregi('flickr.photos.search', $restURL) ) $cache_expire = 24*$hour;
if( eregi('flickr.people.getInfo', $restURL) ) $cache_expire = 7*24*$hour;

June 11, 2005

LfVr: Permanent URL & GM script for Flickr

Tags: Greasemonkey , LfVr

LfVr now supports the path in URL as parameters like flickr. For example, if the flickr URL is

http://www.flickr.com/photos/ckyuan/

The corresponding URL to LfVr is

http://webdev.yuan.cc/lfvr/photos/ckyuan/

So you can have a permament URL of your own flickr photos at LfVr. Additionally, I wrote a Greasemonkey user script for Flickr to switch current flickr page to LfVr.

You can get the script here lfvr.user.js. After installation, you will see there is a link "Lite Viewer" appearing beside link "Invite" at the top of the flickr page.

June 08, 2005

LfVr: google maps integrated

Tags: Google Maps , LfVr

New feature added.

If the photo is geotagged, the LfVr can display Google Map according to the lat/lon information of the photo.

If you don't know anything about "geotagged", visit Geobloggers to see what it is.

Two screenshots are already posted to the group photo pool.

June 07, 2005

LfVr: Preferences added

Tags: LfVr

I've added a Preferences page to save user's browsing preferences. Current options are:

1. Cache enable or not.
2. Startup page.
3. Default photo size for browsing.

See the group photo spool for a screenshot.

In preferences, a Google Maps option is added now: display the single photo location or photos taken nearby.

June 06, 2005

IDEA: LfVr + Greasemonkey

Tags: Greasemonkey , LfVr

I am thinking how to integrate LfVr and Flickr official site. Currently each page of LfVr will generate a corresponding link to flickr.
I plan to write a Greasemonkey user script to switch between LfVr and flickr back and forth. But first of all, LfVr has to take outside parameters from URL.

June 05, 2005

No tag search support now

Tags: Flickr Album Maker , Flickr General

Flickr API has been disabled the search capability. The API method flickr.photos.search can't work. This will have affect tag search. If you encounter the error message "Sorry, the Flickr search API is not currently available" , please ignore it and try to browse photos by other way.

TODO list

Tags: LfVr

1. Link directly to a user's photos at the Lightweight Flickr Viewer by going to a url like flickr.yuan.cc/lfvr/chicagosage or flickr.yuan.cc/lfvr/user/chicagosage (ChicagoSage)
2. Display the photos in chronological order or reverse-chronological (GustavoG)
3. Background color preferences (Spigoo)
4. Browse with larger sizes (Spigoo)
5. Add a user preferences page. Current potential options are cache enable/disable, background color, loading everyone photos at starup, default borwse size of photos (me)
6. Album maker featuer. (for replacing old flickr album maker)

June 04, 2005

Announce

Tags:

I've released three flickr tools so far.

They are:

1. Flickr Album Maker
2. Flickr Badges
3. LfVr - a Lightweight flickr Viewer

Let me know if you have any comments or suggestions. Definitely bug report is a must.

Pleaes visit http://webdev.yuan.cc to try them.

Google Ads

Powered by
Movable Type 3.2