getJsonComment($id); if ($comment === null) { header('HTTP/1.0 404 Not Found'); header('Content-Type: text/plain'); echo "Comment not found\n"; exit(1); } $rowComment = $comment->Xrow; $rowUser = $comment->user; $vars = array( 'json' => $comment->properties, 'crow' => $rowComment, 'comment' => $comment, 'author' => array( 'name' => $rowUser->user_name, 'url' => Urls::full(Urls::user($rowUser->user_id)), 'imageurl' => Urls::userImg($rowUser), ), 'postUrl' => Urls::full(Urls::comment($rowComment->comment_id)), 'replyUrl' => Urls::reply( Urls::full(Urls::comment($rowComment->comment_id)) ), ); if ($rowComment->comment_type == 'like') { $template = 'post-like'; } else { //reply $template = 'post-reply'; if (isset($comment->properties->content['html'])) { $htmlContent = $comment->properties->content['html']; } else { $htmlContent = nl2br($comment->properties->content[0]); } $vars['htmlContent'] = $htmlContent; } if (isset($linkbackEndpoint) && $linkbackEndpoint) { header('X-Pingback: ' . $linkbackEndpoint); header('Link: <' . $linkbackEndpoint . '>; rel="webmention"'); } render($template, $vars); ?>