Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.oldstuff.frameTextFile
on frameTextFile (fname, boxTitle=nil, width=125, frameColor="#000000", titleBarTextColor="#000000", titleBarColor="#ADD8E6", boxFillColor="#FFFFFF") {
local (htmltext = "\r\n", indentlevel = 0);
on add (s) {
htmltext = htmltext + string.filledString ("\t", indentlevel) + s + "\r\n"};
add ("<table width=\"" + width + "\" cellspacing=\"0\" cellpadding=\"1\" border=\"0\">"); indentlevel++;
add ("<tr bgcolor=\"" + framecolor + "\">"); indentlevel++;
add ("<td width=\"" + width + "\">"); indentlevel++;
add ("<table width=\"" + width + "\" cellspacing=\"0\" cellpadding=\"7\" border=\"0\">"); indentlevel++;
bundle { //add title bar row
add ("<tr bgcolor=\"" + titleBarColor + "\"><td width=\"" + width + "\" height=\"22\" nowrap><b><font color=\"" + titleBarTextColor + "\">" + boxTitle + "</font></b></td></tr>")};
<<bundle //add one-pixel row in the frame color
<<add ("<tr bgcolor=\"" + frameColor + "\" height=\"1\"><td></td></tr>")
bundle { //add the body
add ("<tr bgcolor=\"" + boxFillColor + "\">"); indentlevel++;
add ("<td width=\"100%\">"); indentlevel++;
add (radio.macros.includeTextFile (fname, true));
add ("</td>"); indentlevel--;
add ("</tr>"); indentlevel--};
add ("</table>"); indentlevel--;
add ("</td>"); indentlevel--;
add ("</tr>"); indentlevel--;
add ("</table>"); indentlevel--;
return (htmltext)}
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.