Thursday, March 31, 2011 at 1:05 AM.
river2Suite.initUser
on initUser (adruser) {
<<Changes
<<3/29/11; 5:27:37 PM by DW
<<Init adruser^.prefs.maxRiverItems.
<<3/27/11; 2:35:25 PM by DW
<<Init adruser^.prefs.static.flBuildJavaScriptInclude, default false.
<<2/4/11; 4:20:37 PM by DW
<<Init beautifulRiver prefs.
<<12/5/10; 2:58:13 PM by DW
<<Init stats for timing of various builds.
<<11/9/10; 7:57:03 AM by DW
<<Init callbacks table, with a single callback -- afterStaticFileWrite.
<<11/7/10; 3:56:59 PM by DW
<<Init adruser^.prefs.urlReadingList.
<<3/26/10; 1:37:03 PM by DW
<<More prefs for per-user static rendering: bottomPageText, pageTitle.
<<3/26/10; 8:20:04 AM by DW
<<Static rendering prefs and stats.
<<12/24/09; 8:46:26 AM by DW
<<Add items sub-table for each feed.
<<12/23/09; 10:27:13 AM by DW
<<Init status info for the user's feeds.
<<11/24/09; 10:29:35 AM by DW
<<Created.
if not defined (adruser^) {
new (tabletype, adruser)};
bundle { //prefs
if not defined (adruser^.prefs) {
new (tabletype, @adruser^.prefs)};
if not defined (adruser^.prefs.password) {
adruser^.prefs.password = ""};
bundle { //static, 3/26/10 by DW
if not defined (adruser^.prefs.static) {
new (tabletype, @adruser^.prefs.static)};
if not defined (adruser^.prefs.static.enabled) {
adruser^.prefs.static.enabled = false};
if not defined (adruser^.prefs.static.topPageText) {
adruser^.prefs.static.topPageText = ""};
if not defined (adruser^.prefs.static.bottomPageText) {
adruser^.prefs.static.bottomPageText = ""};
if not defined (adruser^.prefs.static.pageTitle) {
adruser^.prefs.static.pageTitle = ""};
if not defined (adruser^.prefs.static.flBuildJavaScriptInclude) { //3/27/11 by DW
adruser^.prefs.static.flBuildJavaScriptInclude = false}};
if not defined (adruser^.prefs.urlReadingList) { //11/7/10 by DW
adruser^.prefs.urlReadingList = ""};
if not defined (adruser^.prefs.maxRiverItems) { //3/29/11 by DW
adruser^.prefs.maxRiverItems = 100};
bundle { //beautifulRiver, 2/4/11 DW
river2Suite.initBeautifulRiverPrefs (adruser)}};
bundle { //stats
if not defined (adruser^.stats) {
new (tabletype, @adruser^.stats)};
if not defined (adruser^.stats.ctInits) {
adruser^.stats.ctInits = 0};
adruser^.stats.ctInits++;
if not defined (adruser^.stats.cloudPipeServer) {
new (tabletype, @adruser^.stats.cloudPipeServer)};
if not defined (adruser^.stats.cloudPipeServer.ctServerCalls) {
adruser^.stats.cloudPipeServer.ctServerCalls = 0};
if not defined (adruser^.stats.cloudPipeServer.ctServerLoops) {
adruser^.stats.cloudPipeServer.ctServerLoops = 0};
if not defined (adruser^.stats.cloudPipeServer.ctTimeouts) {
adruser^.stats.cloudPipeServer.ctTimeouts = 0};
if not defined (adruser^.stats.ctJsIncludeBuilds) { //12/5/10 by DW
adruser^.stats.ctJsIncludeBuilds = 0};
if not defined (adruser^.stats.ctJsonBuilds) { //12/5/10 by DW
adruser^.stats.ctJsonBuilds = 0}};
bundle { //callbacks -- 11/9/10 by DW
if not defined (adruser^.callbacks) {
new (tabletype, @adruser^.callbacks)};
if not defined (adruser^.callbacks.afterStaticFileWrite) {
new (tabletype, @adruser^.callbacks.afterStaticFileWrite)}};
if not defined (adruser^.feeds) {
new (tabletype, @adruser^.feeds)};
bundle { //init the user's feeds, 12/22/09 by DW
local (adrfeed);
for adrfeed in @adruser^.feeds {
if not defined (adrfeed^.flRealtimeUpdate) {
adrfeed^.flRealtimeUpdate = false};
if not defined (adrfeed^.whenLastRealtimeUpdate) {
adrfeed^.whenLastRealtimeUpdate = date (0)};
if not defined (adrfeed^.itemSerialnum) {
adrfeed^.itemSerialnum = 0};
if not defined (adrfeed^.items) {
new (tabletype, @adrfeed^.items)}}};
return (true)};
bundle { //test code
initUser (@config.river2.users.bullMancuso)}
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.