Tuesday, August 18, 2009 at 7:34 PM.
photoFanSuite.addContactFeeds
on addContactFeeds () { <<Changes <<11/29/07; 9:10:04 AM by DW <<Call photoFanSuite.addFeed to add the feed. <<11/28/07; 1:09:20 PM by DW <<Have to add a semaphore, so that: <<1. We don't get two instances of this running concurrently (the second should just return). <<2. We don't try to display the feeds page while this is running. <<The semaphore is system.temp.photofan.flAddContactFeedsRunningNow. <<11/27/07; 2:13:28 PM by DW <<Created. Add the feeds of the user's contacts that we are not subscribed to, make them all disabled. if defined (system.temp.photofan.flAddContactFeedsRunningNow) { return}; system.temp.photofan.flAddContactFeedsRunningNow = true; local (contacts, adr); Flickr.contacts.getPublicList (user.photoFan.prefs.flickr.id, @contacts); <<scratchpad.contacts = contacts for adrcontact in @contacts { local (url = Flickr.people.getUsersFeed ("", adrcontact^.id)); photoFanSuite.addFeed (url, enabled:false, flickrUserId:adrcontact^.id, flContact:true)}; <<local (adrfeed = @user.photoFan.feeds.[url]) <<if not defined (adrfeed^) <<new (tabletype, adrfeed) <<adrfeed^.flContact = true <<adrfeed^.enabled = false //key point, we're not sub'd-to until user chooses to sub <<adrfeed^.flickrUserId = adrcontact^.id <<photoFanSuite.getFeedInfo (adrfeed) delete (@system.temp.photofan.flAddContactFeedsRunningNow)}; bundle { //test code addContactFeeds ()}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.