Sourcecode in Story/macros.js:
1: function createtime_macro(param) {
2: if (param.as == "editor") {
3: if (this.createtime)
4: param.value = formatTimestamp(this.createtime, "yyyy-MM-dd HH:mm");
5: else
6: param.value = formatTimestamp(new Date(), "yyyy-MM-dd HH:mm");
7: param.name = "createtime";
8: Html.input(param);
9: } else if (this.createtime) {
10: var text = formatTimestamp(this.createtime, param.format);
11: if (param.as == "link" && this.online == 2)
12: Html.link({href: path.Site.get(String(this.day)).href()}, text);
13: else
14: res.write(text);
15: }
16: return;
17: }
|