From f3666e5258ecfe0f512fdbf1511cc5fbb9e95395 Mon Sep 17 00:00:00 2001 From: domovoy-77 Date: Tue, 28 Apr 2015 16:22:35 +0300 Subject: [PATCH 1/4] =?UTF-8?q?=D0=9A=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20"?= =?UTF-8?q?=D0=9E=D1=82=D0=BC=D0=B5=D0=BD=D0=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Настроена кнопка "Отмена" в редактировании статьи --- controller/edit.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controller/edit.php b/controller/edit.php index 360a690..1f2ae10 100644 --- a/controller/edit.php +++ b/controller/edit.php @@ -172,6 +172,11 @@ public function edit_article() } } + if ($cancel) + { + redirect(append_sid("{$this->phpbb_root_path}knowlegebase/category",'id=' . $cat_id . '')); + } + if ($submit and !sizeof($error)) { $uid = $bitfield = $options = ''; From 37954478e31327259eda09fd502dee0a3b1b94dc Mon Sep 17 00:00:00 2001 From: domovoy-77 Date: Tue, 28 Apr 2015 16:32:23 +0300 Subject: [PATCH 2/4] =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B8=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Добавлен вывод названия категории блок просмотра списка категорий/статей 2. Добавлено описание статьи в список просмотра категории 3. Исправлен вывод описания категории (не помещался в ячейку) --- controller/category.php | 5 ++++- styles/prosilver/template/kb_cat_body.html | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/controller/category.php b/controller/category.php index 74815d1..b889c33 100644 --- a/controller/category.php +++ b/controller/category.php @@ -52,7 +52,7 @@ public function cat() $kb_config = $this->kb->obtain_kb_config(); $per_page = $kb_config['articles_per_page']; - $sql = 'SELECT category_id + $sql = 'SELECT category_id, category_name FROM '. KB_CAT_TABLE .' WHERE category_id = '.$cat_id.''; $result = $this->db->sql_query($sql); @@ -64,6 +64,8 @@ public function cat() trigger_error ('CAT_NO_EXISTS'); } + $this->template->assign_block_vars('par_cat_row', array( 'PAR_CAT_NAME' => $row['category_name']) ); + $sql = 'SELECT COUNT(article_id) as article_count FROM '. ARTICLES_TABLE .' WHERE article_category_id = '.$cat_id.' @@ -113,6 +115,7 @@ public function cat() $this->template->assign_block_vars('cat_row', array( 'CAT_ID' => $cat_row['category_id'], 'CAT_NAME' => $cat_row['category_name'], + 'CAT_DESCRIPTION' => $cat_row['category_details'], 'U_CAT' => append_sid("{$this->phpbb_root_path}knowlegebase/category", "id=$cat_row[category_id]"), 'ARTICLES' => $cat_row['number_articles'], 'SUBCATS' => $this->kb->get_cat_list ($cat_row['parent_id'], $exclude_cats), diff --git a/styles/prosilver/template/kb_cat_body.html b/styles/prosilver/template/kb_cat_body.html index caa8724..26b0bc1 100644 --- a/styles/prosilver/template/kb_cat_body.html +++ b/styles/prosilver/template/kb_cat_body.html @@ -10,8 +10,10 @@

  • -
    {L_CATEGORY}
    + +
    {L_CATEGORY} - {par_cat_row.PAR_CAT_NAME}
    {L_ARTICLES}
    +
@@ -20,9 +22,11 @@

  • +
    {cat_row.CAT_NAME} -
    {cat_row.CAT_DESCRIPTION} +
    {cat_row.CAT_DESCRIPTION}
    {cat_row.SUBCATS} +
    {cat_row.ARTICLES}
    @@ -79,7 +83,7 @@

    - {art_row.ARTICLE}
    • {L_NEED_APPROOVE}
    + {art_row.ARTICLE}
    {art_row.ARTICLE_DESCRIPTION}
    • {L_NEED_APPROOVE}
    {art_row.ARTICLE_AUTHOR} {art_row.ARTICLE_DATE} From bd7ff123a7db66abb2e04c53c7a54e5fd5c7e16c Mon Sep 17 00:00:00 2001 From: domovoy-77 Date: Tue, 28 Apr 2015 16:33:24 +0300 Subject: [PATCH 3/4] =?UTF-8?q?=D0=A1=D1=82=D0=B0=D1=82=D1=8C=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Увеличено поле описания --- styles/prosilver/template/kb_post_body.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/prosilver/template/kb_post_body.html b/styles/prosilver/template/kb_post_body.html index 786d0cc..76fa9b0 100644 --- a/styles/prosilver/template/kb_post_body.html +++ b/styles/prosilver/template/kb_post_body.html @@ -31,7 +31,7 @@

    {L_POST_A}

    -
    +
    From 3b5ee5ea29c05c5bf3dffd28e09fefb17a9bb9d5 Mon Sep 17 00:00:00 2001 From: domovoy-77 Date: Tue, 28 Apr 2015 16:36:23 +0300 Subject: [PATCH 4/4] =?UTF-8?q?=D0=A1=D0=BE=D1=80=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавлена сортировка категорий по left_id --- inc/functions_kb.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/functions_kb.php b/inc/functions_kb.php index 1f2bd4b..84e53f1 100644 --- a/inc/functions_kb.php +++ b/inc/functions_kb.php @@ -261,7 +261,8 @@ public function get_cat_info($category_id) { $sql = 'SELECT * FROM ' . KB_CAT_TABLE . " - WHERE category_id = $category_id"; + WHERE category_id = $category_id" . ' + ORDER BY left_id ASC'; $result = $this->db->sql_query($sql); $row = $this->db->sql_fetchrow($result); $this->db->sql_freeresult($result);