xtemplate_comment
- Versions
- 4.6
xtemplate_comment($comment, $links = 0)
Code
themes/engines/xtemplate/xtemplate.engine, line 78
<?php
function xtemplate_comment($comment, $links = 0) {
global $xtemplate;
$xtemplate->template->assign(array (
"new" => t("new"),
"submitted" => t("Submitted by %a on %b.",
array("%a" => format_name($comment),
"%b" => format_date($comment->timestamp))),
"title" => l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid"),
"author" => format_name($comment),
"date" => format_date($comment->timestamp),
"content" => $comment->comment
));
if ($comment->new) {
$xtemplate->template->parse("comment.new");
}
if (theme_get_setting('toggle_comment_user_picture') && $picture = theme('user_picture', $comment)) {
$xtemplate->template->assign("picture", $picture);
$xtemplate->template->parse("comment.picture");
}
if ($links) {
$xtemplate->template->assign("links", $links);
$xtemplate->template->parse("comment.links");
}
$xtemplate->template->parse("comment");
$output = $xtemplate->template->text("comment");
$xtemplate->template->reset("comment");
return $output;
}
?>Login or register to post comments 