Monday, November 08, 2010 at 12:00 AM.
scripting2Suite.server.isStoryVisible
on isStoryVisible (adrstory) {
<<Changes
<<6/27/10; 6:26:31 AM by DW
<<This is where flDeleted is implemented. :-)
<<6/26/10; 7:57:22 AM by DW
<<As the name of this script implies, not all stories are visible.
<<Examples of stories that are not:
<<Ones that have an flNotInChronology attribute that's false. This is a way of writing pages that explicitly live outside the chronology.
<<Ones that have an flPreview attribute that's true.
if defined (adrstory^.flNotInChronology) {
if adrstory^.flNotInChronology {
return (false)}};
if defined (adrstory^.flPreview) {
if adrstory^.flPreview {
return (false)}};
if defined (adrstory^.flDeleted) { //6/27/10 by DW
if adrstory^.flDeleted {
return (false)}};
return (true)}
<<bundle //test code
<<local (t, i, tc = clock.ticks ())
<<new (tabletype, @t)
<<for i = 1 to 10000
<<isStoryVisible (@t)
<<dialog.alert (clock.ticks () - tc)
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.