From 5559ac32fbc1c53dea00ff02e51dfb9d6df6ca12 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 5 Jun 2017 18:52:13 +0200 Subject: [PATCH] Bug fixes, developer area, google plugin updated, rss and sitemap updated --- bl-kernel/abstract/plugin.class.php | 2 ++ bl-kernel/admin/themes/default/index.php | 2 +- bl-kernel/admin/views/new-page.php | 2 +- bl-plugins/categories/plugin.php | 24 +++++++++++++++++------- 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/bl-kernel/abstract/plugin.class.php b/bl-kernel/abstract/plugin.class.php index a546b9b7..aeaa8de4 100644 --- a/bl-kernel/abstract/plugin.class.php +++ b/bl-kernel/abstract/plugin.class.php @@ -60,6 +60,8 @@ class Plugin { foreach($this->dbFields as $key=>$value) { if( isset($args[$key]) ) { $value = Sanitize::html( $args[$key] ); + if($value==='false') { $value = false; } + elseif($value==='true') { $value = true; } settype($value, gettype($this->dbFields[$key])); $this->db[$key] = $value; } diff --git a/bl-kernel/admin/themes/default/index.php b/bl-kernel/admin/themes/default/index.php index 3e1131d3..a4754067 100644 --- a/bl-kernel/admin/themes/default/index.php +++ b/bl-kernel/admin/themes/default/index.php @@ -103,7 +103,7 @@ $(document).ready(function() {
  • p('Publish') ?>
  • > - p('New page') ?> + p('New content') ?>
  • p('Manage') ?>
  • diff --git a/bl-kernel/admin/views/new-page.php b/bl-kernel/admin/views/new-page.php index cee31e52..b18006dd 100644 --- a/bl-kernel/admin/views/new-page.php +++ b/bl-kernel/admin/views/new-page.php @@ -1,6 +1,6 @@ $L->g('New page'), 'icon'=>'file-text-o')); +HTML::title(array('title'=>$L->g('New content'), 'icon'=>'file-text-o')); HTML::formOpen(array('class'=>'uk-form-stacked')); diff --git a/bl-plugins/categories/plugin.php b/bl-plugins/categories/plugin.php index a089f0f9..d2bfba8d 100644 --- a/bl-plugins/categories/plugin.php +++ b/bl-plugins/categories/plugin.php @@ -6,7 +6,8 @@ class pluginCategories extends Plugin { { // Fields and default values for the database of this plugin $this->dbFields = array( - 'label'=>'Categories' + 'label'=>'Categories', + 'showCero'=>false ); } @@ -20,6 +21,12 @@ class pluginCategories extends Plugin { $html .= ''; $html .= ''; + $html .= '
    '; + $html .= ''; + $html .= 'getValue('showCero')?'checked':'').'>'; + $html .= ''; + $html .= '
    '; + return $html; } @@ -37,12 +44,15 @@ class pluginCategories extends Plugin { // By default the database of categories are alphanumeric sorted foreach( $dbCategories->db as $key=>$fields ) { - $html .= '
  • '; - $html .= ''; - $html .= $fields['name']; - $html .= ' ('.count($fields['list']).')'; - $html .= ''; - $html .= '
  • '; + $count = count($fields['list']); + if($this->getValue('showCero') || $count>0) { + $html .= '
  • '; + $html .= ''; + $html .= $fields['name']; + $html .= ' ('.count($fields['list']).')'; + $html .= ''; + $html .= '
  • '; + } } $html .= '';