public static function getComments($id)
{
// get the comments
$comments = (array) FrontendModel::getContainer()->get('database')->getRecords('SELECT c.id, UNIX_TIMESTAMP(c.created_on) AS created_on, c.text, c.data,
c.author, c.email, c.website
FROM blog_comments AS c
WHERE c.post_id = ? AND c.status = ? AND c.language = ?
ORDER BY c.id ASC', array((int) $id, 'published', LANGUAGE));
// loop comments and create gravatar id
foreach ($comments as &$row) {
$row['gravatar_id'] = md5($row['email']);
}
// return
return $comments;
}