// Fortune SSI // Copyright (c) 2001 by Paul Guyot. // All rights reserved worldwide. // // This script displays a randomly selected fortune from Fortunes application. // (or "" if Fortunes is not installed/activated). func(inUndocumentedRequestFrame) begin // Reference to the application (or nil if it's not installed) local app := GetRoot().|Fortunes:Kallisys|; if (app) then begin // Get a random fortune. local string theText := app:GetRandomFortune(); // Format it to HTML. StrReplace( theText, "<", "<", nil ); StrReplace( theText, ">", ">", nil ); StrReplace( theText, "&", "&", nil ); StrReplace( theText, "\n", "
\n", nil ); StrReplace( theText, " ", "  ", nil ); return theText; end else return ""; end