Monday, April 04, 2011 at 1:07 AM.
radio2Suite.initPost
on initPost (adrpost) {
<<Changes
<<3/12/11; 1:05:03 PM by DW
<<Callbacks. Now you can manage your own data in each post's table.
<<3/2/11; 8:31:41 AM by DW
<<If the post doesn't have an enclosure, don't create an empty one. Most posts don't have them. Save a little space. And there is code that depends on the presence of an enclosure element as indicating that there is an enclosure.
<<12/25/10; 1:13:43 PM by DW
<<Created.
if not defined (adrpost^) {
new (tabletype, adrpost)};
<<if not defined (adrpost^.enclosure) //1/10/11 by DW
<<adrpost^.enclosure = ""
bundle { //stats
if not defined (adrpost^.stats) {
new (tabletype, @adrpost^.stats)};
if not defined (adrpost^.stats.ctSaves) {
adrpost^.stats.ctSaves = 0}};
bundle { //callbacks, 3/12/11 by DW
local (adrdata = @config.radio2, adrscript);
for adrscript in @adrdata^.callbacks.initPost {
while typeof (adrscript^) == addresstype {
adrscript = adrscript^};
try {
adrscript^ (adrpost)}}}};
bundle { //test code
initpost (@config.radio2.calendar.["2010"].["12"].["15"].["00009"])}
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.