<% Global.imageoftheday %>
macro renders the most recently created image of a topic or site

  • Parameter topic:
    String (optional), specifies from which topic the image should be taken all other parameters are passed through to the global image macro FIXME: this function needs testing and proof of concept
Sourcecode in Global/macros.js:
1:   function imageoftheday_macro(param) {
2:      var s = res.handlers.site;
3:      var pool = (param.topic) ? s.images.topics.get(param.topic) : res.handlers.site.images;
4:      if (pool==null) return;
5:      delete(param.topic);
6:      var img = pool.get(0);
7:      param.name = img.alias;
8:      return image_macro(param);
9:   }