Thursday, April 07, 2011 at 1:07 AM.
radio2Suite.init
on init () {
<<Changes
<<4/6/11; 4:30:20 PM by DW
<<Init ctLogins stat.
<<3/30/11; 7:29:13 PM by DW
<<Init domainRadioReallySimpleApp.
<<3/15/11; 10:55:43 AM by DW
<<Init userWhoCanCreateNewAccounts.
<<3/15/11; 10:32:34 AM by DW
<<Init prefs for RSS cloud element.
<<3/14/11; 3:59:16 PM by DW
<<Init adrdata^.callbacks.addNamespaceToRssFeed.
<<3/14/11; 12:16:35 AM by DW
<<Init adrdata^.prefs.apiEnabled, default false.
<<3/13/11; 1:33:32 AM by DW
<<Add a table of "extraHtml" callbacks.
<<3/12/11; 1:02:55 PM by DW
<<Callbacks for init. So you can manage your own data in config.radio2.
<<3/11/11; 4:47:11 AM by DW
<<Init callbacks table.
<<3/6/11; 2:26:09 PM by DW
<<Init customDomain for shortener prefs.
<<3/5/11; 12:22:44 PM by DW
<<Init adrdata^.prefs.flRiver2SubscribeCommunityOPML, adrdata^.prefs.flRiver2ReadFeedAfterPublish.
<<3/2/11; 9:20:53 PM by DW
<<Init adrdata^.stats.ctCommunityOpmlBuilds.
<<2/21/11; 11:12:07 AM by DW
<<Init flags table, used in everyMinute script.
<<2/17/11; 6:32:54 PM by DW
<<Init shortener prefs.
<<2/15/11; 3:36:35 PM by DW
<<Init adrdata^.prefs.s3url.
<<1/4/11; 11:33:01 AM by DW
<<Created.
local (adrdata = @config.radio2);
if not defined (adrdata^) {
new (tabletype, adrdata)};
bundle { //prefs
if not defined (adrdata^.prefs) {
new (tabletype, @adrdata^.prefs)};
if not defined (adrdata^.prefs.enabled) {
adrdata^.prefs.enabled = false};
if not defined (adrdata^.prefs.apiEnabled) { //3/14/11 by DW
adrdata^.prefs.apiEnabled = false};
if not defined (adrdata^.prefs.s3path) {
adrdata^.prefs.s3path = ""};
if not defined (adrdata^.prefs.s3url) { //2/15/11 by DW
adrdata^.prefs.s3url = ""};
if not defined (adrdata^.prefs.s3enabled) {
adrdata^.prefs.s3enabled = false};
if not defined (adrdata^.prefs.ctMinutesBetwCountGets) {
adrdata^.prefs.ctMinutesBetwCountGets = 5};
if not defined (adrdata^.prefs.flRiver2SubscribeCommunityOPML) { //3/5/11 by DW
adrdata^.prefs.flRiver2SubscribeCommunityOPML = true};
if not defined (adrdata^.prefs.flRiver2ReadFeedAfterPublish) { //3/5/11 by DW
adrdata^.prefs.flRiver2ReadFeedAfterPublish = true};
if not defined (adrdata^.prefs.flags) { //2/21/11 by DW
new (tabletype, @adrdata^.prefs.flags)};
if not defined (adrdata^.prefs.userWhoCanCreateNewAccounts) { //3/5/11 by DW
adrdata^.prefs.userWhoCanCreateNewAccounts = ""};
if not defined (adrdata^.prefs.domainRadioReallySimpleApp) { //3/30/11 by DW
adrdata^.prefs.domainRadioReallySimpleApp = "radio.reallysimple.org"};
bundle { //shortener, 2/17/11 by DW
if not defined (adrdata^.prefs.shortener) {
new (tabletype, @adrdata^.prefs.shortener)};
if not defined (adrdata^.prefs.shortener.enabled) {
adrdata^.prefs.shortener.enabled = false};
if not defined (adrdata^.prefs.shortener.email) {
adrdata^.prefs.shortener.email = ""};
if not defined (adrdata^.prefs.shortener.partnerID) {
adrdata^.prefs.shortener.partnerID = ""};
if not defined (adrdata^.prefs.shortener.password) {
adrdata^.prefs.shortener.password = ""};
if not defined (adrdata^.prefs.shortener.customDomain) { //3/6/11 by DW
adrdata^.prefs.shortener.customDomain = ""}};
bundle { //cloud, 3/15/11 by DW
if not defined (adrdata^.prefs.cloud) {
new (tabletype, @adrdata^.prefs.cloud)};
if not defined (adrdata^.prefs.cloud.server) {
adrdata^.prefs.cloud.server = "rpc.rsscloud.org"};
if not defined (adrdata^.prefs.cloud.port) {
adrdata^.prefs.cloud.port = 5337};
if not defined (adrdata^.prefs.cloud.path) {
adrdata^.prefs.cloud.path = "/rsscloud/pleaseNotify"};
if not defined (adrdata^.prefs.cloud.protocol) {
adrdata^.prefs.cloud.protocol = "http-post"};
if not defined (adrdata^.prefs.cloud.registerProcedure) {
adrdata^.prefs.cloud.registerProcedure = ""}}};
bundle { //stats
if not defined (adrdata^.stats) {
new (tabletype, @adrdata^.stats)};
if not defined (adrdata^.stats.ctEveryMinutes) {
adrdata^.stats.ctEveryMinutes = 0};
if not defined (adrdata^.stats.ctCommunityOpmlBuilds) { //3/2/11 by DW
adrdata^.stats.ctCommunityOpmlBuilds = 0};
if not defined (adrdata^.stats.ctShortenedUrls) { //3/6/11 by DW
adrdata^.stats.ctShortenedUrls = 0};
if not defined (adrdata^.stats.ctLogins) { //4/6/11 by DW
adrdata^.stats.ctLogins = 0}};
bundle { //set up callbacks table, 3/11/11 by DW
if not defined (adrdata^.callbacks) {
new (tabletype, @adrdata^.callbacks)};
if not defined (adrdata^.callbacks.addToRssChannel) {
new (tabletype, @adrdata^.callbacks.addToRssChannel)};
if not defined (adrdata^.callbacks.addToRssItem) {
new (tabletype, @adrdata^.callbacks.addToRssItem)};
if not defined (adrdata^.callbacks.addNamespaceToRssFeed) { //3/14/11 by DW
new (tabletype, @adrdata^.callbacks.addNamespaceToRssFeed)};
if not defined (adrdata^.callbacks.init) { //3/12/11 by DW
new (tabletype, @adrdata^.callbacks.init)};
if not defined (adrdata^.callbacks.initFeed) { //3/12/11 by DW
new (tabletype, @adrdata^.callbacks.initFeed)};
if not defined (adrdata^.callbacks.initPost) { //3/12/11 by DW
new (tabletype, @adrdata^.callbacks.initPost)};
if not defined (adrdata^.callbacks.initUser) { //3/12/11 by DW
new (tabletype, @adrdata^.callbacks.initUser)};
if not defined (adrdata^.callbacks.extraHtml) { //3/13/11 by DW
new (tabletype, @adrdata^.callbacks.extraHtml)}};
if not defined (adrdata^.users) {
new (tabletype, @adrdata^.users)};
bundle { //run our own callbacks, 3/12/11 by DW
local (adrscript);
for adrscript in @adrdata^.callbacks.init {
while typeof (adrscript^) == addresstype {
adrscript = adrscript^};
try {
adrscript^ (adrdata)}}};
return (adrdata)};
bundle { //test code
init ()}
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.