From 6fbe439518e7927d645329c6da1d1f4d844d4069 Mon Sep 17 00:00:00 2001 From: Dave Date: Sat, 28 Oct 2017 14:41:30 +0200 Subject: [PATCH 1/9] Polish language pack updated Update for polish language --- bl-languages/pl_PL.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bl-languages/pl_PL.json b/bl-languages/pl_PL.json index 7bb600af..296f9039 100644 --- a/bl-languages/pl_PL.json +++ b/bl-languages/pl_PL.json @@ -2,7 +2,7 @@ "language-data": { "native": "Polski (Polska)", "english-name": "Polish", - "last-update": "2017-10-12", + "last-update": "2017-10-28", "author": "Dawid dave Stawicki", "email": "dawid.stawicki@windowslive.com", "website": "http:\/\/" @@ -206,8 +206,8 @@ "scheduled-content": "Zaplanowane wpisy", "there-are-no-scheduled-content": "Brak zaplanowanej zawartości.", "new-content-created": "Utworzono nową zawartość", - "content-edited": "Content edited", - "content-deleted": "Contente deleted", + "content-edited": "Edytowano zawartość", + "content-deleted": "Usuniętyo zawartość", "undefined": "Niezdefiniowany", "create-new-content-for-your-site": "Utwórz nową zawartość swojej strony", "there-are-no-draft-content": "Brak szkiców.", @@ -225,11 +225,11 @@ "pagebreak": "Podział strony", "pages": "Strony", "this-plugin-may-not-be-supported-by-this-version-of-bludit": "Wtyczka ta być może nie jest kompatybilna z tą wersją Bludit", - "previous": "Previous", - "previous-page": "Previous page", - "next-page": "Next page", - "scheduled": "Scheduled", - "this-token-is-similar-to-a-password-it-should-not-be-shared": "This token is similar to a password, it should not be shared.", - "congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**.", - "this-theme-may-not-be-supported-by-this-version-of-bludit": "This theme may not be supported by this version of Bludit" + "previous": "Wstecz", + "previous-page": "Poprzednia strona", + "next-page": "Kolejna strona", + "scheduled": "Zaplanowane", + "this-token-is-similar-to-a-password-it-should-not-be-shared": "Token generowany jest na podstawie hasła, nie udostępniaj go nikomu.", + "congratulations-you-have-successfully-installed-your-bludit": "Gratulacje, **Bludit** został zainstalowany pomyślnie.", + "this-theme-may-not-be-supported-by-this-version-of-bludit": "Ten motyw może być niekompatybilny z Twoją wersją Bludit" } \ No newline at end of file From fb97bc83f5cd8e601d2257a4f0626c880fe0e939 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 29 Oct 2017 20:27:52 +0100 Subject: [PATCH 2/9] Backup plugin not finished, Filesystem zip --- bl-kernel/boot/init.php | 3 + bl-kernel/helpers/filesystem.class.php | 32 +++++++++ bl-plugins/backup/languages/en.json | 7 ++ bl-plugins/backup/languages/es.json | 7 ++ bl-plugins/backup/metadata.json | 10 +++ bl-plugins/backup/plugin.php | 97 ++++++++++++++++++++++++++ bl-plugins/simplemde/plugin.php | 2 +- 7 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 bl-plugins/backup/languages/en.json create mode 100644 bl-plugins/backup/languages/es.json create mode 100644 bl-plugins/backup/metadata.json create mode 100644 bl-plugins/backup/plugin.php diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 00f6890f..73528138 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -116,6 +116,9 @@ define('FILENAME', 'index.txt'); // Database date format define('DB_DATE_FORMAT', 'Y-m-d H:i:s'); +// Database date format +define('BACKUP_DATE_FORMAT', 'Y-m-d-H-i-s'); + // Sitemap date format define('SITEMAP_DATE_FORMAT', 'Y-m-d'); diff --git a/bl-kernel/helpers/filesystem.class.php b/bl-kernel/helpers/filesystem.class.php index d34edb17..0913db35 100644 --- a/bl-kernel/helpers/filesystem.class.php +++ b/bl-kernel/helpers/filesystem.class.php @@ -102,4 +102,36 @@ class Filesystem { return rmdir($source); } + + public static function zip($source, $destination) + { + if (!extension_loaded('zip') || !file_exists($source)) { + return false; + } + + $zip = new ZipArchive(); + if (!$zip->open($destination, ZIPARCHIVE::CREATE)) { + return false; + } + + if (is_dir($source) === true) { + $iterator = new RecursiveDirectoryIterator($source); + $iterator->setFlags(RecursiveDirectoryIterator::SKIP_DOTS); + $files = new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::SELF_FIRST); + + foreach ($files as $file) { + $file = realpath($file); + if (is_dir($file)) { + $zip->addEmptyDir(str_replace($source, '', $file)); + } elseif (is_file($file)) { + $zip->addFromString(str_replace($source, '', $file), file_get_contents($file)); + } + } + } elseif (is_file($source)) { + $zip->addFromString(basename($source), file_get_contents($source)); + } + + return $zip->close(); + } + } \ No newline at end of file diff --git a/bl-plugins/backup/languages/en.json b/bl-plugins/backup/languages/en.json new file mode 100644 index 00000000..1667362a --- /dev/null +++ b/bl-plugins/backup/languages/en.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "Backup", + "description": "Backup system" + } +} \ No newline at end of file diff --git a/bl-plugins/backup/languages/es.json b/bl-plugins/backup/languages/es.json new file mode 100644 index 00000000..1667362a --- /dev/null +++ b/bl-plugins/backup/languages/es.json @@ -0,0 +1,7 @@ +{ + "plugin-data": + { + "name": "Backup", + "description": "Backup system" + } +} \ No newline at end of file diff --git a/bl-plugins/backup/metadata.json b/bl-plugins/backup/metadata.json new file mode 100644 index 00000000..72882d05 --- /dev/null +++ b/bl-plugins/backup/metadata.json @@ -0,0 +1,10 @@ +{ + "author": "Bludit", + "email": "", + "website": "https://pro.bludit.com", + "version": "2.0", + "releaseDate": "2017-05-19", + "license": "Bludit PRO", + "compatible": "2.0", + "notes": "This plugin is delivery with Bludit PRO. Read more about it on https://pro.bludit.com" +} \ No newline at end of file diff --git a/bl-plugins/backup/plugin.php b/bl-plugins/backup/plugin.php new file mode 100644 index 00000000..99004b06 --- /dev/null +++ b/bl-plugins/backup/plugin.php @@ -0,0 +1,97 @@ +formButtons = false; + } + + // Install the plugin and create the workspace directory + public function install($position=0) + { + parent::install($position); + $workspace = $this->workspace(); + return mkdir($workspace, 0755, true); + } + + // Uninstall the plugin and delete the workspace directory + public function uninstall() + { + parent::uninstall(); + $workspace = $this->workspace(); + return Filesystem::deleteRecursive($workspace); + } + + // Redefine workspace + public function workspace() + { + return PATH_CONTENT.'backup'.DS; + } + + public function form() + { + $this->createBackup(); + } + + public function createBackup() + { + $currentDate = Date::current(BACKUP_DATE_FORMAT); + + // Create backup directory with the current date + $tmp = $this->workspace().'backup-'.$currentDate; + + // Copy pages directory + $destination = $tmp.DS.'pages'; + mkdir($destination, 0755, true); + $source = rtrim(PATH_PAGES, '/'); + Filesystem::copyRecursive($source, $destination); + + // Copy databases directory + $destination = $tmp.DS.'databases'; + mkdir($destination, 0755, true); + $source = rtrim(PATH_DATABASES, '/'); + Filesystem::copyRecursive($source, $destination); + + // Copy uploads directory + $destination = $tmp.DS.'uploads'; + mkdir($destination, 0755, true); + $source = rtrim(PATH_UPLOADS, '/'); + Filesystem::copyRecursive($source, $destination); + + // Compress backup directory + if (Filesystem::zip($tmp, $tmp.'.zip')) { + Filesystem::deleteRecursive($tmp); + } + } + + // Copy the content from the backup to /bl-content/ + private function replaceContent($idExecution) + { + $source = $this->workspace().$idExecution; + $dest = rtrim(PATH_CONTENT, '/'); + return Filesystem::copyRecursive($source, $dest); + } + + // Delete old backups until the $idExecution + private function cleanUp($idExecution) + { + $backups = $this->getBackupsDirectories(); + foreach ($backups as $dir) { + $backupIDExecution = basename($dir); + Filesystem::deleteRecursive($dir); + if($backupIDExecution==$idExecution) { + return true; + } + } + return true; + } + + // Returns array with all backups directories sorted by date newer first + private function getBackupsDirectories() + { + $workspace = $this->workspace(); + return Filesystem::listDirectories($workspace, $regex='*', $sortByDate=true); + } +} \ No newline at end of file diff --git a/bl-plugins/simplemde/plugin.php b/bl-plugins/simplemde/plugin.php index a2c11b8e..a8215c05 100644 --- a/bl-plugins/simplemde/plugin.php +++ b/bl-plugins/simplemde/plugin.php @@ -136,7 +136,7 @@ class pluginsimpleMDE extends Plugin { output = "\n'.PAGE_BREAK.'\n"; cm.replaceSelection(output); }, - className: "fa fa-minus-square-o", + className: "fa fa-scissors", title: "'.$Language->get('Pagebreak').'", }] });'; From ebcb7a5b1fe9268360b48abbca3375855dc7f3e2 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 29 Oct 2017 20:29:19 +0100 Subject: [PATCH 3/9] Open link on a new tab --- bl-plugins/version/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bl-plugins/version/plugin.php b/bl-plugins/version/plugin.php index cfbf42ab..ff786932 100644 --- a/bl-plugins/version/plugin.php +++ b/bl-plugins/version/plugin.php @@ -37,7 +37,7 @@ class pluginVersion extends Plugin { } if ($this->newVersion()) { - $html = ''; + $html = ''; } else { if(defined('BLUDIT_PRO')) { $html = '
Bludit PRO v'.BLUDIT_VERSION.'
'; From a73e0bb86d144e7e7710f5707fa37f3d389d4609 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Tue, 31 Oct 2017 00:06:06 +0100 Subject: [PATCH 4/9] Bug fix: CleanURL and iconv issue --- bl-kernel/dbpages.class.php | 10 ++++++++++ bl-kernel/helpers/text.class.php | 8 +++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index 942f4910..1b0af9d0 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -230,6 +230,11 @@ class dbPages extends dbJSON public function delete($key) { + // This is need it, because if the key is empty the Filesystem::deleteRecursive is going to delete PATH_PAGES + if (empty($key)) { + return false; + } + // Page doesn't exist in database if (!$this->exists($key)) { Log::set(__METHOD__.LOG_SEP.'The page does not exist. Key: '.$key); @@ -509,6 +514,11 @@ class dbPages extends dbJSON $newKey = Text::cleanUrl($parent).'/'.Text::cleanUrl($text); } + // cleanURL can return empty string + if (Text::isEmpty($newKey)) { + $newKey = 'empty'; + } + if ($newKey!==$oldKey) { // Verify if the key is already been used if( isset($this->db[$newKey]) ) { diff --git a/bl-kernel/helpers/text.class.php b/bl-kernel/helpers/text.class.php index 87f9b20b..58f0e36d 100644 --- a/bl-kernel/helpers/text.class.php +++ b/bl-kernel/helpers/text.class.php @@ -125,7 +125,7 @@ class Text { public static function cleanUrl($string, $separator='-') { - if(EXTREME_FRIENDLY_URL) { + if (EXTREME_FRIENDLY_URL) { $string = preg_replace("/[\/_|+ -]+/", $separator, $string); return $string; } @@ -133,8 +133,10 @@ class Text { // Transliterate characters to ASCII $string = str_replace(array_keys(self::$specialChars), self::$specialChars, $string); - if(function_exists('iconv')) { - $string = iconv(CHARSET, 'ASCII//TRANSLIT', $string); + if (function_exists('iconv')) { + if (@iconv(CHARSET, 'ASCII//TRANSLIT//IGNORE', $string)!==false) { + $string = iconv(CHARSET, 'ASCII//TRANSLIT//IGNORE', $string); + } } $string = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $string); From d0c3f369aa8890887442ae78e0a11a3d180b95d2 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Wed, 1 Nov 2017 19:38:56 +0100 Subject: [PATCH 5/9] Sanitize categories and tags --- bl-kernel/abstract/dblist.class.php | 19 +++++-- bl-kernel/admin/controllers/new-category.php | 36 ++----------- bl-kernel/admin/themes/default/init.php | 57 ++++++++++---------- bl-kernel/functions.php | 28 ++++++++++ bl-kernel/helpers/sanitize.class.php | 2 +- bl-kernel/helpers/text.class.php | 3 ++ bl-kernel/js/bludit-tags.js | 48 +++++++---------- bl-kernel/js/functions.php | 12 +++++ 8 files changed, 111 insertions(+), 94 deletions(-) diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index 75a9156d..a1b2ae1f 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -62,18 +62,27 @@ class dbList extends dbJSON public function generateKey($name) { - return Text::cleanUrl($name); + $key = Text::cleanUrl($name); + if (empty($key)) { + return false; + } + return $key; } public function add($name) { $key = $this->generateKey($name); - if( isset($this->db[$key]) ) { + if ($key===false) { + Log::set(__METHOD__.LOG_SEP.'Error when try to generate the key'); + return false; + } + + if (isset($this->db[$key])) { Log::set(__METHOD__.LOG_SEP.'Error key already exist: '.$key); return false; } - $this->db[$key]['name'] = $name; + $this->db[$key]['name'] = Sanitize::html($name); $this->db[$key]['list'] = array(); $this->sortAlphanumeric(); @@ -97,10 +106,10 @@ class dbList extends dbJSON { $newKey = $this->generateKey($newName); - $this->db[$newKey]['name'] = $newName; + $this->db[$newKey]['name'] = Sanitize::html($newName); $this->db[$newKey]['list'] = $this->db[$oldKey]['list']; - // Remove the old category + // Remove the old key if( $oldKey != $newKey ) { unset( $this->db[$oldKey] ); } diff --git a/bl-kernel/admin/controllers/new-category.php b/bl-kernel/admin/controllers/new-category.php index 52e50abf..b752efb5 100644 --- a/bl-kernel/admin/controllers/new-category.php +++ b/bl-kernel/admin/controllers/new-category.php @@ -13,36 +13,6 @@ if ($Login->role()!=='admin') { // Functions // ============================================================================ -function add($category) -{ - global $dbCategories; - global $Language; - global $Syslog; - - if( Text::isEmpty($category) ) { - Alert::set($Language->g('Category name is empty'), ALERT_STATUS_FAIL); - return false; - } - - if( $dbCategories->add($category) ) { - // Add to syslog - $Syslog->add(array( - 'dictionaryKey'=>'new-category-created', - 'notes'=>$category - )); - - // Create an alert - Alert::set($Language->g('Category added'), ALERT_STATUS_OK); - - // Redirect - Redirect::page('categories'); - } - else { - Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to create the category.'); - return false; - } -} - // ============================================================================ // Main before POST // ============================================================================ @@ -51,9 +21,9 @@ function add($category) // POST Method // ============================================================================ -if( $_SERVER['REQUEST_METHOD'] == 'POST' ) -{ - add($_POST['category']); +if ($_SERVER['REQUEST_METHOD'] == 'POST') { + createCategory($_POST['category']); + Redirect::page('categories'); } // ============================================================================ diff --git a/bl-kernel/admin/themes/default/init.php b/bl-kernel/admin/themes/default/init.php index 0717b889..cdc2ce1b 100644 --- a/bl-kernel/admin/themes/default/init.php +++ b/bl-kernel/admin/themes/default/init.php @@ -2,6 +2,36 @@ class HTML { + // Returns HTML and Javascript code for the box TAGs when you create/edit content + public static function tags($args) { + global $L; + + // Javascript + $javascript = ''; + + // HTML + $html = '
'; + $html .= ' '; + $html .= ' '; + + $html .= '
'; + $html .= ' '; + $html .= ' '; + $html .= '
'; + + foreach ($args['allTags'] as $tag) { + $html .= ' '.$tag.''; + } + + $html .= '
'; + $html .= '
'; + $html .= '
'; + + echo $html.$javascript; + } + public static function title($args) { $id = empty($args['id']) ? '' : 'id="'.$args['id'].'"'; @@ -96,34 +126,7 @@ class HTML { echo $html; } - public static function tags($args) - { - global $L; - // Javascript code - include(PATH_JS.'bludit-tags.js'); - $html = '
'; - - $html .= ''; - - $html .= ''; - - $html .= '
'; - $html .= ''; - $html .= ''; - - $html .= '
'; - - foreach($args['allTags'] as $tag) { - $html .= ''.$tag.''; - } - - $html .= '
'; - $html .= '
'; - $html .= '
'; - - echo $html; - } public static function formInputPassword($args) { diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 886bc153..2e05710b 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -634,6 +634,34 @@ function editSettings($args) { return false; } +// Add a new category to the system +// Returns TRUE is success added, FALSE otherwise +function createCategory($category) { + global $dbCategories; + global $Language; + global $Syslog; + + if (Text::isEmpty($category)) { + // Set an alert + Alert::set($Language->g('Category name is empty'), ALERT_STATUS_FAIL); + return false; + } + + if ($dbCategories->add($category)) { + // Add to syslog + $Syslog->add(array( + 'dictionaryKey'=>'new-category-created', + 'notes'=>$category + )); + + // Set an alert + Alert::set($Language->g('Category added'), ALERT_STATUS_OK); + return true; + } + + return false; +} + function editCategory($oldCategoryKey, $newCategory) { global $Language; global $dbPages; diff --git a/bl-kernel/helpers/sanitize.class.php b/bl-kernel/helpers/sanitize.class.php index b5482f38..485ae135 100644 --- a/bl-kernel/helpers/sanitize.class.php +++ b/bl-kernel/helpers/sanitize.class.php @@ -81,4 +81,4 @@ class Sanitize { return 0; } -} +} \ No newline at end of file diff --git a/bl-kernel/helpers/text.class.php b/bl-kernel/helpers/text.class.php index 58f0e36d..d6a92895 100644 --- a/bl-kernel/helpers/text.class.php +++ b/bl-kernel/helpers/text.class.php @@ -123,6 +123,9 @@ class Text { return str_replace(array_keys($replace), array_values($replace), $text); } + // Convert invalid characters to valid characters for a URL + // Characters that cannot be converted will be removed from the string + // This function can return an empty string public static function cleanUrl($string, $separator='-') { if (EXTREME_FRIENDLY_URL) { diff --git a/bl-kernel/js/bludit-tags.js b/bl-kernel/js/bludit-tags.js index 0292947d..b5e0a0d9 100644 --- a/bl-kernel/js/bludit-tags.js +++ b/bl-kernel/js/bludit-tags.js @@ -1,73 +1,65 @@ - \ No newline at end of file +}); \ No newline at end of file diff --git a/bl-kernel/js/functions.php b/bl-kernel/js/functions.php index e2d35257..fc5609e5 100644 --- a/bl-kernel/js/functions.php +++ b/bl-kernel/js/functions.php @@ -53,4 +53,16 @@ function generateSlug(text, parentKey, currentKey, writeResponse) { }); } +function sanitizeHTML(text) { + var map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + return text.replace(/[&<>"']/g, function(m) { return map[m]; }); +} + \ No newline at end of file From ae706e184a9224e3d9ccbee3fe7ef137a8ef20c9 Mon Sep 17 00:00:00 2001 From: Aleksei Babii Date: Wed, 1 Nov 2017 21:23:39 +0200 Subject: [PATCH 6/9] Update uk_UA.json --- bl-languages/uk_UA.json | 211 ++++++++++++++++++++-------------------- 1 file changed, 106 insertions(+), 105 deletions(-) diff --git a/bl-languages/uk_UA.json b/bl-languages/uk_UA.json index b7935c85..84b63dcb 100644 --- a/bl-languages/uk_UA.json +++ b/bl-languages/uk_UA.json @@ -2,22 +2,22 @@ "language-data": { "native": "Українська (Україна)", "english-name": "Ukrainian", - "last-update": "2016-10-28", - "author": "Allec Bernz", - "email": "admin@allec.info", - "website": "http:\/\/allec.info" + "last-update": "2017-11-01", + "author": "Aleksei86", + "email": "", + "website": "" }, "dashboard": "Панель управління", "manage-users": "Управління користувачами", - "manage-categories": "Manage categories", + "manage-categories": "Управління категоріями", "general-settings": "Загальні налаштування", "advanced-settings": "Додаткові налаштування", - "thanks-for-support-bludit": "Thanks for support Bludit", - "upgrade-to-bludit-pro": "Upgrade to Bludit PRO", + "thanks-for-support-bludit": "Дякуємо за підтримку Bludit", + "upgrade-to-bludit-pro": "Оновити до Bludit PRO", "language": "Мова", - "plugin": "Plugin", + "plugin": "Плагін", "plugins": "Плагіни", - "developers": "Developers", + "developers": "Розробники", "themes": "Теми", "about": "Інформація", "url": "URL", @@ -27,27 +27,27 @@ "publish": "Опублікувати", "manage": "Керування", "content": "Зміст", - "category": "Category", - "categories": "Categories", + "category": "Категорія", + "categories": "Категорії", "users": "Користувачі", "settings": "Параметри", "general": "Загальні", "advanced": "Розширені", - "new-content": "New content", - "manage-content": "Manage content", - "add-new-content": "Add new content", - "new-category": "New category", + "new-content": "Новий контент", + "manage-content": "Керування контентом", + "add-new-content": "Додати новий контент", + "new-category": "Нова категорія", "you-do-not-have-sufficient-permissions": "Ви не маєте прав на доступ до цієї сторінки, зверніться до адміністратора.", "add-a-new-user": "Додати нового користувача", - "url-associated-with-the-content": "URL associated with the content.", + "url-associated-with-the-content": "URL-адреса, пов'язана з контентом.", "language-and-timezone": "Мова та часовий пояс", "change-your-language-and-region-settings": "Змінити Вашу мову та регіональні налаштування.", "notifications": "Повідомлення", - "plugin-activated": "Plugin activated", - "plugin-deactivated": "Plugin deactivated", - "new-theme-configured": "New theme configured", - "changes-on-settings": "Changes on settings", - "plugin-configured": "Plugin configured", + "plugin-activated": "Плагін активований", + "plugin-deactivated": "Плагін вимкнено", + "new-theme-configured": "Нову тему налаштовано", + "changes-on-settings": "Зміни в налаштуваннях", + "plugin-configured": "Плагін налаштовано", "welcome-to-bludit": "Ласкаво просимо до Bludit", "statistics": "Статистика", "drafts": "Чернетки", @@ -63,7 +63,7 @@ "cover-image": "Зображення обкладинки", "drag-and-drop-or-click-here": "Перетягніть або натисніть тут", "there-are-no-images": "Немає зображень", - "upload-and-more-images": "Upload and more images", + "upload-and-more-images": "Завантажити та інші зображення", "click-on-the-image-for-options": "Натисніть на зображення, щоб переглянути параметри.", "click-here-to-cancel": "Натисніть тут, щоб скасувати.", "insert-image": "Вставити зображення", @@ -75,21 +75,21 @@ "published": "Опубліковано", "draft": "Чернетка", "empty-title": "Порожній заголовок", - "empty": "empty", + "empty": "порожньо", "date": "Дата", - "external-cover-image": "External cover image", + "external-cover-image": "Зовнішнє зображення обкладинки", "parent": "Джерело", - "full-image-url": "Full image URL.", - "this-field-is-used-when-you-order-the-content-by-position": "This field is used when you order the content by position.", + "full-image-url": "Повна URL-адреса зображення.", + "this-field-is-used-when-you-order-the-content-by-position": "Це поле використовується під час сортування контенту за позицією.", "position": "Позиція", "friendly-url": "Дружні URL", "image-description": "Опис зображення", - "add-a-new-category": "Add a new category", + "add-a-new-category": "Додати нову категорію", "name": "Ім'я", "username": "Ім'я користувача", "first-name": "Ім'я", "last-name": "Прізвище", - "to-schedule-the-content-select-the-date-and-time": "To schedule the content select the date and time, the status has to be set to \"Published\".", + "to-schedule-the-content-select-the-date-and-time": "Щоб запланувати публікацію контенту, виберіть дату та час, коли статус буде встановлений на \"Опубліковано\".", "email": "Email", "role": "Роль", "registered": "Зареєстрований", @@ -119,43 +119,43 @@ "author": "Автор", "activate": "Активувати", "deactivate": "Деактивувати", - "edit-category": "Edit category", + "edit-category": "Редагувати категорію", "delete": "Видалити", "password": "Пароль", "confirm-password": "Підтвердіть пароль", "editor": "Редактор", "administrator": "Адміністратор", "edit-user": "Редагувати користувача", - "edit-content": "Edit content", + "edit-content": "Редагувати контент", "profile": "Профіль", "change-password": "Зміна пароля", "enabled": "Увімкнено", "disable-the-user": "Відключити користувача", "profile-picture": "Зображення профілю", - "edit-or-delete-your-categories": "Edit or delete your categories", - "create-a-new-category-to-organize-your-content": "Create a new category to organize your content", + "edit-or-delete-your-categories": "Редагування або видалення ваших категорій", + "create-a-new-category-to-organize-your-content": "Створити нову категорію, щоб організувати ваш контент", "confirm-delete-this-action-cannot-be-undone": "Підтвердіть видалення, ця дія не може бути скасована.", "do-you-want-to-disable-the-user": "Ви хочете відключити користувача?", "new-password": "Новий пароль", - "you-can-change-this-field-when-save-the-current-changes": "You can change this field when save the current changes.", - "items-per-page": "Items per page", - "invite-a-friend-to-collaborate-on-your-site": "Invite a friend to collaborate on your site", - "number-of-items-to-show-per-page": "Number of items to show per page.", - "website-or-blog": "Website or Blog", - "order-content-by": "Order content By", - "edit-or-delete-content-from-your-site": "Edit or delete content from your site", - "order-the-content-by-date-to-build-a-blog": "Order the content by date to build a Blog or order the content by position to build a Website.", - "page-not-found-content": "Hey! look like the page doesn't exist.", - "page-not-found": "Page not found", - "predefined-pages": "Predefined pages", - "returning-page-when-the-page-doesnt-exist": "Returning page when the page doesn't exist, leave it blank if you want to returns a default message.", - "returning-page-for-the-main-page": "Returning page for the main page, leave it blank if you want to show all the pages on the main page.", - "full-url-of-your-site": "Full URL of your site. Complete with the protocol HTTP or HTTPS (only if you have enabled SSL on your server).", - "with-the-locales-you-can-set-the-regional-user-interface": "With the locales, you can set the regional user interface, such as the dates in your language. The locales need to be installed on your system.", + "you-can-change-this-field-when-save-the-current-changes": "Ви можете змінити це поле після збереження поточних змін.", + "items-per-page": "Елементів на сторінку", + "invite-a-friend-to-collaborate-on-your-site": "Запросіть друга до співпраці на своєму сайті", + "number-of-items-to-show-per-page": "Кількість елементів для показу на сторінці.", + "website-or-blog": "Веб-сайт або Блог", + "order-content-by": "Сортувати контент За", + "edit-or-delete-content-from-your-site": "Редагуйте або видаліть контент із вашого сайту", + "order-the-content-by-date-to-build-a-blog": "Відсортуйте контент за датою, щоб створити Блог або за позицією, щоб створити Веб-сайт.", + "page-not-found-content": "Привіт! Схоже ця сторінка не існує.", + "page-not-found": "Сторінку не знайдено", + "predefined-pages": "Попередньо визначені сторінки", + "returning-page-when-the-page-doesnt-exist": "Повідомлення коли сторінка не існує, залиште її порожньою, якщо ви хочете повернути повідомлення за промовчанням.", + "returning-page-for-the-main-page": "Повідомлення для головної сторінки, залиште її порожньою, якщо ви хочете показати всі сторінки на головній сторінці.", + "full-url-of-your-site": "Повна URL-адреса вашого сайту. Заповніть протокол HTTP або HTTPS (тільки якщо ввімкнуто SSL на вашому сервері).", + "with-the-locales-you-can-set-the-regional-user-interface": "За допомогою локалей ви можете встановити регіональний користувальницький інтерфейс, наприклад, дати на вашій мові. Локалі повинні бути встановлені у вашій системі.", "bludit-installer": "Інсталятор Bludit", "choose-your-language": "Оберіть свою мову", "next": "Далі", - "complete-the-form-choose-a-password-for-the-username-admin": "Виберіть пароль для користувача « admin »", + "complete-the-form-choose-a-password-for-the-username-admin": "Виберіть пароль для користувача «admin»", "show-password": "Показати пароль", "install": "Встановити", "login": "Увійти", @@ -165,71 +165,72 @@ "whats-next": "Що далі", "username-or-password-incorrect": "Неправильне ім'я користувача або пароль", "follow-bludit-on": "Слідуйте за Bludit на", - "visit-the-forum-for-support": "Visit the [forum](https:\/\/forum.bludit.org) for support", + "visit-the-forum-for-support": "Завітайте на [форум](https:\/\/forum.bludit.org) для підтримки", "manage-your-bludit-from-the-admin-panel": "Керуйте вашим Bludit через [панель управління]({{ADMIN_AREA_LINK}})", "chat-with-developers-and-users-on-gitter": "Чат з розробниками і користувачами [Gitter](https:\/\/gitter.im\/bludit\/support)", "this-is-a-brief-description-of-yourself-our-your-site": "Це короткий опис про себе або про сайт, щоб змінити цей текст зайдіть в панель адміністратора, налаштування, плагіни, і налаштуйте плагін про сайт.", "read-the-documentation-for-more-information": "Читайте [документацію](https:\/\/docs.bludit.com) для отримання додаткової інформації", - "new-version-available": "New version available", - "new-category-created": "New category created", - "category-deleted": "Category deleted", - "category-edited": "Category edited", - "new-user-created": "New user created", - "user-edited": "User edited", + "new-version-available": "Нова версія доступна", + "new-category-created": "Створено нову категорію", + "category-deleted": "Категорія видалена", + "category-edited": "Категорія відредагована", + "new-user-created": "Новий користувач створений", + "user-edited": "Користувач відредагований", "user-deleted": "Користувач видалений", - "recommended-for-recovery-password-and-notifications": "Recommended for recovery password and notifications.", - "authentication-token": "Authentication Token", - "token": "Token", - "current-status": "Current status", + "recommended-for-recovery-password-and-notifications": "Рекомендується для відновлення пароля та сповіщень.", + "authentication-token": "Токен аутентифікації", + "token": "Токен", + "current-status": "Поточний стан", "upload-image": "Завантажити зображення", "the-changes-have-been-saved": "Зміни були збережені", - "label": "Label", - "links": "Links", - "this-title-is-almost-always-used-in-the-sidebar-of-the-site": "This title is almost always used in the sidebar of the site.", + "label": "Мітка", + "links": "Лінки", + "this-title-is-almost-always-used-in-the-sidebar-of-the-site": "Цей заголовок майже завжди використовується на бічній панелі сайту.", "password-must-be-at-least-6-characters-long": "Пароль повинен містити не менше 6 символів", "ip-address-has-been-blocked": "IP-адресу заблоковано.", "try-again-in-a-few-minutes": "Повторіть спробу через декілька хвилин.", - "content-published-from-scheduler": "Content published from scheduler", - "installer-page-about-content": "The about page is an important and powerful for potential clients and partners. For those who wonder who is behind the website, your About page is the first source of information.", - "blog": "Blog", - "complete-all-fields": "Complete all fields", - "static": "Static", - "about-your-site-or-yourself": "About your site or yourself", - "homepage": "Homepage", - "disabled": "Disabled", - "to-enable-the-user-you-must-set-a-new-password": "To enable the user you must set a new password.", - "delete-the-user-and-associate-his-content-to-admin-user": "Delete the user and associate his content to admin user", - "delete-the-user-and-all-his-content": "Delete the user and all his content", - "user-disabled": "User disabled", - "user-password-changed": "User password changed", - "the-password-and-confirmation-password-do-not-match": "The password and confirmation password do not match", - "scheduled-content": "Scheduled content", - "there-are-no-scheduled-content": "There are no scheduled content.", - "new-content-created": "New content created", - "content-edited": "Content edited", - "content-deleted": "Contente deleted", - "undefined": "Undefined", - "create-new-content-for-your-site": "Create new content for your site", - "there-are-no-draft-content": "There are no draft content.", - "order-items-by": "Order items by", - "all-content": "All content", - "dynamic": "Dynamic", - "type": "Type", - "draft-content": "Draft content", - "post": "Post", - "default": "Default", - "latest-content": "Latest content", - "default-message": "Default message", - "no-parent": "No parent", - "have-you-seen-my-ball": "Have you seen my ball?", - "pagebreak": "Page break", + "content-published-from-scheduler": "Контент опубліковано за розкладом", + "installer-page-about-content": "Сторінка Про нас є важливою для потенційних клієнтів та партнерів. Для тих, кому цікаво, хто стоїть за веб-сайтом, Ваша сторінка Про нас є першим джерелом інформації.", + "blog": "Блог", + "complete-all-fields": "Заповніть всі поля", + "static": "Статичний", + "about-your-site-or-yourself": "Про ваш сайт або про вас", + "homepage": "Домашня сторінка", + "disabled": "Вимкнено", + "to-enable-the-user-you-must-set-a-new-password": "Щоб активувати цього користувача, потрібно встановити новий пароль.", + "delete-the-user-and-associate-his-content-to-admin-user": "Видалити користувача та пов'язати його контент з адміністратором", + "delete-the-user-and-all-his-content": "Видалити користувача та весь його контент", + "user-disabled": "Користувач відключений", + "user-password-changed": "Змінено пароль користувача", + "the-password-and-confirmation-password-do-not-match": "Пароль і підтвердження пароля не співпадають", + "scheduled-content": "Запланований контент", + "there-are-no-scheduled-content": "Немає запланованого контенту.", + "new-content-created": "Новий контент створено", + "content-edited": "Контент відредаговано", + "content-deleted": "Контент видалено", + "undefined": "Невизначено", + "create-new-content-for-your-site": "Створіть новий контент для свого сайту", + "there-are-no-draft-content": "Немає чорнового контенту.", + "order-items-by": "Сортувати елементи за", + "all-content": "Весь контент", + "dynamic": "Динамічний", + "type": "Тип", + "draft-content": "Чорновий контент", + "post": "Опублікувати", + "default": "За промовчанням", + "latest-content": "Найновіший контент", + "default-message": "Повідомлення за замовчуванням", + "no-parent": "Немає батьківського елемента", + "have-you-seen-my-ball": "Ти бачив мій м'яч?", + "pagebreak": "Розрив сторінки", "pages": "Сторінки", - "this-plugin-may-not-be-supported-by-this-version-of-bludit": "This plugin may not be supported by this version of Bludit", - "previous": "Previous", - "previous-page": "Previous page", - "next-page": "Next page", - "scheduled": "Scheduled", - "this-token-is-similar-to-a-password-it-should-not-be-shared": "This token is similar to a password, it should not be shared.", - "congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**", - "this-theme-may-not-be-supported-by-this-version-of-bludit": "This theme may not be supported by this version of Bludit" -} \ No newline at end of file + "this-plugin-may-not-be-supported-by-this-version-of-bludit": "Цей плагін може не підтримуватися цією версією Bludit", + "previous": "Попередній", + "previous-page": "Попередня сторінка", + "next-page": "Наступна сторінка", + "scheduled": "Розклад", + "this-token-is-similar-to-a-password-it-should-not-be-shared": "Цей токен схожий на пароль, ним не слід ділитися.", + "congratulations-you-have-successfully-installed-your-bludit": "Вітаємо, ви успішно встановили **Bludit**", + "this-theme-may-not-be-supported-by-this-version-of-bludit": "Ця тема може не підтримуватися цією версією Bludit", + "read-more": "Читати далі" +} From 24ec5b0bcdf02cfac47b8c2821e33a1df1218e0c Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Wed, 1 Nov 2017 21:29:55 +0100 Subject: [PATCH 7/9] web site for website --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8455232e..bea76c04 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ================================ **Simple**, **Fast** and **Flexible** CMS -Bludit is a web application to build your own **web site** or **blog** in seconds, it's completely **free and open source**. Bludit uses files in JSON format to store the content, you don't need to install or configure a database. You only need a web server with PHP support. +Bludit is a web application to build your own **website** or **blog** in seconds, it's completely **free and open source**. Bludit uses files in JSON format to store the content, you don't need to install or configure a database. You only need a web server with PHP support. Bludit supports **Markdown** and **HTML code** for the content. From fe98aca8370830a85a0a976cf2f8551fbdf313a3 Mon Sep 17 00:00:00 2001 From: Aleksei Babii Date: Thu, 2 Nov 2017 19:16:28 +0200 Subject: [PATCH 8/9] Create uk_UA.json --- bl-plugins/categories/languages/uk_UA.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bl-plugins/categories/languages/uk_UA.json diff --git a/bl-plugins/categories/languages/uk_UA.json b/bl-plugins/categories/languages/uk_UA.json new file mode 100644 index 00000000..0e4e132c --- /dev/null +++ b/bl-plugins/categories/languages/uk_UA.json @@ -0,0 +1,8 @@ +{ + "plugin-data": + { + "name": "Категорії", + "description": "Показує всі категорії на бічній панелі." + }, + "hide-categories-without-content": "Сховати категорії без вмісту" +} From 3f3fde21e9737e012c79e4fecb65890323c55e2b Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Thu, 2 Nov 2017 23:43:13 +0100 Subject: [PATCH 9/9] Bludit v2.0.2 --- bl-kernel/boot/init.php | 6 +- bl-plugins/backup/languages/en.json | 7 --- bl-plugins/backup/languages/es.json | 7 --- bl-plugins/backup/metadata.json | 10 --- bl-plugins/backup/plugin.php | 97 ----------------------------- 5 files changed, 3 insertions(+), 124 deletions(-) delete mode 100644 bl-plugins/backup/languages/en.json delete mode 100644 bl-plugins/backup/languages/es.json delete mode 100644 bl-plugins/backup/metadata.json delete mode 100644 bl-plugins/backup/plugin.php diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 73528138..e798d5e2 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -1,10 +1,10 @@ formButtons = false; - } - - // Install the plugin and create the workspace directory - public function install($position=0) - { - parent::install($position); - $workspace = $this->workspace(); - return mkdir($workspace, 0755, true); - } - - // Uninstall the plugin and delete the workspace directory - public function uninstall() - { - parent::uninstall(); - $workspace = $this->workspace(); - return Filesystem::deleteRecursive($workspace); - } - - // Redefine workspace - public function workspace() - { - return PATH_CONTENT.'backup'.DS; - } - - public function form() - { - $this->createBackup(); - } - - public function createBackup() - { - $currentDate = Date::current(BACKUP_DATE_FORMAT); - - // Create backup directory with the current date - $tmp = $this->workspace().'backup-'.$currentDate; - - // Copy pages directory - $destination = $tmp.DS.'pages'; - mkdir($destination, 0755, true); - $source = rtrim(PATH_PAGES, '/'); - Filesystem::copyRecursive($source, $destination); - - // Copy databases directory - $destination = $tmp.DS.'databases'; - mkdir($destination, 0755, true); - $source = rtrim(PATH_DATABASES, '/'); - Filesystem::copyRecursive($source, $destination); - - // Copy uploads directory - $destination = $tmp.DS.'uploads'; - mkdir($destination, 0755, true); - $source = rtrim(PATH_UPLOADS, '/'); - Filesystem::copyRecursive($source, $destination); - - // Compress backup directory - if (Filesystem::zip($tmp, $tmp.'.zip')) { - Filesystem::deleteRecursive($tmp); - } - } - - // Copy the content from the backup to /bl-content/ - private function replaceContent($idExecution) - { - $source = $this->workspace().$idExecution; - $dest = rtrim(PATH_CONTENT, '/'); - return Filesystem::copyRecursive($source, $dest); - } - - // Delete old backups until the $idExecution - private function cleanUp($idExecution) - { - $backups = $this->getBackupsDirectories(); - foreach ($backups as $dir) { - $backupIDExecution = basename($dir); - Filesystem::deleteRecursive($dir); - if($backupIDExecution==$idExecution) { - return true; - } - } - return true; - } - - // Returns array with all backups directories sorted by date newer first - private function getBackupsDirectories() - { - $workspace = $this->workspace(); - return Filesystem::listDirectories($workspace, $regex='*', $sortByDate=true); - } -} \ No newline at end of file