public function ShowById($id, $list = 1) { $mode_txt = 'Отдельный образ'; $gender_txt = lng('NOT_SET'); $skins = ''; $skins_count = 1; $skin = new SPItem($id, $this->st_subdir); if (!$skin->Exist()) { $html_skin_list = 'Скин удален'; } else { $skins = $skin->Show(false, $full_info = true); ob_start(); include $this->GetView('skin_container.html'); $html_skin_list = ob_get_clean(); if ($this->discus) { loadTool('comment.class.php'); $comments = new CommentList($skin, $this->base_url . '&cid=' . $id, 'news/comments/'); $html_skin_list .= $comments->Show($list); $html_skin_list .= $comments->ShowAddForm(); } } ob_start(); include $this->GetView('main.html'); return ob_get_clean(); }
public function ShowFull($comment_list = false) { global $config, $bd_names; $link = Rewrite::GetURL(array('news', $this->id), array('', 'id')); $item_exist = $this->Exist(); $title = $item_exist ? $this->title() : 'Новость не найдена'; $category_id = $item_exist ? $this->categoryID() : 0; $category = $item_exist ? CategoryManager::GetNameByID($category_id) : 'Без категории'; $category_link = Rewrite::GetURL(array('category', $category_id), array('', 'cid')); ob_start(); include $this->GetView('news_full_header.html'); $html = ob_get_clean(); $html .= $this->Show(true); if (!$item_exist) { return $html; } loadTool('comment.class.php'); $comments = new CommentList($this, $this->link_work, $this->st_subdir . 'comments/'); $html .= $comments->Show($comment_list); if ($this->discus) { $html .= $comments->ShowAddForm(); } return $html; }