<% Global.imageoftheday %> |
macro renders the most recently created image of a topic or site
|
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: } |