antville/code/Comment/macros.js
2004-01-07 17:27:16 +00:00

26 lines
591 B
JavaScript

/**
* macro renders a link to reply to a comment
*/
function replylink_macro(param) {
if (this.site.preferences.getProperty("discussions") && req.action == "main") {
Html.openLink({href: this.href("comment") +
(param.anchor ? "#" + param.anchor : "")});
if (!param.image)
res.write(param.text ? param.text : "reply");
else
renderImage(param);
Html.closeLink();
}
return;
}
/**
* macro renders the url of this comment
*/
function url_macro(param) {
res.write(this.story.href() + "#" + this._id);
return;
}