Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: activityLogs Arguments: Description: Displays an aggregated list of all activitylogs marked with an 'activitylog' flag. Page type: webl Render function: blogRender Module: site Page source: var logcmds = Wub_GetFunctionsByTag("flag.activitylog"); var aggregate = []; // aggregate every logcmd in logcmds do var log = (WubCall(logcmd, []) ? [. entries=[] .]); var entries = (log.entries ? []); aggregate = aggregate + entries end; // sort var df = Wub_GetDateFormatClass(); var dfmed = df.getDateTimeInstance(df.SHORT, df.MEDIUM); var dfshort = df.getDateTimeInstance(df.SHORT, df.SHORT); var EntryTimeAsLong= fun(entry) return (dfmed.parse(entry.when).getTime() ? dfshort.parse(entry.when).getTime() ? 0) end; aggregate = Wub_FunctionSort(EntryTimeAsLong, aggregate, -1); [. title="Activity Log for Collaborama Members", entries=aggregate .];