From d21c3932709f5e3b8a3ed761ab4228d45c83b78a Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:05:11 +0100 Subject: [PATCH 01/31] Create fa_IR.json --- bl-plugins/navigation/languages/fa_IR.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bl-plugins/navigation/languages/fa_IR.json diff --git a/bl-plugins/navigation/languages/fa_IR.json b/bl-plugins/navigation/languages/fa_IR.json new file mode 100644 index 00000000..5ad67280 --- /dev/null +++ b/bl-plugins/navigation/languages/fa_IR.json @@ -0,0 +1,10 @@ +{ + "plugin-data": + { + "name": "ناوبری", + "description": "منوی ناوبری به همراه والد و صفحات پایین تر برای نوار کناری." + }, + "home-link": "لینک فهرست", + "show-the-home-link-on-the-sidebar": "نمایش لینک فهرست در نوار کناری.", + "amount-of-items": "تعداد آیتم ها" +} From 3ee994e77d8d4ef96f85597610fcf46c1c3808fe Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:06:24 +0100 Subject: [PATCH 02/31] Create fa_IR.json --- bl-plugins/opengraph/languages/fa_IR.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bl-plugins/opengraph/languages/fa_IR.json diff --git a/bl-plugins/opengraph/languages/fa_IR.json b/bl-plugins/opengraph/languages/fa_IR.json new file mode 100644 index 00000000..38b491e3 --- /dev/null +++ b/bl-plugins/opengraph/languages/fa_IR.json @@ -0,0 +1,9 @@ +{ + "plugin-data": + { + "name": "Open Graph", + "description": "پروتکل Open Graph یک صفحه وب را به یک شیء غنی در یک نمودار اجتماعی تبدیل می کند ." + }, + "set-a-default-image-for-content": "قراردادن یک تصویر پیش‌فرض برای محتوایی که تصویر ندارد.", + "set-your-facebook-app-id": "قراردادن شناسه Facebook App." +} From a2b326f6bc6a2449a56c33c10eed06794b9a135c Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:07:20 +0100 Subject: [PATCH 03/31] Create fa_IR.json --- bl-plugins/remote-content/languages/fa_IR.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bl-plugins/remote-content/languages/fa_IR.json diff --git a/bl-plugins/remote-content/languages/fa_IR.json b/bl-plugins/remote-content/languages/fa_IR.json new file mode 100644 index 00000000..4f81737e --- /dev/null +++ b/bl-plugins/remote-content/languages/fa_IR.json @@ -0,0 +1,11 @@ +{ + "plugin-data": + { + "name": "محتوای راه دور", + "description": "این افزونه یک راه آسان برای داشتن محتوای سایت شما در Github یا مشابه دارد و به نوبه خود، با بلودیت شما هماهنگ شده است ." + }, + "webhook": "Webhook", + "source": "منبع", + "try-webhook": "امتحان webhook", + "complete-url-of-the-zip-file": "آدرس وب کامل فایل زیپ." +} From 133f0722668c5ca07b76179b8f4a1a84a445bd34 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:08:20 +0100 Subject: [PATCH 04/31] Create fa_IR.json --- bl-plugins/robots/languages/fa_IR.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 bl-plugins/robots/languages/fa_IR.json diff --git a/bl-plugins/robots/languages/fa_IR.json b/bl-plugins/robots/languages/fa_IR.json new file mode 100644 index 00000000..4f81737e --- /dev/null +++ b/bl-plugins/robots/languages/fa_IR.json @@ -0,0 +1,11 @@ +{ + "plugin-data": + { + "name": "محتوای راه دور", + "description": "این افزونه یک راه آسان برای داشتن محتوای سایت شما در Github یا مشابه دارد و به نوبه خود، با بلودیت شما هماهنگ شده است ." + }, + "webhook": "Webhook", + "source": "منبع", + "try-webhook": "امتحان webhook", + "complete-url-of-the-zip-file": "آدرس وب کامل فایل زیپ." +} From 41c0bb062cc421e9bdd8b9d98c92f43ae8aa0f2f Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:09:24 +0100 Subject: [PATCH 05/31] Create fa_IR.json --- bl-plugins/rss/languages/fa_IR.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bl-plugins/rss/languages/fa_IR.json diff --git a/bl-plugins/rss/languages/fa_IR.json b/bl-plugins/rss/languages/fa_IR.json new file mode 100644 index 00000000..d587638e --- /dev/null +++ b/bl-plugins/rss/languages/fa_IR.json @@ -0,0 +1,9 @@ +{ + "plugin-data": + { + "name": "خوراک RSS", + "description": "این پلاگین برای وبسایت شما یک خوراک RSS تولید میکند.
خوراک آدرس وب https://example.com/rss.xml دارد" + }, + "amount-of-items-to-show-on-the-feed": "تعداد مطالب جهت نمایش در خوراک.", + "rss-url": "آدرس وب RSS" +} From a23221cce84a08e86af09dce9c23393beb1353f1 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:10:26 +0100 Subject: [PATCH 06/31] Create fa_IR.json --- bl-plugins/search/languages/fa_IR.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bl-plugins/search/languages/fa_IR.json diff --git a/bl-plugins/search/languages/fa_IR.json b/bl-plugins/search/languages/fa_IR.json new file mode 100644 index 00000000..c144316e --- /dev/null +++ b/bl-plugins/search/languages/fa_IR.json @@ -0,0 +1,9 @@ +{ + "plugin-data": + { + "name": "جستجو", + "description": "برای جستجو از طریق محتوای سایت خود، کادر جستجو را برای کاربران خود فراهم کنید." + }, + "search": "جستجو", + "show-button-search": "نمایش دکمه جستجو" +} From fddd4ec921f4e47b539d932af673d0e0024da4da Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:12:10 +0100 Subject: [PATCH 07/31] Create fa_IR.json --- bl-plugins/simple-stats/languages/fa_IR.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 bl-plugins/simple-stats/languages/fa_IR.json diff --git a/bl-plugins/simple-stats/languages/fa_IR.json b/bl-plugins/simple-stats/languages/fa_IR.json new file mode 100644 index 00000000..228c91d3 --- /dev/null +++ b/bl-plugins/simple-stats/languages/fa_IR.json @@ -0,0 +1,12 @@ +{ + "plugin-data": + { + "name": "آمار ساده", + "description": "نمایش روزانه بازدیدکنندگان در پیش خوان شما." + }, + "visits": "بازدیدها", + "visits-today": "بازدیدهای امروز", + "unique-visitors-today": "بازدید کنندگان منحصر به فرد امروز", + "chart": "چارت", + "table": "جدول" +} From 08be96e504b6c96ecdb2f0213db30e95f9b8a0ee Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:13:21 +0100 Subject: [PATCH 08/31] Create fa_IR.json --- bl-plugins/simplemde/languages/fa_IR.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 bl-plugins/simplemde/languages/fa_IR.json diff --git a/bl-plugins/simplemde/languages/fa_IR.json b/bl-plugins/simplemde/languages/fa_IR.json new file mode 100644 index 00000000..85d1c74c --- /dev/null +++ b/bl-plugins/simplemde/languages/fa_IR.json @@ -0,0 +1,12 @@ +{ + "plugin-data": + { + "name": "SimpleMDE", + "description": "ویرایشگر Markdown، رابط ساده برای ایجاد زبان markup." + }, + "toolbar": "نوار ابزار", + "tab-size": "اندازه زبانه", + "autosave": "ذخیره خودکار", + "spell-checker": "غلط گیر", + "content-here-supports-markdown-and-html-code": "محتوای اینجا از Markdown و کد HTML پشتیبانی می کند" +} From 72156aa72c56700fdb6cda54dbb2a3fe16d9552f Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:14:24 +0100 Subject: [PATCH 09/31] Create fa_IR.json --- bl-plugins/sitemap/languages/fa_IR.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bl-plugins/sitemap/languages/fa_IR.json diff --git a/bl-plugins/sitemap/languages/fa_IR.json b/bl-plugins/sitemap/languages/fa_IR.json new file mode 100644 index 00000000..eae5220d --- /dev/null +++ b/bl-plugins/sitemap/languages/fa_IR.json @@ -0,0 +1,10 @@ +{ + "plugin-data": + { + "name": "نقشه سایت", + "description": "این پلاگین یک فایل sitemap.xml تولید می کند، که لیستی از صفحات وبسایت شما را ارائه می کند، این پلاگین به موتورهای جستجو کمک میکند تا محتوای شما را سازماندهی و پالایش کند." + }, + "sitemap-url": "آدرس وب نقشه سایت", + "notifies-google-when-you-created": "اطلاع رسانی به Google هنگامی که شما محتوایی بر روی وبسایت خود ایجاد، ویرایش و یا حذف می کنید.", + "notifies-bing-when-you-created": "اطلاع رسانی به Bing هنگامی که شما محتوایی بر روی وبسایت خود ایجاد، ویرایش و یا حذف می کنید." +} From 142635c9befda31b56e238b7c3d7de80cc8eb6cc Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:16:04 +0100 Subject: [PATCH 10/31] Create fa_IR.json --- bl-plugins/static-pages/languages/fa_IR.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bl-plugins/static-pages/languages/fa_IR.json diff --git a/bl-plugins/static-pages/languages/fa_IR.json b/bl-plugins/static-pages/languages/fa_IR.json new file mode 100644 index 00000000..77bdfce5 --- /dev/null +++ b/bl-plugins/static-pages/languages/fa_IR.json @@ -0,0 +1,9 @@ +{ + "plugin-data": + { + "name": "صفحات استاتیک", + "description": "منوی ناوبری به همراه صفحات استاتیک." + }, + "home-link": "لینک فهرست", + "show-the-home-link-on-the-sidebar": "نمایش لینک فهرست در نوار کناری." +} From d8c4a72a33e89f9fdd6f1cc55a446ef3cf81d443 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:17:11 +0100 Subject: [PATCH 11/31] Create fa_IR.json --- bl-plugins/tags/languages/fa_IR.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bl-plugins/tags/languages/fa_IR.json diff --git a/bl-plugins/tags/languages/fa_IR.json b/bl-plugins/tags/languages/fa_IR.json new file mode 100644 index 00000000..86982fad --- /dev/null +++ b/bl-plugins/tags/languages/fa_IR.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "لیست برچسب ها", + "description": "نمایش تمام برچسب ها در نوار کناری." + } +} From b5af78384527f8220342be889d17e6ec77b694f9 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:18:08 +0100 Subject: [PATCH 12/31] Create fa_IR.json --- bl-plugins/tinymce/languages/fa_IR.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bl-plugins/tinymce/languages/fa_IR.json diff --git a/bl-plugins/tinymce/languages/fa_IR.json b/bl-plugins/tinymce/languages/fa_IR.json new file mode 100644 index 00000000..80351182 --- /dev/null +++ b/bl-plugins/tinymce/languages/fa_IR.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "TinyMCE", + "description": "ویرایشگر HTML برای فرمت بندی محتوا. برای کاربرانی که تمایل ندارند با کد Markdown کار کنند پیشنهاد می‌شود." + } +} From a9e9c6934a6693e20d84996705086164e4913670 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:19:10 +0100 Subject: [PATCH 13/31] Create fa_IR.json --- bl-plugins/twitter-cards/languages/fa_IR.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bl-plugins/twitter-cards/languages/fa_IR.json diff --git a/bl-plugins/twitter-cards/languages/fa_IR.json b/bl-plugins/twitter-cards/languages/fa_IR.json new file mode 100644 index 00000000..e0391f72 --- /dev/null +++ b/bl-plugins/twitter-cards/languages/fa_IR.json @@ -0,0 +1,8 @@ +{ + "plugin-data": + { + "name": "Twitter Cards", + "description": "بوسیله Twitter Cards ، شما می‌توانید تصاویر، ویدئو و تجربیات رسانه ای را به توئیت پیوست کرده، و با اینکار کمکی می‌شود تا ترافیک بیشتری به سمت وبسایت شما روانه شود." + }, + "default-image": "تصویر پیش‌فرض" +} From fc56f55a138ea2f31bfcce3d9cf0ea56157c68a6 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:20:39 +0100 Subject: [PATCH 14/31] Create fa_IR.json --- bl-plugins/version/languages/fa_IR.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bl-plugins/version/languages/fa_IR.json diff --git a/bl-plugins/version/languages/fa_IR.json b/bl-plugins/version/languages/fa_IR.json new file mode 100644 index 00000000..75a709d4 --- /dev/null +++ b/bl-plugins/version/languages/fa_IR.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "نسخه", + "description": "نمایش نسخه جاری در نوار کناری پنل مدیریت، و بررسی دوره ای برای نسخه های جدید بلودیت." + } +} From 2adc555846e01565f0505c5e219cde0dbe5ec6f8 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:33:35 +0100 Subject: [PATCH 15/31] Update de_CH.json --- bl-plugins/disqus/languages/de_CH.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bl-plugins/disqus/languages/de_CH.json b/bl-plugins/disqus/languages/de_CH.json index 1f47bbd5..5ccdbe8f 100644 --- a/bl-plugins/disqus/languages/de_CH.json +++ b/bl-plugins/disqus/languages/de_CH.json @@ -4,9 +4,9 @@ "name": "Disqus", "description": "Disqus ist eine Kommentar-Plattform für Websites. Um das Plugin verwenden zu können, muss ein Konto bei Disqus eingerichtet werden." }, - "disqus-shortname": "Disqus shortname", - "enable-disqus-on-pages": "Disqus on pages", - "enable-disqus-on-static-pages": "Disqus on static pages", - "enable-disqus-on-sticky-pages": "Disqus on sticky pages", - "get-the-shortname-from-the-disqus-general-settings": "Get the shortname from the Disqus general settings" -} \ No newline at end of file + "disqus-shortname": "Disqus-Kurzname (Shortname)", + "enable-disqus-on-pages": "Disqus auf Seiten", + "enable-disqus-on-static-pages": "Disqus auf statischen Seiten", + "enable-disqus-on-sticky-pages": "Disqus bei fixierten Inhalten", + "get-the-shortname-from-the-disqus-general-settings": "Der Kurzname wird bei Disqus unter \"Settings\" > \"General\" angezeigt." +} From 300e0a27d6d366d94625484b20d1c25249745072 Mon Sep 17 00:00:00 2001 From: Edi Date: Mon, 25 Feb 2019 12:34:04 +0100 Subject: [PATCH 16/31] Update de_DE.json --- bl-plugins/disqus/languages/de_DE.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bl-plugins/disqus/languages/de_DE.json b/bl-plugins/disqus/languages/de_DE.json index 1f47bbd5..5ccdbe8f 100644 --- a/bl-plugins/disqus/languages/de_DE.json +++ b/bl-plugins/disqus/languages/de_DE.json @@ -4,9 +4,9 @@ "name": "Disqus", "description": "Disqus ist eine Kommentar-Plattform für Websites. Um das Plugin verwenden zu können, muss ein Konto bei Disqus eingerichtet werden." }, - "disqus-shortname": "Disqus shortname", - "enable-disqus-on-pages": "Disqus on pages", - "enable-disqus-on-static-pages": "Disqus on static pages", - "enable-disqus-on-sticky-pages": "Disqus on sticky pages", - "get-the-shortname-from-the-disqus-general-settings": "Get the shortname from the Disqus general settings" -} \ No newline at end of file + "disqus-shortname": "Disqus-Kurzname (Shortname)", + "enable-disqus-on-pages": "Disqus auf Seiten", + "enable-disqus-on-static-pages": "Disqus auf statischen Seiten", + "enable-disqus-on-sticky-pages": "Disqus bei fixierten Inhalten", + "get-the-shortname-from-the-disqus-general-settings": "Der Kurzname wird bei Disqus unter \"Settings\" > \"General\" angezeigt." +} From 6b1020f0c47a4dd84af6afa63b4d1df69549f8a6 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 25 Feb 2019 16:32:00 +0100 Subject: [PATCH 17/31] check if autosave exists --- bl-kernel/functions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 19b94522..43d7bf82 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -325,10 +325,10 @@ function editPage($args) { // Check if the autosave page exists for this new page and delete it if (isset($args['uuid'])) { - $pageKey = $pages->getByUUID('autosave-'.$args['uuid']); - if (!empty($pageKey)) { - Log::set('Function editPage()'.LOG_SEP.'Autosave deleted for '.$args['title'], LOG_TYPE_INFO); - deletePage($pageKey); + $autosaveKey = $pages->getByUUID('autosave-'.$args['uuid']); + if ($autosaveKey) { + Log::set('Function editPage()'.LOG_SEP.'Autosave deleted for '.$autosaveKey, LOG_TYPE_INFO); + deletePage($autosaveKey); } } @@ -355,7 +355,7 @@ function editPage($args) { // Add to syslog $syslog->add(array( 'dictionaryKey'=>'content-edited', - 'notes'=>$args['title'] + 'notes'=>empty($args['title'])?$key:$args['title'] )); return $key; From 75ec5f32f3bd6dcd57e1cbc8199503f481719658 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 25 Feb 2019 16:32:29 +0100 Subject: [PATCH 18/31] include slug for the API --- bl-kernel/pagex.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bl-kernel/pagex.class.php b/bl-kernel/pagex.class.php index a4785eef..1cc06334 100644 --- a/bl-kernel/pagex.class.php +++ b/bl-kernel/pagex.class.php @@ -266,6 +266,7 @@ class Page { $tmp['contentRaw'] = $this->contentRaw(true); // No Markdown parsed $tmp['description'] = $this->description(); $tmp['type'] = $this->type(); + $tmp['slug'] = $this->slug(); $tmp['date'] = $this->dateRaw(); $tmp['dateUTC'] = Date::convertToUTC($this->dateRaw(), DB_DATE_FORMAT, DB_DATE_FORMAT); $tmp['permalink'] = $this->permalink(true); From ee31f42424445d665f5a48bcb850325d830964f4 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 25 Feb 2019 16:32:47 +0100 Subject: [PATCH 19/31] Method for get the token --- bl-plugins/api/plugin.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bl-plugins/api/plugin.php b/bl-plugins/api/plugin.php index d08d36b9..f004dac7 100644 --- a/bl-plugins/api/plugin.php +++ b/bl-plugins/api/plugin.php @@ -15,6 +15,11 @@ class pluginAPI extends Plugin { ); } + public function getToken() + { + return $this->getValue('token'); + } + public function form() { global $L; @@ -298,12 +303,12 @@ class pluginAPI extends Plugin { global $pages; // Parameters and the default values - $published = (isset($args['published'])?$args['published']:true); - $static = (isset($args['static'])?$args['static']:false); - $draft = (isset($args['draft'])?$args['draft']:false); - $sticky = (isset($args['sticky'])?$args['sticky']:false); - $scheduled = (isset($args['scheduled'])?$args['scheduled']:false); - $untagged = (isset($args['untagged'])?$args['untagged']:false); + $published = (isset($args['published'])?$args['published']=='true':true); + $static = (isset($args['static'])?$args['static']=='true':false); + $draft = (isset($args['draft'])?$args['draft']=='true':false); + $sticky = (isset($args['sticky'])?$args['sticky']=='true':false); + $scheduled = (isset($args['scheduled'])?$args['scheduled']=='true':false); + $untagged = (isset($args['untagged'])?$args['untagged']=='true':false); $numberOfItems = $this->getValue('numberOfItems'); $pageNumber = 1; From 86fa5bd2b349c3f9bc6348eb02837eba2320d2d2 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Mon, 25 Feb 2019 16:33:29 +0100 Subject: [PATCH 20/31] filter tagg --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 70b8ca9a..3b2f810e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ bl-plugins/yandex-metrica/ bl-plugins/domain-migrator/ bl-plugins/tail-writer/ bl-kernel/bludit.pro.php -bl-kernel/admin/themes/grizzly/* +bl-kernel/admin/themes/gris/* bl-themes/docs bl-themes/docsx bl-themes/editorial @@ -24,3 +24,4 @@ bl-themes/hyperspace bl-themes/striped bl-themes/log bl-themes/micro +bl-themes/tagg From 820b1c72078d56e71d087d866c31d4f4ce434fd1 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 26 Feb 2019 00:47:34 +0100 Subject: [PATCH 21/31] include tags in json function --- bl-kernel/admin/themes/gris | 1 + bl-kernel/pagex.class.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 160000 bl-kernel/admin/themes/gris diff --git a/bl-kernel/admin/themes/gris b/bl-kernel/admin/themes/gris new file mode 160000 index 00000000..fe85fc43 --- /dev/null +++ b/bl-kernel/admin/themes/gris @@ -0,0 +1 @@ +Subproject commit fe85fc4343716d558745d2236a456761756e6a08 diff --git a/bl-kernel/pagex.class.php b/bl-kernel/pagex.class.php index 1cc06334..252eb785 100644 --- a/bl-kernel/pagex.class.php +++ b/bl-kernel/pagex.class.php @@ -255,7 +255,7 @@ class Page { return ''; } // Return string with tags separated by comma. - return implode(', ', $tags); + return implode(',', $tags); } public function json($returnsArray=false) @@ -268,6 +268,7 @@ class Page { $tmp['type'] = $this->type(); $tmp['slug'] = $this->slug(); $tmp['date'] = $this->dateRaw(); + $tmp['tags'] = $this->tags(false); $tmp['dateUTC'] = Date::convertToUTC($this->dateRaw(), DB_DATE_FORMAT, DB_DATE_FORMAT); $tmp['permalink'] = $this->permalink(true); $tmp['coverImage'] = $this->coverImage(true); From 89b4c5fc9246154dc67e116aa18e33410f683101 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 26 Feb 2019 00:48:19 +0100 Subject: [PATCH 22/31] include tags in json function --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3b2f810e..e78c6b0c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ bl-plugins/domain-migrator/ bl-plugins/tail-writer/ bl-kernel/bludit.pro.php bl-kernel/admin/themes/gris/* +bl-kernel/admin/themes/gris bl-themes/docs bl-themes/docsx bl-themes/editorial From c14e86f96f9204811a18162edd4a4792ec0f68f7 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 15:32:08 +0100 Subject: [PATCH 23/31] bug fix, prevent lost tags --- bl-kernel/pages.class.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php index af956160..e0f5d03e 100644 --- a/bl-kernel/pages.class.php +++ b/bl-kernel/pages.class.php @@ -157,12 +157,8 @@ class Pages extends dbJSON { // Check values from the arguments ($args) // If some field is missing the current value is taken foreach ($this->dbFields as $field=>$value) { - if ($field=='tags') { - $tags = ''; - if (isset($args['tags'])) { - $tags = $args['tags']; - } - $finalValue = $this->generateTags($tags); + if ( ($field=='tags') && isset($args['tags'])) { + $finalValue = $this->generateTags($args['tags']); } elseif (isset($args[$field])) { // Sanitize if will be stored on database $finalValue = Sanitize::html($args[$field]); From c72f93601742be5ae33d4575951f6206f6ed0bc0 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 15:59:59 +0100 Subject: [PATCH 24/31] changed metadata for 3.8.1 --- bl-kernel/admin/themes/gris | 2 +- bl-kernel/boot/init.php | 6 +++--- bl-plugins/about/metadata.json | 6 +++--- bl-plugins/api/metadata.json | 6 +++--- bl-plugins/backup/metadata.json | 6 +++--- bl-plugins/canonical/metadata.json | 6 +++--- bl-plugins/categories/metadata.json | 6 +++--- bl-plugins/disqus/metadata.json | 6 +++--- bl-plugins/hit-counter/metadata.json | 6 +++--- bl-plugins/html-code/metadata.json | 6 +++--- bl-plugins/links/metadata.json | 6 +++--- bl-plugins/maintenance-mode/metadata.json | 6 +++--- bl-plugins/navigation/metadata.json | 6 +++--- bl-plugins/opengraph/metadata.json | 6 +++--- bl-plugins/remote-content/metadata.json | 6 +++--- bl-plugins/robots/metadata.json | 6 +++--- bl-plugins/rss/metadata.json | 6 +++--- bl-plugins/search/metadata.json | 6 +++--- bl-plugins/simple-stats/metadata.json | 6 +++--- bl-plugins/simplemde/metadata.json | 2 +- bl-plugins/sitemap/metadata.json | 6 +++--- bl-plugins/static-pages/metadata.json | 6 +++--- bl-plugins/tags/metadata.json | 6 +++--- bl-plugins/tinymce/metadata.json | 2 +- bl-plugins/twitter-cards/metadata.json | 6 +++--- bl-plugins/version/metadata.json | 6 +++--- bl-themes/alternative/metadata.json | 6 +++--- bl-themes/blogx/metadata.json | 6 +++--- 28 files changed, 78 insertions(+), 78 deletions(-) diff --git a/bl-kernel/admin/themes/gris b/bl-kernel/admin/themes/gris index fe85fc43..e0b14487 160000 --- a/bl-kernel/admin/themes/gris +++ b/bl-kernel/admin/themes/gris @@ -1 +1 @@ -Subproject commit fe85fc4343716d558745d2236a456761756e6a08 +Subproject commit e0b144877b87f41d08a634f812726da5c887918c diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 9ca02cb9..7cc1c91b 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -1,10 +1,10 @@ Date: Thu, 28 Feb 2019 19:42:41 +0100 Subject: [PATCH 25/31] language updated --- bl-languages/es.json | 10 ++++------ bl-languages/fa_IR.json | 11 +++++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/bl-languages/es.json b/bl-languages/es.json index 17b98763..3721a92c 100644 --- a/bl-languages/es.json +++ b/bl-languages/es.json @@ -3,11 +3,9 @@ "native": "Español", "english-name": "Spanish", "locale": "es, es_ES, es_AR, es_MX", - "last-update": "2018-02-24", + "last-update": "2019-02-28", "authors": [ - "Diego @dignajar", - "", - "" + "Diego @dignajar" ] }, "dates": { @@ -376,6 +374,6 @@ "thumbnail-width-in-pixels": "Ancho de miniatura en píxeles (px).", "thumbnail-height-in-pixels": "Altura de miniaturas en píxeles (px).", "thumbnail-quality-in-percentage": "Calidad de la miniatura en porcentaje (%).", - "maximum-load-file-size-allowed:": "Maximum load file size allowed:", - "file-type-is-not-supported": "File type is not supported. Allowed types:" + "maximum-load-file-size-allowed:": "Tamaño máximo del archivo permitido:", + "file-type-is-not-supported": "No se admite el tipo de archivo. Tipos permitidos:" } \ No newline at end of file diff --git a/bl-languages/fa_IR.json b/bl-languages/fa_IR.json index 31b1c013..b665318c 100644 --- a/bl-languages/fa_IR.json +++ b/bl-languages/fa_IR.json @@ -1,4 +1,4 @@ - +{ "language-data": { "native": "فارسی", "english-name": "Persian", @@ -7,8 +7,7 @@ "authors": [ "abdulhalim.po@gmail.com", "Dorsawi http:\/\/dorsawi.com", - "xm74", - "" + "xm74" ] }, "dates": { @@ -18,14 +17,14 @@ "Tue": "سه شنبه", "Wed": "چهارشنبه", "Thu": "پنجشنبه", - "Fri": "جمعه", + "Fri": "جمعه", "Saturday": "شنبه", "Sunday": "یکشنبه", "Monday": "دوشنبه", "Tuesday": "سه شنبه", "Wednesday": "چهارشنبه", "Thursday": "پنجشنبه", - "Friday": "جمعه", + "Friday": "جمعه", "Jan": "ژانویه", "Feb": "فوریه", "Mar": "مارس", @@ -378,4 +377,4 @@ "thumbnail-height-in-pixels": "ارتفاع بندانگشتی به پیکسل (px).", "thumbnail-quality-in-percentage": "کیفیت بندانگشتی به درصد (%).", "logo": "لوگو" -} +} \ No newline at end of file From bdf585b8dbb90e02b8189d32ce0bc6fff794b18d Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 19:43:42 +0100 Subject: [PATCH 26/31] search plugin support static and sticky pages #952 --- bl-plugins/search/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bl-plugins/search/plugin.php b/bl-plugins/search/plugin.php index aecd7ddf..a183c1ee 100644 --- a/bl-plugins/search/plugin.php +++ b/bl-plugins/search/plugin.php @@ -179,7 +179,7 @@ EOF; { // Get all pages published global $pages; - $list = $pages->getList($pageNumber = 1, $numberOfItems = -1, $onlyPublished = true); + $list = $pages->getList($pageNumber=1, $numberOfItems=-1, $published=true, $static=true, $sticky=true, $draft=false, $scheduled=false); $cache = array(); foreach ($list as $pageKey) { From 54868df65294e21033505aa99a95d438485f037e Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 19:44:46 +0100 Subject: [PATCH 27/31] include sticky and static pages to the categories --- bl-kernel/categories.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bl-kernel/categories.class.php b/bl-kernel/categories.class.php index b8cac9f0..72d612f0 100644 --- a/bl-kernel/categories.class.php +++ b/bl-kernel/categories.class.php @@ -21,13 +21,19 @@ class Categories extends dbList { $this->db[$key]['list'] = array(); } - // Get a database with published pages - $db = $pages->getPublishedDB(false); + // Get pages database + $db = $pages->getDB(false); foreach ($db as $pageKey=>$pageFields) { if (!empty($pageFields['category'])) { $categoryKey = $pageFields['category']; if (isset($this->db[$categoryKey]['list'])) { - array_push($this->db[$categoryKey]['list'], $pageKey); + if ( + ($db[$pageKey]['type']=='published') || + ($db[$pageKey]['type']=='sticky') || + ($db[$pageKey]['type']=='static') + ) { + array_push($this->db[$categoryKey]['list'], $pageKey); + } } } } From c16741808f0a8dfa0710171dbb661d56a2f61e2f Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 19:51:30 +0100 Subject: [PATCH 28/31] include sticky in sitemap #972 --- bl-plugins/sitemap/plugin.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bl-plugins/sitemap/plugin.php b/bl-plugins/sitemap/plugin.php index e4fc77e5..7121b3e9 100644 --- a/bl-plugins/sitemap/plugin.php +++ b/bl-plugins/sitemap/plugin.php @@ -57,10 +57,7 @@ class pluginSitemap extends Plugin { $xml .= ''.$site->url().''; $xml .= ''; - $published = $pages->getPublishedDB(); - $statics = $pages->getStaticDB(); - $list = array_merge($published, $statics); - + $list = $pages->getList($pageNumber=1, $numberOfItems=-1, $published=true, $static=true, $sticky=true, $draft=false, $scheduled=false); foreach ($list as $pageKey) { try { // Create the page object from the page key From e548d75e3e37e75261a685a5c6320f4527c5b8b7 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 19:55:06 +0100 Subject: [PATCH 29/31] comments, bug fixes for buildpages by tags --- bl-kernel/abstract/dbjson.class.php | 5 ++--- bl-kernel/abstract/dblist.class.php | 2 +- bl-kernel/admin/themes/gris | 2 +- bl-kernel/boot/init.php | 2 +- bl-kernel/functions.php | 7 ++++++- bl-kernel/pages.class.php | 2 +- bl-kernel/tags.class.php | 3 +-- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/bl-kernel/abstract/dbjson.class.php b/bl-kernel/abstract/dbjson.class.php index 0e409558..f44f3658 100644 --- a/bl-kernel/abstract/dbjson.class.php +++ b/bl-kernel/abstract/dbjson.class.php @@ -30,11 +30,9 @@ class dbJSON { // Unserialize, JSON to Array $array = $this->unserialize($implode); - if (empty($array)) { $this->db = array(); $this->dbBackup = array(); - Log::set(__METHOD__.LOG_SEP.'Error trying to read the JSON file: '.$file, LOG_TYPE_ERROR); } else { $this->db = $array; $this->dbBackup = $array; @@ -100,7 +98,8 @@ class dbJSON { { // NULL is returned if the json cannot be decoded $decode = json_decode($data, true); - if (empty($decode)) { + if ($decode===NULL) { + Log::set(__METHOD__.LOG_SEP.'Error trying to read the JSON file: '.$this->file, LOG_TYPE_ERROR); return false; } return $decode; diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index 26f7293a..cd0ec5d5 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -126,7 +126,7 @@ class dbList extends dbJSON } // Sort the categories by "Natural order" - private function sortAlphanumeric() + public function sortAlphanumeric() { // Sort key alphanumeric strings, a01, a10, b10, c02 return ksort($this->db); diff --git a/bl-kernel/admin/themes/gris b/bl-kernel/admin/themes/gris index e0b14487..f616042c 160000 --- a/bl-kernel/admin/themes/gris +++ b/bl-kernel/admin/themes/gris @@ -1 +1 @@ -Subproject commit e0b144877b87f41d08a634f812726da5c887918c +Subproject commit f616042ccc0eaa37dab6a0c3ad67bb022574952b diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 7cc1c91b..a687784b 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -9,7 +9,7 @@ define('BLUDIT_BUILD', '20190228'); // Debug mode // Change to FALSE, for prevent warning or errors on browser define('DEBUG_MODE', TRUE); -define('DEBUG_TYPE', 'INFO'); // INFO, TRACE +define('DEBUG_TYPE', 'TRACE'); // INFO, TRACE error_reporting(0); // Turn off all error reporting if (DEBUG_MODE) { // Turn on all error reporting diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 43d7bf82..45405b71 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -118,7 +118,12 @@ function buildPagesFor($for, $categoryKey=false, $tagKey=false) { foreach ($list as $pageKey) { try { $page = new Page($pageKey); - array_push($content, $page); + if ( ($page->type()=='published') || + ($page->type()=='sticky') || + ($page->type()=='static') + ) { + array_push($content, $page); + } } catch (Exception $e) { // continue } diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php index e0f5d03e..c80f657d 100644 --- a/bl-kernel/pages.class.php +++ b/bl-kernel/pages.class.php @@ -8,7 +8,7 @@ class Pages extends dbJSON { 'description'=>'', 'username'=>'', 'tags'=>array(), - 'type'=>'published', // published, draft, sticky, scheduled + 'type'=>'published', // published, static, draft, sticky, scheduled 'date'=>'', 'dateModified'=>'', 'position'=>0, diff --git a/bl-kernel/tags.class.php b/bl-kernel/tags.class.php index cb1f7587..6720f4e4 100644 --- a/bl-kernel/tags.class.php +++ b/bl-kernel/tags.class.php @@ -31,9 +31,8 @@ class Tags extends dbList { } } - // Sort database by alphabet - ksort($tagsIndex); $this->db = $tagsIndex; + $this->sortAlphanumeric(); return $this->save(); } From 2b542e58d09056245a14b5a679a1ecbb1874e752 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 19:59:18 +0100 Subject: [PATCH 30/31] php supported 5.6 or higher --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13d4efcb..787f5403 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Requirements You just need a web server with PHP support. -- PHP v5.3 or higher. +- PHP v5.6 or higher. - PHP [mbstring](http://php.net/manual/en/book.mbstring.php) module for full UTF-8 support. - PHP [gd](http://php.net/manual/en/book.image.php) module for image processing. - PHP [dom](http://php.net/manual/en/book.dom.php) module for DOM manipulation. From 5e5957cca1f0aa48a49238524da82024d6cdfdfc Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 28 Feb 2019 20:01:11 +0100 Subject: [PATCH 31/31] removed magic_quotes_gpc :D --- bl-kernel/boot/admin.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bl-kernel/boot/admin.php b/bl-kernel/boot/admin.php index bbf26cf3..4e67d145 100644 --- a/bl-kernel/boot/admin.php +++ b/bl-kernel/boot/admin.php @@ -23,14 +23,6 @@ $layout['controller'] = $layout['view'] = $layout['slug'] = empty($explodeSlug[0 unset($explodeSlug[0]); $layout['parameters'] = implode('/', $explodeSlug); -// Disable Magic Quotes. -// Thanks, http://stackoverflow.com/questions/517008/how-to-turn-off-magic-quotes-on-shared-hosting -if ( in_array( strtolower( ini_get( 'magic_quotes_gpc' ) ), array( '1', 'on' ) ) ) { - $_POST = array_map('stripslashes', $_POST); - $_GET = array_map('stripslashes', $_GET); - $_COOKIE = array_map('stripslashes', $_COOKIE); -} - // Boot plugins rules include(PATH_RULES.'60.plugins.php');