= $SafeBody; ?>
Comments() as $Comment) {
Blog_PrintComment($Comment);
}
}
/**
* Print a comment.
* @param Message $Comment Comment to print.
* @throws Exception
*/
function Blog_PrintComment(Message $Comment): void
{
$AF = ApplicationFramework::getInstance();
# retrieve user currently logged in
$User = User::getCurrentUser();
$Blog = Blog::getInstance();
$Author = new User(intval($Comment->PosterId()));
$CanEditComment = $Blog->UserCanEditComment($User, $Comment);
$CanDeleteComment = $Blog->UserCanDeleteComment($User, $Comment);
$CanEditUsers = $Blog->UserCanEditUsers($User);
# encode values for HTML output
$SafeCommentId = defaulthtmlentities($Comment->MessageId());
$SafeBody = nl2br(trim(defaulthtmlentities($Comment->Body())));
$SafeEntryId = defaulthtmlentities($Comment->ParentId());
$SafePosterId = defaulthtmlentities($Author->Id());
$SafePosterName = defaulthtmlentities($Author->GetBestName());
$SafePostedDate = preg_replace(
"/at /",
" = $SafeBody; ?>
at ",
defaulthtmlentities(StdLib::getPrettyTimestamp($Comment->DatePosted(), true))
);
$SafePostedDateForParsing = defaulthtmlentities(
Blog_FormatTimestampForParsing($Comment->DatePosted())
);
$EditCommentButton = new HtmlButton("Edit");
$EditCommentButton->setSize(HtmlButton::SIZE_SMALL);
$EditCommentButton->setIcon("Pencil.svg");
$EditCommentButton->setLink("index.php?P=P_Blog_Comment&ID=$SafeEntryId"
. "&CommentId=$SafeCommentId");
$DeleteCommentButton = new HtmlButton("Delete");
$DeleteCommentButton->setSize(HtmlButton::SIZE_SMALL);
$DeleteCommentButton->setIcon("Delete.svg");
$DeleteCommentButton->setName("F_Action");
?>
Views | = $SafeNumViews; ?> |
---|---|
Shared via E-mail | = $SafeNumEmail; ?> |
Shared to Facebook | = $SafeNumFacebook; ?> |
Shared to Twitter | = $SafeNumTwitter; ?> |
Shared to LinkedIn | = $SafeNumLinkedIn; ?> |
Posted ShowAuthor()) { ?> by
= $SafePublicationDatePrefix; ?> .Last Edited: ModificationDate(), true) ); if ($H_Blog->ShowAuthor()) { ?> by AuthorForDisplay()).""; } print "
"; } ?> = $SeeMoreButton->getHtml(); ?>The blog entry could not be found. Please contact the administrator if you believe this is an error.
Comments
NumberOfComments() > 0) { ?> Log in to post a comment.There are no comments yet for this entry. Please Log In to post one.