示例#1
0
 /**
  * Выводит все комментарии на страницу
  * 
  * @return string HTML код 
  */
 public function render()
 {
     $user_is_subscribe_on_topic = commune::isCommuneTopicSubscribed($this->_resource_id, get_uid(false));
     $uid = get_uid(false);
     $comments = $this->getData();
     $this->msg_num = count($comments);
     $comments = array('children' => array2tree($comments, 'id', 'parent_id', true));
     $comments_html = $this->msg_nodes($comments);
     if (!$GLOBALS['top']['deleted_id']) {
         $form = $this->renderForm();
     }
     ob_start();
     include $this->tpl_path . $this->templates['main'];
     return ob_get_clean();
 }