_post_comment
Site Infrastructure / _post_comment

[if(can_comment($_args[0], $_viewer.id)) {

	[msg_start();
	if($_args[1] == "") $_args[1] = "comment_submit";
	// arg 0: id we're replying to
	]
	<form method="post" action="/" id="comment_form">
		<script type="text/javascript">
			form = document.getElementById("comment_form");

			mode = document.createElement("input");
			mode.name = "mode";
			mode.type = "hidden";
			mode.value = "[$_args[1]]";
			form.appendChild(mode);

			id = document.createElement("input");
			id.name = "id";
			id.type = "hidden";
			id.value = [$_args[0]];
			form.appendChild(id);
		</script>
		<textarea class="textbox" rows="10" name="body"></textarea>
	        <p><input type="submit" value="Post Comment"></p>
	</form>
	[msg_end();]
} else {
	<i>You are not eligible to comment on this article at this time.</i>
}]