Merge pull request #5 from bludit/master

Pull request
This commit is contained in:
Edi 2017-11-04 14:04:45 +01:00 committed by GitHub
commit 28f44d0fdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 291 additions and 218 deletions

View File

@ -2,7 +2,7 @@
================================ ================================
**Simple**, **Fast** and **Flexible** CMS **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. Bludit supports **Markdown** and **HTML code** for the content.

View File

@ -62,18 +62,27 @@ class dbList extends dbJSON
public function generateKey($name) public function generateKey($name)
{ {
return Text::cleanUrl($name); $key = Text::cleanUrl($name);
if (empty($key)) {
return false;
}
return $key;
} }
public function add($name) public function add($name)
{ {
$key = $this->generateKey($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); Log::set(__METHOD__.LOG_SEP.'Error key already exist: '.$key);
return false; return false;
} }
$this->db[$key]['name'] = $name; $this->db[$key]['name'] = Sanitize::html($name);
$this->db[$key]['list'] = array(); $this->db[$key]['list'] = array();
$this->sortAlphanumeric(); $this->sortAlphanumeric();
@ -97,10 +106,10 @@ class dbList extends dbJSON
{ {
$newKey = $this->generateKey($newName); $newKey = $this->generateKey($newName);
$this->db[$newKey]['name'] = $newName; $this->db[$newKey]['name'] = Sanitize::html($newName);
$this->db[$newKey]['list'] = $this->db[$oldKey]['list']; $this->db[$newKey]['list'] = $this->db[$oldKey]['list'];
// Remove the old category // Remove the old key
if( $oldKey != $newKey ) { if( $oldKey != $newKey ) {
unset( $this->db[$oldKey] ); unset( $this->db[$oldKey] );
} }

View File

@ -13,36 +13,6 @@ if ($Login->role()!=='admin') {
// Functions // 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 // Main before POST
// ============================================================================ // ============================================================================
@ -51,9 +21,9 @@ function add($category)
// POST Method // POST Method
// ============================================================================ // ============================================================================
if( $_SERVER['REQUEST_METHOD'] == 'POST' ) if ($_SERVER['REQUEST_METHOD'] == 'POST') {
{ createCategory($_POST['category']);
add($_POST['category']); Redirect::page('categories');
} }
// ============================================================================ // ============================================================================

View File

@ -2,6 +2,36 @@
class HTML { 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 = '<script>';
$javascript .= file_get_contents(PATH_JS.'bludit-tags.js', true);
$javascript .= '</script>';
// HTML
$html = '<div id="bludit-tags" class="uk-form-row">';
$html .= ' <input type="hidden" id="jstags" name="tags" value="">';
$html .= ' <label for="jstagInput" class="uk-form-label">'.$args['label'].'</label>';
$html .= ' <div class="uk-form-controls">';
$html .= ' <input id="jstagInput" type="text" class="uk-width-1-1" autocomplete="off">';
$html .= ' <button id="jstagAdd" class="uk-button">'.$L->g('Add').'</button>';
$html .= ' <div id="jstagList">';
foreach ($args['allTags'] as $tag) {
$html .= ' <span data-tag="'.$tag.'" class="'.( in_array($tag, $args['selectedTags'])?'select':'unselect' ).'">'.$tag.'</span>';
}
$html .= ' </div>';
$html .= ' </div>';
$html .= '</div>';
echo $html.$javascript;
}
public static function title($args) public static function title($args)
{ {
$id = empty($args['id']) ? '' : 'id="'.$args['id'].'"'; $id = empty($args['id']) ? '' : 'id="'.$args['id'].'"';
@ -96,34 +126,7 @@ class HTML {
echo $html; echo $html;
} }
public static function tags($args)
{
global $L;
// Javascript code
include(PATH_JS.'bludit-tags.js');
$html = '<div id="bludit-tags" class="uk-form-row">';
$html .= '<input type="hidden" id="jstags" name="tags" value="">';
$html .= '<label for="jstagInput" class="uk-form-label">'.$args['label'].'</label>';
$html .= '<div class="uk-form-controls">';
$html .= '<input id="jstagInput" type="text" class="uk-width-1-1" autocomplete="off">';
$html .= '<button id="jstagAdd" class="uk-button">'.$L->g('Add').'</button>';
$html .= '<div id="jstagList">';
foreach($args['allTags'] as $tag) {
$html .= '<span data-tag="'.$tag.'" class="'.( in_array($tag, $args['selectedTags'])?'select':'unselect' ).'">'.$tag.'</span>';
}
$html .= '</div>';
$html .= '</div>';
$html .= '</div>';
echo $html;
}
public static function formInputPassword($args) public static function formInputPassword($args)
{ {

View File

@ -1,10 +1,10 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
// Bludit version // Bludit version
define('BLUDIT_VERSION', '2.0.1'); define('BLUDIT_VERSION', '2.0.2');
define('BLUDIT_CODENAME', 'Morty'); define('BLUDIT_CODENAME', 'Morty');
define('BLUDIT_RELEASE_DATE', '2017-10-23'); define('BLUDIT_RELEASE_DATE', '2017-11-02');
define('BLUDIT_BUILD', '20171023'); define('BLUDIT_BUILD', '20171102');
// Debug mode // Debug mode
// Change to FALSE, for prevent warning or errors on browser // Change to FALSE, for prevent warning or errors on browser
@ -116,6 +116,9 @@ define('FILENAME', 'index.txt');
// Database date format // Database date format
define('DB_DATE_FORMAT', 'Y-m-d H:i:s'); 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 // Sitemap date format
define('SITEMAP_DATE_FORMAT', 'Y-m-d'); define('SITEMAP_DATE_FORMAT', 'Y-m-d');

View File

@ -230,6 +230,11 @@ class dbPages extends dbJSON
public function delete($key) 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 // Page doesn't exist in database
if (!$this->exists($key)) { if (!$this->exists($key)) {
Log::set(__METHOD__.LOG_SEP.'The page does not exist. Key: '.$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); $newKey = Text::cleanUrl($parent).'/'.Text::cleanUrl($text);
} }
// cleanURL can return empty string
if (Text::isEmpty($newKey)) {
$newKey = 'empty';
}
if ($newKey!==$oldKey) { if ($newKey!==$oldKey) {
// Verify if the key is already been used // Verify if the key is already been used
if( isset($this->db[$newKey]) ) { if( isset($this->db[$newKey]) ) {

View File

@ -634,6 +634,34 @@ function editSettings($args) {
return false; 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) { function editCategory($oldCategoryKey, $newCategory) {
global $Language; global $Language;
global $dbPages; global $dbPages;

View File

@ -102,4 +102,36 @@ class Filesystem {
return rmdir($source); 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();
}
} }

View File

@ -81,4 +81,4 @@ class Sanitize {
return 0; return 0;
} }
} }

View File

@ -123,9 +123,12 @@ class Text {
return str_replace(array_keys($replace), array_values($replace), $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='-') public static function cleanUrl($string, $separator='-')
{ {
if(EXTREME_FRIENDLY_URL) { if (EXTREME_FRIENDLY_URL) {
$string = preg_replace("/[\/_|+ -]+/", $separator, $string); $string = preg_replace("/[\/_|+ -]+/", $separator, $string);
return $string; return $string;
} }
@ -133,8 +136,10 @@ class Text {
// Transliterate characters to ASCII // Transliterate characters to ASCII
$string = str_replace(array_keys(self::$specialChars), self::$specialChars, $string); $string = str_replace(array_keys(self::$specialChars), self::$specialChars, $string);
if(function_exists('iconv')) { if (function_exists('iconv')) {
$string = iconv(CHARSET, 'ASCII//TRANSLIT', $string); if (@iconv(CHARSET, 'ASCII//TRANSLIT//IGNORE', $string)!==false) {
$string = iconv(CHARSET, 'ASCII//TRANSLIT//IGNORE', $string);
}
} }
$string = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $string); $string = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $string);

View File

@ -1,73 +1,65 @@
<script>
function insertTag() { function insertTag() {
var newTag = sanitizeHTML( $("#jstagInput").val() );
var newTag = $("#jstagInput").val(); if (newTag.trim()=="") {
if(newTag.trim()=="") {
return true; return true;
} }
// Search if the tag exists
var findTag = $("span[data-tag]").filter(function() { var findTag = $("span[data-tag]").filter(function() {
return $(this).attr('data-tag').toLowerCase() == newTag.toLowerCase(); return $(this).attr('data-tag').toLowerCase() == newTag.toLowerCase();
}); });
if( findTag.length > 0 ) { // If the tag exits select
// If the tag doesn't exist, insert on the list and select
if (findTag.length > 0) {
findTag.removeClass("unselect").addClass("select"); findTag.removeClass("unselect").addClass("select");
} } else {
else {
$("#jstagList").append("<span data-tag=\""+newTag+"\" class=\"select\">"+newTag+"</span>"); $("#jstagList").append("<span data-tag=\""+newTag+"\" class=\"select\">"+newTag+"</span>");
} }
// Clean the input. // Clean the input field
$("#jstagInput").val(""); $("#jstagInput").val("");
return newTag;
} }
$(document).ready(function() { $(document).ready(function() {
// Click on tag unselected. // Click on tag unselected
$(document).on("click", ".unselect", function() { $(document).on("click", ".unselect", function() {
$(this).removeClass("unselect").addClass("select"); $(this).removeClass("unselect").addClass("select");
}); });
// Click on tag selected. // Click on tag selected
$(document).on("click", ".select", function() { $(document).on("click", ".select", function() {
$(this).removeClass("select").addClass("unselect"); $(this).removeClass("select").addClass("unselect");
}); });
// Insert tag when click on the button "add". // Insert tag when click on the button "ADD"
$(document).on("click", "#jstagAdd", function(e) { $(document).on("click", "#jstagAdd", function(e) {
// Prevent forum submit
// Prevent forum submit.
e.preventDefault(); e.preventDefault();
insertTag(); insertTag();
}); });
// Insert tag when press enter key. // Insert tag when press enter key
$("#jstagInput").keypress(function(e) { $("#jstagInput").keypress(function(e) {
if (e.which == 13) {
if(e.which == 13) {
insertTag(); insertTag();
} }
}); });
// Before form submit. // Before form submit
$("form").submit(function(e) { $("form").submit(function(e) {
// For each span.select make an array then implode with comma glue
// For each span.select make an array then implode with comma glue.
var list = $("#jstagList > span.select").map(function() { var list = $("#jstagList > span.select").map(function() {
return $(this).html(); return $(this).html();
}).get().join(","); }).get().join(",");
// Insert the tags separated by comma in the input hiden field. // Insert the tags separated by comma in the input hidden field
$("#jstags").val( list ); $("#jstags").val( list );
return true;
}); });
});
});
</script>

View File

@ -53,4 +53,16 @@ function generateSlug(text, parentKey, currentKey, writeResponse) {
}); });
} }
function sanitizeHTML(text) {
var map = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#039;'
};
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
}
</script> </script>

View File

@ -2,7 +2,7 @@
"language-data": { "language-data": {
"native": "Polski (Polska)", "native": "Polski (Polska)",
"english-name": "Polish", "english-name": "Polish",
"last-update": "2017-10-12", "last-update": "2017-10-28",
"author": "Dawid dave Stawicki", "author": "Dawid dave Stawicki",
"email": "dawid.stawicki@windowslive.com", "email": "dawid.stawicki@windowslive.com",
"website": "http:\/\/" "website": "http:\/\/"
@ -206,8 +206,8 @@
"scheduled-content": "Zaplanowane wpisy", "scheduled-content": "Zaplanowane wpisy",
"there-are-no-scheduled-content": "Brak zaplanowanej zawartości.", "there-are-no-scheduled-content": "Brak zaplanowanej zawartości.",
"new-content-created": "Utworzono nową zawartość", "new-content-created": "Utworzono nową zawartość",
"content-edited": "Content edited", "content-edited": "Edytowano zawartość",
"content-deleted": "Contente deleted", "content-deleted": "Usuniętyo zawartość",
"undefined": "Niezdefiniowany", "undefined": "Niezdefiniowany",
"create-new-content-for-your-site": "Utwórz nową zawartość swojej strony", "create-new-content-for-your-site": "Utwórz nową zawartość swojej strony",
"there-are-no-draft-content": "Brak szkiców.", "there-are-no-draft-content": "Brak szkiców.",
@ -225,11 +225,11 @@
"pagebreak": "Podział strony", "pagebreak": "Podział strony",
"pages": "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", "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": "Wstecz",
"previous-page": "Previous page", "previous-page": "Poprzednia strona",
"next-page": "Next page", "next-page": "Kolejna strona",
"scheduled": "Scheduled", "scheduled": "Zaplanowane",
"this-token-is-similar-to-a-password-it-should-not-be-shared": "This token is similar to a password, it should not be shared.", "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": "Congratulations you have successfully installed your **Bludit**.", "congratulations-you-have-successfully-installed-your-bludit": "Gratulacje, **Bludit** został zainstalowany pomyślnie.",
"this-theme-may-not-be-supported-by-this-version-of-bludit": "This theme may not be supported by this version of Bludit" "this-theme-may-not-be-supported-by-this-version-of-bludit": "Ten motyw może być niekompatybilny z Twoją wersją Bludit"
} }

View File

@ -2,22 +2,22 @@
"language-data": { "language-data": {
"native": "Українська (Україна)", "native": "Українська (Україна)",
"english-name": "Ukrainian", "english-name": "Ukrainian",
"last-update": "2016-10-28", "last-update": "2017-11-01",
"author": "Allec Bernz", "author": "Aleksei86",
"email": "admin@allec.info", "email": "",
"website": "http:\/\/allec.info" "website": ""
}, },
"dashboard": "Панель управління", "dashboard": "Панель управління",
"manage-users": "Управління користувачами", "manage-users": "Управління користувачами",
"manage-categories": "Manage categories", "manage-categories": "Управління категоріями",
"general-settings": "Загальні налаштування", "general-settings": "Загальні налаштування",
"advanced-settings": "Додаткові налаштування", "advanced-settings": "Додаткові налаштування",
"thanks-for-support-bludit": "Thanks for support Bludit", "thanks-for-support-bludit": "Дякуємо за підтримку Bludit",
"upgrade-to-bludit-pro": "Upgrade to Bludit PRO", "upgrade-to-bludit-pro": "Оновити до Bludit PRO",
"language": "Мова", "language": "Мова",
"plugin": "Plugin", "plugin": "Плагін",
"plugins": "Плагіни", "plugins": "Плагіни",
"developers": "Developers", "developers": "Розробники",
"themes": "Теми", "themes": "Теми",
"about": "Інформація", "about": "Інформація",
"url": "URL", "url": "URL",
@ -27,27 +27,27 @@
"publish": "Опублікувати", "publish": "Опублікувати",
"manage": "Керування", "manage": "Керування",
"content": "Зміст", "content": "Зміст",
"category": "Category", "category": "Категорія",
"categories": "Categories", "categories": "Категорії",
"users": "Користувачі", "users": "Користувачі",
"settings": "Параметри", "settings": "Параметри",
"general": "Загальні", "general": "Загальні",
"advanced": "Розширені", "advanced": "Розширені",
"new-content": "New content", "new-content": "Новий контент",
"manage-content": "Manage content", "manage-content": "Керування контентом",
"add-new-content": "Add new content", "add-new-content": "Додати новий контент",
"new-category": "New category", "new-category": "Нова категорія",
"you-do-not-have-sufficient-permissions": "Ви не маєте прав на доступ до цієї сторінки, зверніться до адміністратора.", "you-do-not-have-sufficient-permissions": "Ви не маєте прав на доступ до цієї сторінки, зверніться до адміністратора.",
"add-a-new-user": "Додати нового користувача", "add-a-new-user": "Додати нового користувача",
"url-associated-with-the-content": "URL associated with the content.", "url-associated-with-the-content": "URL-адреса, пов'язана з контентом.",
"language-and-timezone": "Мова та часовий пояс", "language-and-timezone": "Мова та часовий пояс",
"change-your-language-and-region-settings": "Змінити Вашу мову та регіональні налаштування.", "change-your-language-and-region-settings": "Змінити Вашу мову та регіональні налаштування.",
"notifications": "Повідомлення", "notifications": "Повідомлення",
"plugin-activated": "Plugin activated", "plugin-activated": "Плагін активований",
"plugin-deactivated": "Plugin deactivated", "plugin-deactivated": "Плагін вимкнено",
"new-theme-configured": "New theme configured", "new-theme-configured": "Нову тему налаштовано",
"changes-on-settings": "Changes on settings", "changes-on-settings": "Зміни в налаштуваннях",
"plugin-configured": "Plugin configured", "plugin-configured": "Плагін налаштовано",
"welcome-to-bludit": "Ласкаво просимо до Bludit", "welcome-to-bludit": "Ласкаво просимо до Bludit",
"statistics": "Статистика", "statistics": "Статистика",
"drafts": "Чернетки", "drafts": "Чернетки",
@ -63,7 +63,7 @@
"cover-image": "Зображення обкладинки", "cover-image": "Зображення обкладинки",
"drag-and-drop-or-click-here": "Перетягніть або натисніть тут", "drag-and-drop-or-click-here": "Перетягніть або натисніть тут",
"there-are-no-images": "Немає зображень", "there-are-no-images": "Немає зображень",
"upload-and-more-images": "Upload and more images", "upload-and-more-images": "Завантажити та інші зображення",
"click-on-the-image-for-options": "Натисніть на зображення, щоб переглянути параметри.", "click-on-the-image-for-options": "Натисніть на зображення, щоб переглянути параметри.",
"click-here-to-cancel": "Натисніть тут, щоб скасувати.", "click-here-to-cancel": "Натисніть тут, щоб скасувати.",
"insert-image": "Вставити зображення", "insert-image": "Вставити зображення",
@ -75,21 +75,21 @@
"published": "Опубліковано", "published": "Опубліковано",
"draft": "Чернетка", "draft": "Чернетка",
"empty-title": "Порожній заголовок", "empty-title": "Порожній заголовок",
"empty": "empty", "empty": "порожньо",
"date": "Дата", "date": "Дата",
"external-cover-image": "External cover image", "external-cover-image": "Зовнішнє зображення обкладинки",
"parent": "Джерело", "parent": "Джерело",
"full-image-url": "Full image URL.", "full-image-url": "Повна URL-адреса зображення.",
"this-field-is-used-when-you-order-the-content-by-position": "This field is used when you order the content by position.", "this-field-is-used-when-you-order-the-content-by-position": "Це поле використовується під час сортування контенту за позицією.",
"position": "Позиція", "position": "Позиція",
"friendly-url": "Дружні URL", "friendly-url": "Дружні URL",
"image-description": "Опис зображення", "image-description": "Опис зображення",
"add-a-new-category": "Add a new category", "add-a-new-category": "Додати нову категорію",
"name": "Ім'я", "name": "Ім'я",
"username": "Ім'я користувача", "username": "Ім'я користувача",
"first-name": "Ім'я", "first-name": "Ім'я",
"last-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", "email": "Email",
"role": "Роль", "role": "Роль",
"registered": "Зареєстрований", "registered": "Зареєстрований",
@ -119,43 +119,43 @@
"author": "Автор", "author": "Автор",
"activate": "Активувати", "activate": "Активувати",
"deactivate": "Деактивувати", "deactivate": "Деактивувати",
"edit-category": "Edit category", "edit-category": "Редагувати категорію",
"delete": "Видалити", "delete": "Видалити",
"password": "Пароль", "password": "Пароль",
"confirm-password": "Підтвердіть пароль", "confirm-password": "Підтвердіть пароль",
"editor": "Редактор", "editor": "Редактор",
"administrator": "Адміністратор", "administrator": "Адміністратор",
"edit-user": "Редагувати користувача", "edit-user": "Редагувати користувача",
"edit-content": "Edit content", "edit-content": "Редагувати контент",
"profile": "Профіль", "profile": "Профіль",
"change-password": "Зміна пароля", "change-password": "Зміна пароля",
"enabled": "Увімкнено", "enabled": "Увімкнено",
"disable-the-user": "Відключити користувача", "disable-the-user": "Відключити користувача",
"profile-picture": "Зображення профілю", "profile-picture": "Зображення профілю",
"edit-or-delete-your-categories": "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", "create-a-new-category-to-organize-your-content": "Створити нову категорію, щоб організувати ваш контент",
"confirm-delete-this-action-cannot-be-undone": "Підтвердіть видалення, ця дія не може бути скасована.", "confirm-delete-this-action-cannot-be-undone": "Підтвердіть видалення, ця дія не може бути скасована.",
"do-you-want-to-disable-the-user": "Ви хочете відключити користувача?", "do-you-want-to-disable-the-user": "Ви хочете відключити користувача?",
"new-password": "Новий пароль", "new-password": "Новий пароль",
"you-can-change-this-field-when-save-the-current-changes": "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", "items-per-page": "Елементів на сторінку",
"invite-a-friend-to-collaborate-on-your-site": "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.", "number-of-items-to-show-per-page": "Кількість елементів для показу на сторінці.",
"website-or-blog": "Website or Blog", "website-or-blog": "Веб-сайт або Блог",
"order-content-by": "Order content By", "order-content-by": "Сортувати контент За",
"edit-or-delete-content-from-your-site": "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.", "order-the-content-by-date-to-build-a-blog": "Відсортуйте контент за датою, щоб створити Блог або за позицією, щоб створити Веб-сайт.",
"page-not-found-content": "Hey! look like the page doesn't exist.", "page-not-found-content": "Привіт! Схоже ця сторінка не існує.",
"page-not-found": "Page not found", "page-not-found": "Сторінку не знайдено",
"predefined-pages": "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-when-the-page-doesnt-exist": "Повідомлення коли сторінка не існує, залиште її порожньою, якщо ви хочете повернути повідомлення за промовчанням.",
"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.", "returning-page-for-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).", "full-url-of-your-site": "Повна URL-адреса вашого сайту. Заповніть протокол HTTP або HTTPS (тільки якщо ввімкнуто SSL на вашому сервері).",
"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.", "with-the-locales-you-can-set-the-regional-user-interface": "За допомогою локалей ви можете встановити регіональний користувальницький інтерфейс, наприклад, дати на вашій мові. Локалі повинні бути встановлені у вашій системі.",
"bludit-installer": "Інсталятор Bludit", "bludit-installer": "Інсталятор Bludit",
"choose-your-language": "Оберіть свою мову", "choose-your-language": "Оберіть свою мову",
"next": "Далі", "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": "Показати пароль", "show-password": "Показати пароль",
"install": "Встановити", "install": "Встановити",
"login": "Увійти", "login": "Увійти",
@ -165,71 +165,72 @@
"whats-next": "Що далі", "whats-next": "Що далі",
"username-or-password-incorrect": "Неправильне ім'я користувача або пароль", "username-or-password-incorrect": "Неправильне ім'я користувача або пароль",
"follow-bludit-on": "Слідуйте за Bludit на", "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}})", "manage-your-bludit-from-the-admin-panel": "Керуйте вашим Bludit через [панель управління]({{ADMIN_AREA_LINK}})",
"chat-with-developers-and-users-on-gitter": "Чат з розробниками і користувачами [Gitter](https:\/\/gitter.im\/bludit\/support)", "chat-with-developers-and-users-on-gitter": "Чат з розробниками і користувачами [Gitter](https:\/\/gitter.im\/bludit\/support)",
"this-is-a-brief-description-of-yourself-our-your-site": "Це короткий опис про себе або про сайт, щоб змінити цей текст зайдіть в панель адміністратора, налаштування, плагіни, і налаштуйте плагін про сайт.", "this-is-a-brief-description-of-yourself-our-your-site": "Це короткий опис про себе або про сайт, щоб змінити цей текст зайдіть в панель адміністратора, налаштування, плагіни, і налаштуйте плагін про сайт.",
"read-the-documentation-for-more-information": "Читайте [документацію](https:\/\/docs.bludit.com) для отримання додаткової інформації", "read-the-documentation-for-more-information": "Читайте [документацію](https:\/\/docs.bludit.com) для отримання додаткової інформації",
"new-version-available": "New version available", "new-version-available": "Нова версія доступна",
"new-category-created": "New category created", "new-category-created": "Створено нову категорію",
"category-deleted": "Category deleted", "category-deleted": "Категорія видалена",
"category-edited": "Category edited", "category-edited": "Категорія відредагована",
"new-user-created": "New user created", "new-user-created": "Новий користувач створений",
"user-edited": "User edited", "user-edited": "Користувач відредагований",
"user-deleted": "Користувач видалений", "user-deleted": "Користувач видалений",
"recommended-for-recovery-password-and-notifications": "Recommended for recovery password and notifications.", "recommended-for-recovery-password-and-notifications": "Рекомендується для відновлення пароля та сповіщень.",
"authentication-token": "Authentication Token", "authentication-token": "Токен аутентифікації",
"token": "Token", "token": "Токен",
"current-status": "Current status", "current-status": "Поточний стан",
"upload-image": "Завантажити зображення", "upload-image": "Завантажити зображення",
"the-changes-have-been-saved": "Зміни були збережені", "the-changes-have-been-saved": "Зміни були збережені",
"label": "Label", "label": "Мітка",
"links": "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.", "this-title-is-almost-always-used-in-the-sidebar-of-the-site": "Цей заголовок майже завжди використовується на бічній панелі сайту.",
"password-must-be-at-least-6-characters-long": "Пароль повинен містити не менше 6 символів", "password-must-be-at-least-6-characters-long": "Пароль повинен містити не менше 6 символів",
"ip-address-has-been-blocked": "IP-адресу заблоковано.", "ip-address-has-been-blocked": "IP-адресу заблоковано.",
"try-again-in-a-few-minutes": "Повторіть спробу через декілька хвилин.", "try-again-in-a-few-minutes": "Повторіть спробу через декілька хвилин.",
"content-published-from-scheduler": "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.", "installer-page-about-content": "Сторінка Про нас є важливою для потенційних клієнтів та партнерів. Для тих, кому цікаво, хто стоїть за веб-сайтом, Ваша сторінка Про нас є першим джерелом інформації.",
"blog": "Blog", "blog": "Блог",
"complete-all-fields": "Complete all fields", "complete-all-fields": "Заповніть всі поля",
"static": "Static", "static": "Статичний",
"about-your-site-or-yourself": "About your site or yourself", "about-your-site-or-yourself": "Про ваш сайт або про вас",
"homepage": "Homepage", "homepage": "Домашня сторінка",
"disabled": "Disabled", "disabled": "Вимкнено",
"to-enable-the-user-you-must-set-a-new-password": "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-associate-his-content-to-admin-user": "Видалити користувача та пов'язати його контент з адміністратором",
"delete-the-user-and-all-his-content": "Delete the user and all his content", "delete-the-user-and-all-his-content": "Видалити користувача та весь його контент",
"user-disabled": "User disabled", "user-disabled": "Користувач відключений",
"user-password-changed": "User password changed", "user-password-changed": "Змінено пароль користувача",
"the-password-and-confirmation-password-do-not-match": "The password and confirmation password do not match", "the-password-and-confirmation-password-do-not-match": "Пароль і підтвердження пароля не співпадають",
"scheduled-content": "Scheduled content", "scheduled-content": "Запланований контент",
"there-are-no-scheduled-content": "There are no scheduled content.", "there-are-no-scheduled-content": "Немає запланованого контенту.",
"new-content-created": "New content created", "new-content-created": "Новий контент створено",
"content-edited": "Content edited", "content-edited": "Контент відредаговано",
"content-deleted": "Contente deleted", "content-deleted": "Контент видалено",
"undefined": "Undefined", "undefined": "Невизначено",
"create-new-content-for-your-site": "Create new content for your site", "create-new-content-for-your-site": "Створіть новий контент для свого сайту",
"there-are-no-draft-content": "There are no draft content.", "there-are-no-draft-content": "Немає чорнового контенту.",
"order-items-by": "Order items by", "order-items-by": "Сортувати елементи за",
"all-content": "All content", "all-content": "Весь контент",
"dynamic": "Dynamic", "dynamic": "Динамічний",
"type": "Type", "type": "Тип",
"draft-content": "Draft content", "draft-content": "Чорновий контент",
"post": "Post", "post": "Опублікувати",
"default": "Default", "default": "За промовчанням",
"latest-content": "Latest content", "latest-content": "Найновіший контент",
"default-message": "Default message", "default-message": "Повідомлення за замовчуванням",
"no-parent": "No parent", "no-parent": "Немає батьківського елемента",
"have-you-seen-my-ball": "Have you seen my ball?", "have-you-seen-my-ball": "Ти бачив мій м'яч?",
"pagebreak": "Page break", "pagebreak": "Розрив сторінки",
"pages": "Сторінки", "pages": "Сторінки",
"this-plugin-may-not-be-supported-by-this-version-of-bludit": "This plugin may not be supported by this version of Bludit", "this-plugin-may-not-be-supported-by-this-version-of-bludit": "Цей плагін може не підтримуватися цією версією Bludit",
"previous": "Previous", "previous": "Попередній",
"previous-page": "Previous page", "previous-page": "Попередня сторінка",
"next-page": "Next page", "next-page": "Наступна сторінка",
"scheduled": "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.", "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**", "congratulations-you-have-successfully-installed-your-bludit": "Вітаємо, ви успішно встановили **Bludit**",
"this-theme-may-not-be-supported-by-this-version-of-bludit": "This theme may not be supported by this version of Bludit" "this-theme-may-not-be-supported-by-this-version-of-bludit": "Ця тема може не підтримуватися цією версією Bludit",
} "read-more": "Читати далі"
}

View File

@ -0,0 +1,8 @@
{
"plugin-data":
{
"name": "Категорії",
"description": "Показує всі категорії на бічній панелі."
},
"hide-categories-without-content": "Сховати категорії без вмісту"
}

View File

@ -136,7 +136,7 @@ class pluginsimpleMDE extends Plugin {
output = "\n'.PAGE_BREAK.'\n"; output = "\n'.PAGE_BREAK.'\n";
cm.replaceSelection(output); cm.replaceSelection(output);
}, },
className: "fa fa-minus-square-o", className: "fa fa-scissors",
title: "'.$Language->get('Pagebreak').'", title: "'.$Language->get('Pagebreak').'",
}] }]
});'; });';

View File

@ -37,7 +37,7 @@ class pluginVersion extends Plugin {
} }
if ($this->newVersion()) { if ($this->newVersion()) {
$html = '<div id="plugin-version"><a href="https://www.bludit.com"><i class="fa fa-download" aria-hidden="true"></i> '.$Language->get('New version available').'</a></div>'; $html = '<div id="plugin-version"><a target="_blank" href="https://www.bludit.com"><i class="fa fa-download" aria-hidden="true"></i> '.$Language->get('New version available').'</a></div>';
} else { } else {
if(defined('BLUDIT_PRO')) { if(defined('BLUDIT_PRO')) {
$html = '<div id="plugin-version">Bludit PRO v'.BLUDIT_VERSION.'</div>'; $html = '<div id="plugin-version">Bludit PRO v'.BLUDIT_VERSION.'</div>';