<% Site.history %>
macro renders a list of recently added/updated stories/comments of this site

Sourcecode in Site/macros.js:
1:   function history_macro(param) {
2:      try {
3:         this.checkView(session.user, req.data.memberlevel);
4:      } catch (deny) {
5:         return;
6:      }
7:      var limit = param.limit ? parseInt(param.limit, 10) : 5;
8:      var cnt = i = 0;
9:      var size = this.lastmod.size();
10:     var discussions = this.preferences.getProperty("discussions");
11:     while (cnt < limit && i < size) {
12:        if (i % limit == 0)
13:           this.lastmod.prefetchChildren(i, limit);
14:        var item = this.lastmod.get(i++);
15:        switch (item._prototype) {
16:           case "Story":
17:              if (param.show == "comments")
18:                 continue;
19:              break;
20:           case "Comment":
21:              if (param.show == "stories" || !item.story.online ||
22:                    !item.story.discussions || !discussions)
23:                 continue;
24:              break;
25:        }
26:        item.renderSkin("historyview");
27:        cnt++;
28:     }
29:     return;
30:  }