on storyList (adrtable, urlprefix="") |
| «http://www.scripting.com/fatPages/97/06/storyList.html |
| «Sun, Aug 10, 1997 at 10:17:05 AM by DW -- added urlprefix |
| «used in user.websites.gimme5.default |
| «you can correctly point to a page in a subdirectory |
| «Sun, Sep 28, 1997 at 2:31:27 PM by DW -- don't list directives |
| «if the name of an item begins with #, skip it |
| local (adroutline = @scratchpad.tempoutline) |
| new (outlinetype, adroutline) |
| editmenu.setfont ("monaco") |
| bundle «build the outline, ;-separated fields, date first, address of object second |
| local (i, firstline = true) |
| for i = 1 to sizeof (adrtable^) |
| local (adritem = @adrtable^ [i]) |
| local (nameitem = nameof (adritem^)) |
| if string.lower (nameitem) contains "default" «don't include the home page |
| if nameitem beginswith "#" «avoid directives |
| local (day, month, year, hour, minute, second) |
| date.get (timeCreated (adritem), @day, @month, @year, @hour, @minute, @second) |
| return (toys.padwithzeros (x, 2)) |
| s = s + num (year) + ";" + num (month) + ";" + num (day) + ";" |
| s = s + num (hour) + ";" + num (minute) + ";" + num (second) + ";" |
| s = s + string (adritem) + ";" |
| bundle «build the page from the outline |
| local (adritem, datestring, title, url, link) |
| add ("<td valign=top bgcolor=" + bgcolor + ">" + s + "</td>") |
| add ("<table cellspacing=0 cellpadding=3 border=0>\r") |
| adritem = address (string.nthfield (op.getlinetext (), ';', 7)) |
| datestring = string.nthfield (timeCreated (adritem), ';', 1) |
| td ("<code>" + datestring + "</code>", "white") |
| title = html.getOneDirective ("#title", string (adritem^)) |
| url = nameOf (adritem^) + html.getPref ("fileextension") |
| link = "<a href=\"" + urlprefix + url + "\">" + title + "</a>" |