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

system.verbs.builtins.radio.menuCommands.editHomePage

<<Changes
	<<10/7/01; 5:42:07 PM by JES
		<<Edit index.*, instead of always editing index.opml. This fixes a bug where the home page would appear to be empty, when both index.opml and index.txt are at the top-level of the www folder.
			<<bundle //older code
				<<local (adr = @system.temp.playlist.serverHomePage)
				<<
				<<if defined (adr^) //it may already be open -- bring the window to front, if so
					<<if window.isOpen (adr)
						<<window.bringToFront (adr)
						<<return (true)
				<<
				<<local (s = "")
				<<local (wwwFolder = user.radio.prefs.wwwfolder)
				<<local (f = wwwFolder + "index.html")
				<<if file.exists (f) //read the current text
					<<s = string (file.readWholeFile (f))
				<<
				<<wp.newTextObject (s, adr)
				<<edit (adr, "Home Page")
			<<bundle //old code
				<<playlist.openSpecialWwwFile ("index.opml")
local (f = user.radio.prefs.wwwFolder + "index.opml");
local (fileToEdit);
if radio.file.locateFileIgnoringExtension (f, @fileToEdit) {
	if defined (user.radio.prefs.editors.[radio.webserver.getfilemimetype (filetoedit)]) {
		local (editor = user.radio.prefs.editors.[radio.webserver.getfilemimetype (filetoedit)]);
		launch.appWithDocument (editor, filetoedit)}
	else {
		if string.lower (filetoedit) endsWith (".opml") {
			Frontier.clickers.typeOPML (filetoedit)} //make sure we open in this instance of Radio (MacOS)
		else {
			launch.anything (filetoedit)}}}



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.