public static function printTimelineComments($idpost, $automatico = 0) { global $CFG, $OUTPUT; $webgdCommunity = new WebgdCommunityDao(); $postComment = $webgdCommunity->postCommentById($idpost); $resposta = ""; foreach ($postComment as $comment) { $images = self::imageById($comment->userid); $resposta .= "<div class='conteudo_post'>\n <div class='titulo_post'>\n <span class='icone_user'>"; foreach ($images as $img) { $resposta .= $OUTPUT->user_picture($img, array('size' => 25, 'alttext' => false, 'link' => false)); } $resposta .= "</span> <span class='nome_criador'>" . html_writer::tag('a', $comment->firstname, array('href' => $CFG->wwwroot . '/user/profile.php?id=' . $comment->userid)) . "</span>\n " . get_string('publicouEm', 'block_webgd_community') . "\n <div class='data'>" . strftime('%d de %B de %Y às %H %M %S ', $comment->time) . "</div>\n </span>\n <div class='informacoes_post'>\n <span>" . Commons::make_links_blank($comment->comentario) . "</span>\n </div></div></div>"; } if ($automatico) { return $resposta; } else { echo $resposta; } }