Пример #1
0
 /**
  * 게시글의 댓글 개수를 반환한다.
  * @param string $prefix
  * @param string $endfix
  * @return string
  */
 public function getCommentsCount($prefix = '(', $endfix = ')')
 {
     if ($this->uid) {
         $meta = new KBoardMeta($this->board_id);
         if ($meta->comments_plugin_id && $meta->use_comments_plugin) {
             $url = new KBUrl();
             return '<span class="cosmosfarm-comments-plugin-count" data-url="' . $url->getCommentsPluginURLWithUID($this->uid) . '"></span>';
         } else {
             if ($this->comment) {
                 return "{$prefix}{$this->comment}{$endfix}";
             }
         }
     }
     return '';
 }