Monday, November 08, 2010 at 12:05 AM.

system.verbs.builtins.radio.weblog.oldStuff.publishStaticHomePage

on publishStaticHomePage (adrblog=radio.weblog.init (), flPublishRss=true, flPublishArchivePage=true) {
	<<Changes
		<<9/28/01; 2:51:04 PM by JES
			<<Don't do update notification here, since it's now handled by an upstreaming callback.
		<<9/18/01; 4:56:31 PM by JES
			<<Send the RPC message to UserLand to notify of the update. This puts Radio weblogs on the UserLand updates page at http://www.userland.com/updates
		<<9/2/01; 10:41:59 PM by JES
			<<Created.
			<<This is the bottleneck for doing a static publish of the weblog homepage, most recent archive page, and rss.
	radio.weblog.publishStaticPage (adrblog);
	<<if adrblog^.prefs.flPublicBlog
		<<thread.callScript (@radio.weblog.notify, {adrblog})
	if flPublishArchivePage {
		local (mostrecentday);
		mostrecentday = adrblog^.posts [sizeof (adrblog^.posts)].when;
		local (day, month, year, hour, minute, second);
		date.get (mostrecentday, @day, @month, @year, @hour, @minute, @second);
		local (minDate = date.set (day, month, year, 0, 0, 0));
		local (maxDate = date.set (day, month, year, 23, 59, 59));
		radio.weblog.publishStaticPage (adrblog, maxDays:1, maxDate:maxDate, minDate:minDate, flHomePage:false)};
	if flPublishRss {
		radio.weblog.publishRss (adrblog)};
	return (true)};

bundle { //debugging
	publishStaticHomePage (flPublishRss:false, flPublishArchivePage:false)}



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.