From 3ba13abc34c5d9c0278ad45a846b7c56158337c5 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 19 Oct 2017 12:19:54 +0200 Subject: [PATCH 01/21] Update en.json --- bl-plugins/disqus/languages/en.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bl-plugins/disqus/languages/en.json b/bl-plugins/disqus/languages/en.json index ff728f5a..b4b6f9af 100644 --- a/bl-plugins/disqus/languages/en.json +++ b/bl-plugins/disqus/languages/en.json @@ -4,5 +4,7 @@ "name": "Disqus", "description": "Disqus is a comment hosting service for web sites.
It's necessary to be registered on Disqus to use this service." }, - "disqus-shortname": "Disqus shortname" + "disqus-shortname": "Disqus shortname", + "enable-disqus-on-pages": "Disqus on static", + "enable-disqus-on-posts": "Disqus on published" } From c0a6caac902d4439ed4eb90288fe8e39dae71101 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 19 Oct 2017 12:20:26 +0200 Subject: [PATCH 02/21] Update ru_RU.json --- bl-plugins/disqus/languages/ru_RU.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bl-plugins/disqus/languages/ru_RU.json b/bl-plugins/disqus/languages/ru_RU.json index 2dd66f3b..f96a82f1 100644 --- a/bl-plugins/disqus/languages/ru_RU.json +++ b/bl-plugins/disqus/languages/ru_RU.json @@ -5,7 +5,6 @@ "description": "Disqus это сервис комментариев для сайтов и блогов. Необходимо быть зарегистрированным на Disqus.com перед использованием плагина." }, "disqus-shortname": "Disqus shortname", - "enable-disqus-on-pages": "Включить Disqus на страницах", - "enable-disqus-on-posts": "Включить Disqus в записях", - "enable-disqus-on-default-home-page": "Включить Disqus на домашней странице" + "enable-disqus-on-pages": "Disqus на страницах", + "enable-disqus-on-posts": "Disqus в записях" } From 6e66fc28a4f67745d621b4709cd793826274b6fe Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 19 Oct 2017 12:29:07 +0200 Subject: [PATCH 03/21] Update plugin.php --- bl-plugins/disqus/plugin.php | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/bl-plugins/disqus/plugin.php b/bl-plugins/disqus/plugin.php index d5973604..e5f253f7 100644 --- a/bl-plugins/disqus/plugin.php +++ b/bl-plugins/disqus/plugin.php @@ -5,7 +5,9 @@ class pluginDisqus extends Plugin { public function init() { $this->dbFields = array( - 'shortname'=>'' + 'shortname'=>'', + 'enablePages'=>false, + 'enablePosts'=>true ); } @@ -14,24 +16,44 @@ class pluginDisqus extends Plugin { global $Language; $html = '
'; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
'; + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + return $html; } public function pageEnd() { global $pages; - global $Url; + global $Url, $Page; $page = $pages[0]; if (empty($page)) { return false; } - if ( (!$Url->notFound()) && ($Url->whereAmI()=='page') && ($page->allowComments()) ) { + if ( !$Url->notFound() && + ( + ($this->getDbField('enablePosts') && $Page->status()=='published') || + ($this->getDbField('enablePages') && $Page->status()=='static') + ) && + $page->allowComments() ) { $html = '
'; $html .= ' + '.PHP_EOL; + } + return $html; } @@ -75,22 +89,4 @@ class pluginGoogle extends Plugin { return false; } - public function siteBodyEnd() - { - // Google Analytics - if ($this->getValue('google-analytics-tracking-id')) { - $html = PHP_EOL.''.PHP_EOL; - $html .= ' - - '.PHP_EOL; - return $html; - } - return false; - } } \ No newline at end of file From ec51cb39ac15c5474493a1236e80a21c7433065e Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sun, 22 Oct 2017 16:39:00 +0200 Subject: [PATCH 18/21] Delete ru_RU.json wrong location --- bl-plugins/tags/ru_RU.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 bl-plugins/tags/ru_RU.json diff --git a/bl-plugins/tags/ru_RU.json b/bl-plugins/tags/ru_RU.json deleted file mode 100644 index 703e7e2e..00000000 --- a/bl-plugins/tags/ru_RU.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "plugin-data": - { - "name": "Список тэгов", - "description": "Отображает список тэгов на боковой панели." - } -} From 26da548a67ff80d6d3cfeae404caafca3c57d9e6 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sun, 22 Oct 2017 16:39:16 +0200 Subject: [PATCH 19/21] Create ru_RU.json --- bl-plugins/tags/languages/ru_RU.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bl-plugins/tags/languages/ru_RU.json diff --git a/bl-plugins/tags/languages/ru_RU.json b/bl-plugins/tags/languages/ru_RU.json new file mode 100644 index 00000000..703e7e2e --- /dev/null +++ b/bl-plugins/tags/languages/ru_RU.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "Список тэгов", + "description": "Отображает список тэгов на боковой панели." + } +} From 75e06d316a101eff42155f21a669b36025449ae6 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Sun, 22 Oct 2017 16:39:35 +0200 Subject: [PATCH 20/21] Delete ru-RU.json wrong name --- bl-plugins/tags/languages/ru-RU.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 bl-plugins/tags/languages/ru-RU.json diff --git a/bl-plugins/tags/languages/ru-RU.json b/bl-plugins/tags/languages/ru-RU.json deleted file mode 100644 index 17c5dc26..00000000 --- a/bl-plugins/tags/languages/ru-RU.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "plugin-data": - { - "name": "Список тэгов", - "description": "Отображает тэги на боковой панели." - } -} From c94c919f940d8cab71e7a548e88d80f1064df91f Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 22 Oct 2017 21:28:44 +0200 Subject: [PATCH 21/21] cleaning code --- bl-kernel/boot/site.php | 7 +++---- index.php | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bl-kernel/boot/site.php b/bl-kernel/boot/site.php index c021e1a4..87eef209 100644 --- a/bl-kernel/boot/site.php +++ b/bl-kernel/boot/site.php @@ -16,15 +16,14 @@ include(PATH_RULES.'99.themes.php'); Theme::plugins('beforeSiteLoad'); // Theme init.php -if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php') ) { +if (Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'init.php')) { include(PATH_THEMES.$Site->theme().DS.'init.php'); } // Theme HTML -if( Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'index.php') ) { +if (Sanitize::pathFile(PATH_THEMES, $Site->theme().DS.'index.php')) { include(PATH_THEMES.$Site->theme().DS.'index.php'); -} -else { +} else { $Language->p('Please check your theme configuration'); } diff --git a/index.php b/index.php index 1a6457d2..cd288a5c 100644 --- a/index.php +++ b/index.php @@ -8,8 +8,7 @@ */ // Check if Bludit is installed -if( !file_exists('bl-content/databases/site.php') ) -{ +if (!file_exists('bl-content/databases/site.php')) { header('Location:./install.php'); exit('Install Bludit first.'); }