Monday, November 08, 2010 at 12:00 AM.
river2Suite.initRiverItem
on initRiverItem (adritem) {
<<Changes
<<9/9/09; 7:31:47 AM by DW
<<Init new type table, has flags indicating if its a photo or a podcast (with room for other type flags).
<<8/24/09; 10:57:14 AM by DW
<<Created. Make sure an item in the river has correct data.
if defined (adritem^.enclosure) {
local (flgetinfo = false);
if (not defined (adritem^.enclosure.length)) or (not defined (adritem^.enclosure.type)) {
flgetinfo = true};
if typeof (adritem^.enclosure.length) == stringtype {
flgetinfo = true};
if flgetinfo {
tcp.httpGetTypeLength (adritem^.enclosure.url, @adritem^.enclosure.type, @adritem^.enclosure.length, 5)};
if not defined (adritem^.podcast) {
new (tabletype, @adritem^.podcast)}};
bundle { //type table
if not defined (adritem^.type) {
new (tabletype, @adritem^.type)};
if not defined (adritem^.type.flPhoto) {
adritem^.type.flPhoto = false};
if not defined (adritem^.type.flPodcast) {
adritem^.type.flPodcast = false}}}
<<bundle //test code
<<initRiverItem (@config.river2.river.["2009"].["09"].["08"].["0042220"])
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.