function xhtml_comment_preview($data) { global $lang; // FIXME ptln('<div id="blogtng__comment_preview">'); ptln(p_locale_xhtml('preview')); ptln('<br />'); $comment = new blogtng_comment(); $comment->init($data); $comment->output('default'); ptln('</div>'); }
/** * Print the comemnts */ function tpl_comments($name, $types = null) { $pid = $this->pid; if (!$pid) { return false; } $sql = 'SELECT * FROM comments WHERE pid = ?'; $args = array(); $args[] = $pid; if (is_array($types)) { $qs = array(); foreach ($types as $type) { $args[] = $type; $qs[] = '?'; } $sql .= ' AND type IN (' . join(',', $qs) . ')'; } $sql .= ' ORDER BY created ASC'; $res = $this->sqlitehelper->query($sql, $args); $res = $this->sqlitehelper->res2arr($res); $comment = new blogtng_comment(); foreach ($res as $row) { $comment->init($row); $comment->output($name); } }
/** * Displays a preview of the comment * * @param array $data submitted comment properties */ private function xhtml_comment_preview($data) { $this->entryhelper->load_by_pid($data['pid']); $blogname = $this->entryhelper->get_blog(); ptln('<div id="blogtng__comment_preview">'); ptln(p_locale_xhtml('preview')); ptln('<br />'); $comment = new blogtng_comment(); $comment->init($data); $comment->output($blogname); ptln('</div>'); }