コード例 #1
0
ファイル: admin.php プロジェクト: speed47/plugin-blogtng
 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>');
 }
コード例 #2
0
ファイル: comments.php プロジェクト: Narrator/plugin-blogtng
 /**
  * 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);
     }
 }
コード例 #3
0
ファイル: admin.php プロジェクト: stupid-beard/plugin-blogtng
 /**
  * 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>');
 }