Tuesday, August 18, 2009 at 7:34 PM.
photoFanSuite.addFeed
on addFeed (url, enabled=true, flickrUserId="", flContact=false) { <<Changes <<1/3/08; 2:21:35 PM by DW <<When deleting the feed after an error, don't throw an error if it fails. I've seen the Script Error window pop up pointing to this code. <<12/31/07; 4:19:08 AM by DW <<If there's an error getting the feed info, that means the feed is bad and we can't use the table we created. <<If it is newly created, delete it then rethrow the error. <<11/29/07; 8:58:43 AM by DW <<Add optional params, enabled, flickrUserId and flContact. Return the address of the feed. <<11/25/07; 1:23:14 PM by DW <<Created. local (adrfeed = @user.photoFan.feeds.[url], flnew = false); if not defined (adrfeed^) { new (tabletype, adrfeed); flnew = true}; adrfeed^.flickrUserId = flickrUserId; adrfeed^.enabled = enabled; adrfeed^.flContact = flContact; try { photoFanSuite.getFeedInfo (adrfeed)} else { local (errorstring = tryerror); if flnew { try {delete (adrfeed)}}; //1/3/08 by DW scripterror (errorstring)}; //rethrow the error return (adrfeed)}; bundle { //test code photoFanSuite.addFeed (photoFanSuite.data.urls.ap)} <<addFeed ("http://api.flickr.com/services/feeds/photos_public.gne?tags=leweb307&lang=en-us&format=rss_200") <<addFeed ("http://xml.flickrfan.org/river/defaultReadingList.opml")
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.