function ssi_recentComment($num_recent = 10, $output_method = 'echo')
{
global $context, $db_prefix,$settings, $modSettings, $scripturl, $txt, $ID_MEMBER;
global $func;
// Display all user comments
$request = db_query("
SELECT
c.ID_FILE, c.ID_COMMENT, c.date, c.comment, c.ID_MEMBER,
c.lastmodified,c.modified_ID_MEMBER, m.posts, m.realName,m.avatar, c.approved, IFNULL(m.realName, m.memberName) AS posterName,f.ID_FILE,f.title, f.totaldownloads,f.commenttotal,a.ID_ATTACH,a.ID_MEMBER AS Members
FROM {$db_prefix}down_comment as c
LEFT JOIN {$db_prefix}members AS m ON (c.ID_MEMBER = m.ID_MEMBER)
LEFT JOIN {$db_prefix}down_file AS f ON (f.ID_FILE = c.ID_FILE)
LEFT JOIN {$db_prefix}attachments AS a ON (c.ID_MEMBER = a.ID_MEMBER)
ORDER BY c.ID_COMMENT DESC LIMIT 0,$num_recent");
$contexts= array();
while ($row = mysql_fetch_assoc($request))
{
// If we want to limit the length of the post.
if (!empty($length) && $func['strlen']($row['comment']) > $length)
{
$row['comment'] = $func['substr']($row['comment'], 0, $length);
// The first space or line break. (<br />, etc.)
$cutoff = max(strrpos($row['comment'], ' '), strrpos($row['comment'], '<'));