diff --git a/admin/themes/default/css/default.css b/admin/themes/default/css/default.css index 378232e9..4c58ae51 100644 --- a/admin/themes/default/css/default.css +++ b/admin/themes/default/css/default.css @@ -103,6 +103,7 @@ button.delete-button:hover { height: 400px; } + /* ----------- ALERT ----------- */ #alert { @@ -235,9 +236,16 @@ div.plugin-links > span.separator { color: #AAAAAA; } +#jsformplugin textarea { + min-width: 400px; + width: 60%; + min-height: 100px; +} + #jsformplugin input[type=text] { min-width: 400px; width: 60%; + height: 37px; } #jsformplugin input[type="checkbox"] { @@ -248,6 +256,6 @@ div.plugin-links > span.separator { #jsformplugin label.forCheckbox { margin-left: 3px; - margin-bottom: 10px; + margin-bottom: 0px !important; display: inline-block; } diff --git a/admin/themes/default/init.php b/admin/themes/default/init.php index 58f1cce4..1f3db143 100644 --- a/admin/themes/default/init.php +++ b/admin/themes/default/init.php @@ -159,6 +159,9 @@ class HTML { $("#jsaddImage").on("click", function() { var filename = $("#jsimageList option:selected").text(); + if(!filename.trim()) { + return false; + } var textareaValue = $("#jscontent").val(); $("#jscontent").val(textareaValue + "\"\"" + "\n"); }); @@ -187,6 +190,10 @@ class HTML { bar.css("width", "100%").text("100%"); setTimeout(function() { progressbar.addClass("uk-hidden"); }, 250); $("#jsimageList").prepend(""); + }, + + notallowed: function(file, settings) { + alert("'.$L->g('Supported image file types').' "+settings.allow); } }; diff --git a/admin/views/manage-posts.php b/admin/views/manage-posts.php index 3903eefc..01cf6c7b 100644 --- a/admin/views/manage-posts.php +++ b/admin/views/manage-posts.php @@ -26,7 +26,7 @@ echo ' echo ''; echo ''.($status?''.$status.'':'').($Post->title()?$Post->title():''.$Language->g('Empty title').' ').''; - echo ''.$Post->date().''; + echo ''.$Post->dateRaw().''; echo ''.$Url->filters('post').'/'.$Post->key().''; echo ''; } diff --git a/admin/views/settings-regional.php b/admin/views/settings-regional.php index d06bb019..bb84a0a3 100644 --- a/admin/views/settings-regional.php +++ b/admin/views/settings-regional.php @@ -35,6 +35,13 @@ HTML::formOpen(array('class'=>'uk-form-horizontal')); 'tip'=>$L->g('you-can-use-this-field-to-define-a-set-off') )); + HTML::formInputText(array( + 'name'=>'dateFormat', + 'label'=>$L->g('Date format'), + 'value'=>$Site->dateFormat(), + 'class'=>'uk-width-1-2 uk-form-medium' + )); + echo '
diff --git a/install.php b/install.php index 7da52d20..f2bc046d 100644 --- a/install.php +++ b/install.php @@ -7,6 +7,11 @@ * Bludit is opensource software licensed under the MIT license. */ +// Check PHP version +if(version_compare(phpversion(), '5.3', '<')) { + exit('Current PHP version '.phpversion().', you need > 5.3. (ERR_202)'); +} + // Security constant define('BLUDIT', true); @@ -139,19 +144,6 @@ function checkSystem() $phpModules = get_loaded_extensions(); } - // If the php version is less than 5.3, then don't check others requirements. - if(!version_compare(phpversion(), '5.3', '>=')) - { - $errorText = 'Current PHP version '.phpversion().', you need > 5.3. (ERR_202)'; - error_log($errorText, 0); - - $tmp['title'] = 'PHP version'; - $tmp['errorText'] = $errorText; - array_push($stdOut, $tmp); - - return $stdOut; - } - if(!file_exists(PATH_ROOT.'.htaccess')) { $errorText = 'Missing file, upload the file .htaccess (ERR_201)'; @@ -202,9 +194,8 @@ function install($adminPassword, $email, $timezoneOffset) $stdOut = array(); - $timezone = timezone_name_from_abbr('', $timezoneOffset, 1); + $timezone = timezone_name_from_abbr('', $timezoneOffset, 0); if($timezone === false) { $timezone = timezone_name_from_abbr('', $timezoneOffset, 0); } // Workaround bug #44780 - date_default_timezone_set($timezone); $currentDate = Date::current(DB_DATE_FORMAT); diff --git a/kernel/abstract/dbjson.class.php b/kernel/abstract/dbjson.class.php index a792164d..ccd3fa80 100644 --- a/kernel/abstract/dbjson.class.php +++ b/kernel/abstract/dbjson.class.php @@ -58,6 +58,15 @@ class dbJSON return count($this->db); } + public function getField($field) + { + if(isset($this->db[$field])) { + return $this->db[$field]; + } + + return $this->dbFields[$field]['value']; + } + // Save the JSON file. public function save() { diff --git a/kernel/boot/init.php b/kernel/boot/init.php index e9471d91..291acba0 100644 --- a/kernel/boot/init.php +++ b/kernel/boot/init.php @@ -75,7 +75,7 @@ define('CLI_STATUS', 'published'); // Database format date define('DB_DATE_FORMAT', 'Y-m-d H:i'); -// Database format date +// Date format for Dashboard schedule posts define('SCHEDULED_DATE_FORMAT', 'd M - h:i a'); // Token time to live for login via email. The offset is defined by http://php.net/manual/en/datetime.modify.php @@ -128,6 +128,7 @@ include(PATH_HELPERS.'email.class.php'); include(PATH_HELPERS.'filesystem.class.php'); include(PATH_HELPERS.'alert.class.php'); include(PATH_HELPERS.'paginator.class.php'); +include(PATH_HELPERS.'image.class.php'); // Session Session::start(); @@ -147,13 +148,16 @@ $Parsedown = new Parsedown(); $Security = new Security(); // HTML PATHs -//$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/'; $base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; $base = dirname($base); if($base!=DS) { $base = $base.'/'; } +else { + // Workaround for Windows Web Servers + $base = '/'; +} define('HTML_PATH_ROOT', $base); @@ -173,7 +177,7 @@ define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/'); define('JQUERY', HTML_PATH_ADMIN_THEME_JS.'jquery.min.js'); // PHP paths with dependency -define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/'); +define('PATH_THEME', PATH_ROOT.'themes'.DS.$Site->theme().DS); define('PATH_THEME_PHP', PATH_THEME.'php'.DS); define('PATH_THEME_CSS', PATH_THEME.'css'.DS); define('PATH_THEME_JS', PATH_THEME.'js'.DS); diff --git a/kernel/boot/rules/70.posts.php b/kernel/boot/rules/70.posts.php index 62f6ff9e..2294d624 100644 --- a/kernel/boot/rules/70.posts.php +++ b/kernel/boot/rules/70.posts.php @@ -68,6 +68,13 @@ function buildPost($key) $Post->setField('breakContent', $explode[0], true); $Post->setField('readMore', !empty($explode[1]), true); + // Date format + $postDate = $Post->date(); + $Post->setField('dateRaw', $postDate, true); + + $postDateFormated = $Post->dateRaw( $Site->dateFormat() ); + $Post->setField('date', $postDateFormated, true); + // Parse username for the post. if( $dbUsers->userExists( $Post->username() ) ) { diff --git a/kernel/dbpages.class.php b/kernel/dbpages.class.php index 410553ad..9cf55dd1 100644 --- a/kernel/dbpages.class.php +++ b/kernel/dbpages.class.php @@ -11,7 +11,7 @@ class dbPages extends dbJSON 'username'=> array('inFile'=>false, 'value'=>''), 'tags'=> array('inFile'=>false, 'value'=>array()), 'status'=> array('inFile'=>false, 'value'=>'draft'), - 'date'=> array('inFile'=>false, 'value'=>0), + 'date'=> array('inFile'=>false, 'value'=>''), 'position'=> array('inFile'=>false, 'value'=>0) ); @@ -34,9 +34,7 @@ class dbPages extends dbJSON } // Current date. - if(empty($args['date'])) { - $args['date'] = Date::current(DB_DATE_FORMAT); - } + $args['date'] = Date::current(DB_DATE_FORMAT); // Verify arguments with the database fields. foreach($this->dbFields as $field=>$options) diff --git a/kernel/dbsite.class.php b/kernel/dbsite.class.php index b1058d9a..7a000448 100644 --- a/kernel/dbsite.class.php +++ b/kernel/dbsite.class.php @@ -2,7 +2,7 @@ class dbSite extends dbJSON { - private $dbFields = array( + public $dbFields = array( 'title'=> array('inFile'=>false, 'value'=>'I am Guybrush Threepwood, mighty developer'), 'slogan'=> array('inFile'=>false, 'value'=>''), 'description'=> array('inFile'=>false, 'value'=>''), @@ -19,7 +19,9 @@ class dbSite extends dbJSON 'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'), 'url'=> array('inFile'=>false, 'value'=>''), 'cliMode'=> array('inFile'=>false, 'value'=>true), - 'emailFrom'=> array('inFile'=>false, 'value'=>'') + 'emailFrom'=> array('inFile'=>false, 'value'=>''), + 'dateFormat'=> array('inFile'=>false, 'value'=>'F j, Y'), + 'timeFormat'=> array('inFile'=>false, 'value'=>'g:i a') ); function __construct() @@ -61,9 +63,9 @@ class dbSite extends dbJSON public function uriFilters($filter='') { $filters['admin'] = '/admin/'; - $filters['post'] = $this->db['uriPost']; - $filters['page'] = $this->db['uriPage']; - $filters['tag'] = $this->db['uriTag']; + $filters['post'] = $this->getField('uriPost'); + $filters['page'] = $this->getField('uriPage'); + $filters['tag'] = $this->getField('uriTag'); if(empty($filter)) { return $filters; @@ -74,70 +76,83 @@ class dbSite extends dbJSON public function urlPost() { - return $this->url().ltrim($this->db['uriPost'], '/'); + $filter = $this->getField('uriPost'); + return $this->url().ltrim($filter, '/'); } public function urlPage() { - return $this->url().ltrim($this->db['uriPage'], '/'); + $filter = $this->getField('uriPage'); + return $this->url().ltrim($filter, '/'); } public function urlTag() { - return $this->url().ltrim($this->db['uriTag'], '/'); + $filter = $this->getField('uriTag'); + return $this->url().ltrim($filter, '/'); } // Returns the site title. public function title() { - return $this->db['title']; + return $this->getField('title'); } public function emailFrom() { - return $this->db['emailFrom']; + return $this->getField('emailFrom'); + } + + public function dateFormat() + { + return $this->getField('dateFormat'); + } + + public function timeFormat() + { + return $this->getField('timeFormat'); } // Returns the site slogan. public function slogan() { - return $this->db['slogan']; + return $this->getField('slogan'); } // Returns the site description. public function description() { - return $this->db['description']; + return $this->getField('description'); } // Returns the site theme name. public function theme() { - return $this->db['theme']; + return $this->getField('theme'); } // Returns the admin theme name. public function adminTheme() { - return $this->db['adminTheme']; + return $this->getField('adminTheme'); } // Returns the footer text. public function footer() { - return $this->db['footer']; + return $this->getField('footer'); } // Returns the url site. public function url() { - return $this->db['url']; + return $this->getField('url'); } // Returns TRUE if the cli mode is enabled, otherwise FALSE. public function cliMode() { - return $this->db['cliMode']; + return $this->getField('cliMode'); } // Returns the relative home link @@ -149,25 +164,25 @@ class dbSite extends dbJSON // Returns the timezone. public function timezone() { - return $this->db['timezone']; + return $this->getField('timezone'); } // Returns posts per page. public function postsPerPage() { - return $this->db['postsperpage']; + return $this->getField('postsperpage'); } // Returns the current language. public function language() { - return $this->db['language']; + return $this->getField('language'); } // Returns the current locale. public function locale() { - return $this->db['locale']; + return $this->getField('locale'); } // Returns the current language in short format. @@ -183,7 +198,7 @@ class dbSite extends dbJSON // Returns the current homepage. public function homepage() { - return $this->db['homepage']; + return $this->getField('homepage'); } // Set the locale. diff --git a/kernel/helpers/image.class.php b/kernel/helpers/image.class.php new file mode 100644 index 00000000..1ee2453e --- /dev/null +++ b/kernel/helpers/image.class.php @@ -0,0 +1,232 @@ +image = $this->openImage($fileName); + + // *** Get width and height + $this->width = imagesx($this->image); + $this->height = imagesy($this->image); + + $this->resizeImage($newWidth, $newHeight, $option); + } + + public function saveImage($savePath, $imageQuality="100", $force_jpg=false) + { + $extension = strtolower(pathinfo($savePath, PATHINFO_EXTENSION)); + + // Remove the extension + $filename = substr($savePath, 0,strrpos($savePath,'.')); + + $path_complete = $filename.'.'.$extension; + + if($force_jpg) + { + imagejpeg($this->imageResized, $filename.'.jpg', $imageQuality); + } + else + { + switch($extension) + { + case 'jpg': + case 'jpeg': + if (imagetypes() & IMG_JPG) { + imagejpeg($this->imageResized, $path_complete, $imageQuality); + } + break; + + case 'gif': + if (imagetypes() & IMG_GIF) { + imagegif($this->imageResized, $path_complete); + } + break; + + case 'png': + // *** Scale quality from 0-100 to 0-9 + $scaleQuality = round(($imageQuality/100) * 9); + + // *** Invert quality setting as 0 is best, not 9 + $invertScaleQuality = 9 - $scaleQuality; + + if (imagetypes() & IMG_PNG) { + imagepng($this->imageResized, $path_complete, $invertScaleQuality); + } + break; + + default: + // *** No extension - No save. + break; + } + } + + imagedestroy($this->imageResized); + } + + private function openImage($file) + { + // *** Get extension + $extension = strtolower(strrchr($file, '.')); + + switch($extension) + { + case '.jpg': + case '.jpeg': + $img = imagecreatefromjpeg($file); + break; + case '.gif': + $img = imagecreatefromgif($file); + break; + case '.png': + $img = imagecreatefrompng($file); + break; + default: + $img = false; + break; + } + return $img; + } + + private function resizeImage($newWidth, $newHeight, $option) + { + // *** Get optimal width and height - based on $option + $optionArray = $this->getDimensions($newWidth, $newHeight, $option); + + $optimalWidth = $optionArray['optimalWidth']; + $optimalHeight = $optionArray['optimalHeight']; + + + // *** Resample - create image canvas of x, y size + $this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight); + imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height); + + + // *** if option is 'crop', then crop too + if ($option == 'crop') { + $this->crop($optimalWidth, $optimalHeight, $newWidth, $newHeight); + } + } + + private function getDimensions($newWidth, $newHeight, $option) + { + + if( ($this->width < $newWidth) and ($this->height < $newHeight) ) + { + return array('optimalWidth' => $this->width, 'optimalHeight' => $this->height); + } + + switch ($option) + { + case 'exact': + $optimalWidth = $newWidth; + $optimalHeight= $newHeight; + break; + case 'portrait': + $optimalWidth = $this->getSizeByFixedHeight($newHeight); + $optimalHeight= $newHeight; + break; + case 'landscape': + $optimalWidth = $newWidth; + $optimalHeight= $this->getSizeByFixedWidth($newWidth); + break; + case 'auto': + $optionArray = $this->getSizeByAuto($newWidth, $newHeight); + $optimalWidth = $optionArray['optimalWidth']; + $optimalHeight = $optionArray['optimalHeight']; + break; + case 'crop': + $optionArray = $this->getOptimalCrop($newWidth, $newHeight); + $optimalWidth = $optionArray['optimalWidth']; + $optimalHeight = $optionArray['optimalHeight']; + break; + } + + return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight); + } + + private function getSizeByFixedHeight($newHeight) + { + $ratio = $this->width / $this->height; + $newWidth = $newHeight * $ratio; + return $newWidth; + } + + private function getSizeByFixedWidth($newWidth) + { + $ratio = $this->height / $this->width; + $newHeight = $newWidth * $ratio; + return $newHeight; + } + + private function getSizeByAuto($newWidth, $newHeight) + { + if ($this->height < $this->width) + // *** Image to be resized is wider (landscape) + { + $optimalWidth = $newWidth; + $optimalHeight= $this->getSizeByFixedWidth($newWidth); + } + elseif ($this->height > $this->width) + // *** Image to be resized is taller (portrait) + { + $optimalWidth = $this->getSizeByFixedHeight($newHeight); + $optimalHeight= $newHeight; + } + else + // *** Image to be resizerd is a square + { + if ($newHeight < $newWidth) { + $optimalWidth = $newWidth; + $optimalHeight= $this->getSizeByFixedWidth($newWidth); + } else if ($newHeight > $newWidth) { + $optimalWidth = $this->getSizeByFixedHeight($newHeight); + $optimalHeight= $newHeight; + } else { + // *** Sqaure being resized to a square + $optimalWidth = $newWidth; + $optimalHeight= $newHeight; + } + } + + return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight); + } + + private function getOptimalCrop($newWidth, $newHeight) + { + + $heightRatio = $this->height / $newHeight; + $widthRatio = $this->width / $newWidth; + + if ($heightRatio < $widthRatio) { + $optimalRatio = $heightRatio; + } else { + $optimalRatio = $widthRatio; + } + + $optimalHeight = $this->height / $optimalRatio; + $optimalWidth = $this->width / $optimalRatio; + + return array('optimalWidth' => $optimalWidth, 'optimalHeight' => $optimalHeight); + } + + private function crop($optimalWidth, $optimalHeight, $newWidth, $newHeight) + { + // *** Find center - this will be used for the crop + $cropStartX = ( $optimalWidth / 2) - ( $newWidth /2 ); + $cropStartY = ( $optimalHeight/ 2) - ( $newHeight/2 ); + + $crop = $this->imageResized; + //imagedestroy($this->imageResized); + + // *** Now crop from center to exact requested size + $this->imageResized = imagecreatetruecolor($newWidth , $newHeight); + imagecopyresampled($this->imageResized, $crop , 0, 0, $cropStartX, $cropStartY, $newWidth, $newHeight , $newWidth, $newHeight); + } +} diff --git a/kernel/post.class.php b/kernel/post.class.php index f2eb18eb..3abed452 100644 --- a/kernel/post.class.php +++ b/kernel/post.class.php @@ -101,7 +101,13 @@ class Post extends fileContent // Returns the post date according to locale settings and format settings. public function date($format=false) { - $date = $this->getField('date'); + return $this->getField('date'); + } + + // Returns the post date according to locale settings and format as database stored. + public function dateRaw($format=false) + { + $date = $this->getField('dateRaw'); if($format) { return Date::format($date, DB_DATE_FORMAT, $format); diff --git a/languages/bg_BG.json b/languages/bg_BG.json index aaae30e4..2767658b 100644 --- a/languages/bg_BG.json +++ b/languages/bg_BG.json @@ -3,7 +3,7 @@ { "native": "Български (България)", "english-name": "Bulgarian", - "last-update": "2015-10-29", + "last-update": "2015-11-09", "author": "Христо Дипчиков", "email": "", "website": "www.hristodipchikov.tk" @@ -70,7 +70,7 @@ "timezone": "Часова зона", "locale": "Местоположение", "new-post": "Нова публикация", - "html-and-markdown-code-supported": "Поддръжан код HTML и Markdown ", + "html-and-markdown-code-supported": "Поддръжан код HTML и Markdown ", "new-page": "Нова страница", "manage-posts": "Управление на публикациите", "published-date": "Дата на побликуване", @@ -116,9 +116,9 @@ "add-or-edit-description-tags-or": "Добавяне или редактиране на описание, eтикети или модифициране URL.", "select-your-sites-language": "Изберете системен език.", "select-a-timezone-for-a-correct": "Изберете часова зона за правилтото показване на дата / час.", - "you-can-use-this-field-to-define-a-set-of": "Можете да използвате това поле, за набор на параметри, свързани с език, страната и специални преференции.", - "you-can-modify-the-url-which-identifies":"Можете да промените адреса, на дадената страница или публикация използвайки ключови думи. Но с обща дължина повече от 150 символаНапиши етикети.", - "this-field-can-help-describe-the-content": " В това поле може да опишете съдържанието с няколко думи. Но с обща дължина повече от 150 символа.", + "you-can-use-this-field-to-define-a-set-of": "Можете да използвате това поле за избар на параметри свързани с езика, страната и специални преференции.", + "you-can-modify-the-url-which-identifies":"Можете да промените URL адреса , който идентифицира страницата или публикацията използвайки ключови думи, но с обща дължина не повече от 150 символа.", + "this-field-can-help-describe-the-content": " В това поле може да опишете съдържанието с няколко думи, но с обща дължина не повече от 150 символа.", "write-the-tags-separeted-by-comma": "Добавянето на етикети става чрез добавянето на запетая. Например: TAG1, tag2, tag3", "delete-the-user-and-all-its-posts":"Изтриване на потребителя и всички негови публикации.", "delete-the-user-and-associate-its-posts-to-admin-user": "Изтриване на потребителя, без изтриване на неговите публикации.", @@ -139,14 +139,14 @@ "congratulations-you-have-successfully-installed-your-bludit": "Поздравления вие успешно инсталирахте вашият **Bludit**", "whats-next": "Какво следва?", "manage-your-bludit-from-the-admin-panel": "Управлявайте вашият Bludit от [Администраторският панел](./admin/)", - "follow-bludit-on": "Follow Bludit on", - "visit-the-support-forum": "Visit the [forum](http://forum.bludit.com) for support", + "follow-bludit-on": "Последвайте Bludit в", + "visit-the-support-forum": "Посети [форум](http://forum.bludit.com) за подръжка", "read-the-documentation-for-more-information": "Прочети [документацията](http://docs.bludit.com) за повече информация", "share-with-your-friends-and-enjoy": "Споделете с приятелите си", "the-page-has-not-been-found": "Страницата не е намерена.", "error": "Грешна", - "bludit-installer": "Bludit Installer", - "welcome-to-the-bludit-installer": "Welcome to the Bludit installer", + "bludit-installer": "Bludit Инстлатор", + "welcome-to-the-bludit-installer": "Добре дошли в Bludit инсталатор", "complete-the-form-choose-a-password-for-the-username-admin": "Попълнете формуляра, или парола за потребителското име « admin »", "password-visible-field": "Парола във видимото поле!", "install": "Инсталиране", @@ -172,7 +172,7 @@ "configure": "Конфигориране", "uninstall": "Премахване", "change-password": "Промяна на парола:", - "to-schedule-the-post-just-select-the-date-and-time": "За да планирате поста, просто изберете датата и часа.", + "to-schedule-the-post-just-select-the-date-and-time": "За да планирате поста, просто изберете дата и час.", "write-the-tags-separated-by-commas": "Напишете етикети, разделени със запетая.", "status": "Статус", "published": "Пубиликуван", @@ -185,9 +185,9 @@ "bludit-login-access-code": "BLUDIT - Код за достъп", "check-your-inbox-for-your-login-access-code":"Проверете вашата пощенска кутия за вашия код за достъп", "there-was-a-problem-sending-the-email":"Възникна проблем при изпращането на имейла", - "back-to-login-form": "Връщане вкъм входящата форма", - "send-me-a-login-access-code": "Изпрати кода за достъп", - "get-login-access-code": "Вземете кода за достъп", + "back-to-login-form": "Връщане към входяща форма", + "send-me-a-login-access-code": "Изпрати код за достъп", + "get-login-access-code": "Вземете код за достъп", "email-notification-login-access-code": "

Това е уведомление от вашия сайт {{WEBSITE_NAME}}

Вашият код за достъп , последвайте следващата връзката:

{{LINK}}

", "there-are-no-scheduled-posts": "Не са открити планирани публикации.", "show-password": "Покажи паролата", diff --git a/languages/de_DE.json b/languages/de_DE.json index 5501bd96..00978021 100644 --- a/languages/de_DE.json +++ b/languages/de_DE.json @@ -3,7 +3,7 @@ { "native": "Deutsch (Deutschland)", "english-name": "German", - "last-update": "2015-11-05", + "last-update": "2015-11-13", "author": "Edi Goetschel", "email": "egoetschel@clickwork.ch", "website": "http://www.clickwork.ch" @@ -41,8 +41,8 @@ "profile": "Profil", "email": "E-Mail", "settings": "Einstellungen", - "general": "Allgemeine Einstellungen", - "advanced": "Erweiterte Einstellungen", + "general": "Allgemein", + "advanced": "Erweitert", "regional": "Lokalisierung", "about": "Systeminformation", "login": "Anmelden", @@ -163,7 +163,7 @@ "scheduled": "Veröffentlichung geplant.", "publish": "Veröffentlichen", "please-check-your-theme-configuration": "Bitte die Einstellungen des Themes prüfen.", - "plugin-label": "Plugin-Bezeichnung", + "plugin-label": "Titel auf der Website", "enabled": "Aktiviert", "disabled": "Deaktiviert", "cli-mode": "CLI-Modus", @@ -193,8 +193,8 @@ "show-password": "Passwort zeigen", "edit-or-remove-your=pages": "Seiten bearbeiten oder löschen.", "edit-or-remove-your-blogs-posts": "Beiträge bearbeiten oder löschen.", - "general-settings": "Allgemeine Einnstellungen", - "advanced-settings": "Erweiterte Einnstellungen", + "general-settings": "Allgemein", + "advanced-settings": "Erweitert", "manage-users": "Benutzerverwaltung", "view-and-edit-your-profile": "Profil anschauen und bearbeiten.", "password-must-be-at-least-6-characters-long": "Das Passwort muss mindestens 6 Zeichen lang sein", diff --git a/languages/en_US.json b/languages/en_US.json index 405f1f45..4334f55c 100644 --- a/languages/en_US.json +++ b/languages/en_US.json @@ -203,5 +203,8 @@ "images": "Images", "upload-image": "Upload image", "drag-and-drop-or-click-here": "Drag and drop or click here", - "insert-image": "Insert image" + "insert-image": "Insert image", + "supported-image-file-types": "Supported image file types", + "date-format": "Date format", + "time-format": "Time format" } \ No newline at end of file diff --git a/languages/fr_FR.json b/languages/fr_FR.json old mode 100755 new mode 100644 diff --git a/languages/zh_TW.json b/languages/zh_TW.json index 7a2460c1..86df91d4 100644 --- a/languages/zh_TW.json +++ b/languages/zh_TW.json @@ -3,7 +3,7 @@ { "native": "Traditional Chinese (Taiwan)", "english-name": "Traditional Chinese", - "last-update": "2015-11-05", + "last-update": "2015-11-10", "author": "Ethan Chen", "email": "ethan42411@gmail.com", "website": "http://single4.ml" @@ -202,5 +202,6 @@ "images": "圖片", "upload-image": "上傳圖片", "drag-and-drop-or-click-here": "拖曳您的圖片到這裡或是點選這裡選擇圖片", - "insert-image": "插入圖片" + "insert-image": "插入圖片", + "supported-image-file-types": "可以上傳的檔案格式" } diff --git a/plugins/about/languages/en_US.json b/plugins/about/languages/en_US.json new file mode 100644 index 00000000..f058c1fd --- /dev/null +++ b/plugins/about/languages/en_US.json @@ -0,0 +1,12 @@ +{ + "plugin-data": + { + "name": "About", + "description": "Little description about your site or yourself.", + "author": "Bludit", + "email": "", + "website": "https://github.com/dignajar/bludit-plugins", + "version": "0.6", + "releaseDate": "2015-11-13" + } +} \ No newline at end of file diff --git a/plugins/about/plugin.php b/plugins/about/plugin.php new file mode 100644 index 00000000..9e30b80f --- /dev/null +++ b/plugins/about/plugin.php @@ -0,0 +1,47 @@ +dbFields = array( + 'label'=>'About', + 'text'=>'' + ); + } + + public function form() + { + global $Language; + + $html = '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + + $html .= '
'; + $html .= ''; + $html .= ''; + $html .= '
'; + + return $html; + } + + public function siteSidebar() + { + global $Language; + global $dbTags; + global $Url; + + $filter = $Url->filters('tag'); + + $html = '
'; + $html .= '

'.$this->getDbField('label').'

'; + $html .= '
'; + $html .= $this->getDbField('text'); + $html .= '
'; + $html .= '
'; + + return $html; + } +} \ No newline at end of file diff --git a/plugins/disqus/languages/de_DE.json b/plugins/disqus/languages/de_DE.json index 8c5a30d8..5b5f0747 100644 --- a/plugins/disqus/languages/de_DE.json +++ b/plugins/disqus/languages/de_DE.json @@ -8,4 +8,4 @@ "enable-disqus-on-pages": "Disqus auf Seiten verwenden", "enable-disqus-on-posts": "Disqus bei Beiträgen verwenden", "enable-disqus-on-default-home-page": "Disqus auf der Hauptseite verwenden" -} +} \ No newline at end of file diff --git a/plugins/disqus/languages/en_US.json b/plugins/disqus/languages/en_US.json index 2309f4b4..e53d65d6 100644 --- a/plugins/disqus/languages/en_US.json +++ b/plugins/disqus/languages/en_US.json @@ -6,8 +6,8 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "version": "0.6", + "releaseDate": "2015-11-13" }, "disqus-shortname": "Disqus shortname", "enable-disqus-on-pages": "Enable Disqus on pages", diff --git a/plugins/disqus/languages/pl_PL.json b/plugins/disqus/languages/pl_PL.json index 6b8e58ba..13fb0fad 100644 --- a/plugins/disqus/languages/pl_PL.json +++ b/plugins/disqus/languages/pl_PL.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "System komentarzy - Disqus", - "description": "System komentarzy Disqus przechowuje komentarze dla serwisów internetowych. Korzystanie z tej wtyczki wymaga rejestracji w serwisie disqus.com.", - "author": "Bludit", - "email": "", - "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "description": "System komentarzy Disqus przechowuje komentarze dla serwisów internetowych. Korzystanie z tej wtyczki wymaga rejestracji w serwisie disqus.com." }, "disqus-shortname": "Nazwa użytkownika Disqus", "enable-disqus-on-pages": "Włącz Disqus na wszystkich stronach", diff --git a/plugins/googletools/languages/de_DE.json b/plugins/googletools/languages/de_DE.json index b9abb81d..8b3abce9 100644 --- a/plugins/googletools/languages/de_DE.json +++ b/plugins/googletools/languages/de_DE.json @@ -2,15 +2,10 @@ "plugin-data": { "name": "Google-Tools", - "description": "Dieses Plugin erzeugt den Meta-Tag, um deine Website mit den Google Webmasters Tools zu verbinden, und den Code für das JavaScript, der benötigt wird, um Google Analytics verwenden zu können.", - "author": "Bludit", - "email": "", - "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "description": "Dieses Plugin erzeugt den Meta-Tag, um deine Website mit den Google Webmasters Tools zu verbinden, und den Code für das JavaScript, der benötigt wird, um Google Analytics verwenden zu können." }, "google-webmasters-tools": "Google Webmasters Tools", "google-analytics-tracking-id": "Google Analytics ID", "complete-this-field-with-the-google-site-verification": "Gib hier den Google Analytics-Tracking-Code ein, um zu bestätigen, dass die Website Dir gehört.", "complete-this-field-with-the-tracking-id": "Gib hier die Tracking ID ein." -} +} \ No newline at end of file diff --git a/plugins/googletools/languages/en_US.json b/plugins/googletools/languages/en_US.json index 2829cb21..0697e6e0 100644 --- a/plugins/googletools/languages/en_US.json +++ b/plugins/googletools/languages/en_US.json @@ -6,8 +6,8 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "version": "0.6", + "releaseDate": "2015-11-13" }, "google-webmasters-tools": "Google Webmasters tools", "google-analytics-tracking-id": "Google Analytics Tracking ID", diff --git a/plugins/googletools/languages/pl_PL.json b/plugins/googletools/languages/pl_PL.json index 1124e2f5..a20abd2c 100644 --- a/plugins/googletools/languages/pl_PL.json +++ b/plugins/googletools/languages/pl_PL.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Narzędzia Google", - "description": "Wtyczka ta generuje kod metatagów pozwalający zweryfikować stronę z serwisem Narzędzia Google Dla Webmasterów oraz wygenerować kod JavaScript monitorujący ruch z usługą Google Analytics.", - "author": "Bludit", - "email": "", - "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "description": "Wtyczka ta generuje kod metatagów pozwalający zweryfikować stronę z serwisem Narzędzia Google Dla Webmasterów oraz wygenerować kod JavaScript monitorujący ruch z usługą Google Analytics." }, "google-webmasters-tools": "Google Webmasters tools", "google-analytics-tracking-id": "Google Analytics Tracking ID", diff --git a/plugins/maintancemode/languages/en_US.json b/plugins/maintancemode/languages/en_US.json index cc1eb966..3bb095f6 100644 --- a/plugins/maintancemode/languages/en_US.json +++ b/plugins/maintancemode/languages/en_US.json @@ -6,8 +6,8 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "version": "0.6", + "releaseDate": "2015-11-13" }, "enable-maintence-mode": "Enable maintence mode", diff --git a/plugins/maintancemode/languages/pl_PL.json b/plugins/maintancemode/languages/pl_PL.json index 441715d3..4472a53d 100644 --- a/plugins/maintancemode/languages/pl_PL.json +++ b/plugins/maintancemode/languages/pl_PL.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Tryb konserwacji", - "description": "Przełącz stronę w tryb konwersacji (wówczas działać będzie tylko kokpit).", - "author": "Bludit", - "email": "", - "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "description": "Przełącz stronę w tryb konwersacji (wówczas działać będzie tylko kokpit)." }, "enable-maintence-mode": "Włącz tryb konwersacji", diff --git a/plugins/opengraph/languages/en_US.json b/plugins/opengraph/languages/en_US.json index e77e4055..56690f5a 100644 --- a/plugins/opengraph/languages/en_US.json +++ b/plugins/opengraph/languages/en_US.json @@ -6,7 +6,7 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "version": "0.6", + "releaseDate": "2015-11-13" } } \ No newline at end of file diff --git a/plugins/opengraph/languages/pl_PL.json b/plugins/opengraph/languages/pl_PL.json index c34a49cb..41b92e0a 100644 --- a/plugins/opengraph/languages/pl_PL.json +++ b/plugins/opengraph/languages/pl_PL.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Open Graph", - "description": "Protokół Open Graph zezwala stronie na stosowanie meta tagów używanych w serwisach społecznościowych.", - "author": "Bludit", - "email": "", - "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "description": "Protokół Open Graph zezwala stronie na stosowanie meta tagów używanych w serwisach społecznościowych." } } \ No newline at end of file diff --git a/plugins/opengraph/languages/zh_TW.json b/plugins/opengraph/languages/zh_TW.json index 18122e8b..0a59b71d 100644 --- a/plugins/opengraph/languages/zh_TW.json +++ b/plugins/opengraph/languages/zh_TW.json @@ -4,4 +4,4 @@ "name": "開放社交關係圖", "description": "開放社交關係圖協定可以讓任何網頁變成豐富的物件" } -} +} \ No newline at end of file diff --git a/plugins/pages/languages/de_DE.json b/plugins/pages/languages/de_DE.json index c699b09c..5e5930b6 100644 --- a/plugins/pages/languages/de_DE.json +++ b/plugins/pages/languages/de_DE.json @@ -1,8 +1,8 @@ { "plugin-data": { - "name": "Liste aller Seiten", - "description": "Auflistung aller Seiten." + "name": "Anzeige aller Seiten", + "description": "Anzeige aller Seiten in der Seitenleiste (bei Themes mit Seitenleiste)." }, "home": "Hauptseite", diff --git a/plugins/pages/languages/en_US.json b/plugins/pages/languages/en_US.json index 76669570..caf9858c 100644 --- a/plugins/pages/languages/en_US.json +++ b/plugins/pages/languages/en_US.json @@ -6,10 +6,10 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "version": "0.6", + "releaseDate": "2015-11-13" }, - "home": "Home", - "show-home-link": "Show home link" + "home": "Home", + "show-home-link": "Show home link" } \ No newline at end of file diff --git a/plugins/pages/languages/fr_FR.json b/plugins/pages/languages/fr_FR.json index e74fe901..3efb4769 100644 --- a/plugins/pages/languages/fr_FR.json +++ b/plugins/pages/languages/fr_FR.json @@ -5,6 +5,6 @@ "description": "Constitue un menu avec les liens des pages dans la colonne du thème." }, - "home": "Accueil", - "show-home-link": "Afficher le lien de la page d’accueil" + "home": "Accueil", + "show-home-link": "Afficher le lien de la page d’accueil" } \ No newline at end of file diff --git a/plugins/pages/languages/pl_PL.json b/plugins/pages/languages/pl_PL.json index 1473cf84..74a469af 100644 --- a/plugins/pages/languages/pl_PL.json +++ b/plugins/pages/languages/pl_PL.json @@ -2,14 +2,9 @@ "plugin-data": { "name": "Lista stron", - "description": "Wyświetla listę stron znajdujących się w witrynie.", - "author": "Bludit", - "email": "", - "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "description": "Wyświetla listę stron znajdujących się w witrynie." }, - "home": "Strona główna", - "show-home-link": "Pokaż odnośnik do strony głównek" + "home": "Strona główna", + "show-home-link": "Pokaż odnośnik do strony głównek" } \ No newline at end of file diff --git a/plugins/pages/languages/zh_TW.json b/plugins/pages/languages/zh_TW.json index 7ee59e60..e5a6ccb2 100644 --- a/plugins/pages/languages/zh_TW.json +++ b/plugins/pages/languages/zh_TW.json @@ -5,6 +5,6 @@ "description": "顯示所有頁面的列表" }, - "home": "首頁", - "show-home-link": "顯示首頁連結" + "home": "首頁", + "show-home-link": "顯示首頁連結" } \ No newline at end of file diff --git a/plugins/pages/plugin.php b/plugins/pages/plugin.php index c75636f8..324d5bda 100644 --- a/plugins/pages/plugin.php +++ b/plugins/pages/plugin.php @@ -54,24 +54,32 @@ class pluginPages extends Plugin { $parents = $pagesParents[NO_PARENT_CHAR]; foreach($parents as $parent) { - // Print the parent - $html .= '
  • '; - $html .= ''.$parent->title().''; - - // Check if the parent has children - if(isset($pagesParents[$parent->key()])) + // Check if the parent is published + if( $parent->published() ) { - $children = $pagesParents[$parent->key()]; + // Print the parent + $html .= '
  • '; + $html .= ''.$parent->title().''; - // Print children - $html .= '
      '; - foreach($children as $child) + // Check if the parent has children + if(isset($pagesParents[$parent->key()])) { - $html .= '
    • '; - $html .= ''.$child->title().''; - $html .= '
    • '; + $children = $pagesParents[$parent->key()]; + + // Print children + $html .= '
        '; + foreach($children as $child) + { + // Check if the child is published + if( $child->published() ) + { + $html .= '
      • '; + $html .= ''.$child->title().''; + $html .= '
      • '; + } + } + $html .= '
      '; } - $html .= '
    '; } } diff --git a/plugins/simplemde/languages/de_DE.json b/plugins/simplemde/languages/de_DE.json index 1f9261cf..2249bd5c 100644 --- a/plugins/simplemde/languages/de_DE.json +++ b/plugins/simplemde/languages/de_DE.json @@ -6,4 +6,4 @@ }, "toolbar": "Werkzeugleiste", "tab-size": "Abstände der Tabstopps" -} +} \ No newline at end of file diff --git a/plugins/simplemde/languages/en_US.json b/plugins/simplemde/languages/en_US.json index 55f8be9a..9425cf5c 100644 --- a/plugins/simplemde/languages/en_US.json +++ b/plugins/simplemde/languages/en_US.json @@ -6,8 +6,8 @@ "author": "NextStepWebs", "email": "", "website": "https://github.com/NextStepWebs/simplemde-markdown-editor", - "version": "1.8.0", - "releaseDate": "2015-10-29" + "version": "1.8.1", + "releaseDate": "2015-11-13" }, "toolbar": "Toolbar", "tab-size": "Tab size" diff --git a/plugins/simplemde/languages/pl_PL.json b/plugins/simplemde/languages/pl_PL.json index 2c1e492c..020c49fe 100644 --- a/plugins/simplemde/languages/pl_PL.json +++ b/plugins/simplemde/languages/pl_PL.json @@ -2,12 +2,7 @@ "plugin-data": { "name": "Edytor SimpleMDE", - "description": "Prosty, piękny i osadzony w JavaScript edytor markdown stworzony przez @WesCossick. Na potrzeby Bludit dostosowany przez Diego Najara.", - "author": "NextStepWebs", - "email": "", - "website": "https://github.com/NextStepWebs/simplemde-markdown-editor", - "version": "1.7.4", - "releaseDate": "2015-10-02" + "description": "Prosty, piękny i osadzony w JavaScript edytor markdown stworzony przez @WesCossick. Na potrzeby Bludit dostosowany przez Diego Najar." }, "toolbar": "Pasek narzędzi", "tab-size": "Rozmiar wcięcia" diff --git a/plugins/simplemde/plugin.php b/plugins/simplemde/plugin.php index 78be158e..f362c0a7 100644 --- a/plugins/simplemde/plugin.php +++ b/plugins/simplemde/plugin.php @@ -97,6 +97,9 @@ class pluginsimpleMDE extends Plugin { $html .= '$("#jsaddImage").on("click", function() { var filename = $("#jsimageList option:selected" ).text(); + if(!filename.trim()) { + return false; + } var text = simplemde.value(); simplemde.value(text + "![alt text]("+filename+")" + "\n"); });'; diff --git a/plugins/tags/languages/de_DE.json b/plugins/tags/languages/de_DE.json index c07b69f4..86bcf65d 100644 --- a/plugins/tags/languages/de_DE.json +++ b/plugins/tags/languages/de_DE.json @@ -1,7 +1,7 @@ { "plugin-data": { - "name": "Liste aller Schlagwörter", - "description": "Anzeige aller Schlagwörter." + "name": "Anzeige aller Schlagwörter", + "description": "Anzeige aller Schlagwörter in der Seitenleiste (bei Themes mit Seitenleiste)." } } \ No newline at end of file diff --git a/plugins/tags/languages/en_US.json b/plugins/tags/languages/en_US.json index 8b0e9b09..50beff32 100644 --- a/plugins/tags/languages/en_US.json +++ b/plugins/tags/languages/en_US.json @@ -6,7 +6,7 @@ "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "version": "0.6", + "releaseDate": "2015-11-13" } } \ No newline at end of file diff --git a/plugins/tags/languages/pl_PL.json b/plugins/tags/languages/pl_PL.json index 604d1c54..ae5f30ad 100644 --- a/plugins/tags/languages/pl_PL.json +++ b/plugins/tags/languages/pl_PL.json @@ -2,11 +2,6 @@ "plugin-data": { "name": "Lista tagów", - "description": "Wyświetla wszystkie tagi w postaci listy.", - "author": "Bludit", - "email": "", - "website": "https://github.com/dignajar/bludit-plugins", - "version": "0.3", - "releaseDate": "2015-10-02" + "description": "Wyświetla wszystkie tagi w postaci listy." } } \ No newline at end of file diff --git a/plugins/tags/plugin.php b/plugins/tags/plugin.php index 4aef1b5d..179bd906 100644 --- a/plugins/tags/plugin.php +++ b/plugins/tags/plugin.php @@ -14,7 +14,7 @@ class pluginTags extends Plugin { global $Language; $html = '
    '; - $html .= ''; + $html .= ''; $html .= ''; $html .= '
    '; diff --git a/themes/pure/languages/de_DE.json b/themes/pure/languages/de_DE.json new file mode 100644 index 00000000..00255464 --- /dev/null +++ b/themes/pure/languages/de_DE.json @@ -0,0 +1,7 @@ +{ + "theme-data": + { + "name": "Pure", + "description": "Einfaches und übersichtliches Theme unter Verwendung des Frameworks Pure.css." + } +} \ No newline at end of file diff --git a/themes/pure/languages/en_US.json b/themes/pure/languages/en_US.json index 2a4c3e20..8d996c17 100644 --- a/themes/pure/languages/en_US.json +++ b/themes/pure/languages/en_US.json @@ -2,11 +2,11 @@ "theme-data": { "name": "Pure", - "description": "Simple and clean theme, based on the framework Pure.css. Website: http://purecss.io", + "description": "Simple and clean theme, based on the framework Pure.css.", "author": "Bludit", "email": "", "website": "https://github.com/dignajar/bludit-themes", - "version": "0.3", - "releaseDate": "2015-10-02" + "version": "0.6", + "releaseDate": "2015-11-13" } } \ No newline at end of file diff --git a/themes/pure/php/head.php b/themes/pure/php/head.php index 43d6a590..68824463 100644 --- a/themes/pure/php/head.php +++ b/themes/pure/php/head.php @@ -1,7 +1,5 @@ - - <?php echo $Site->title() ?> if( $Url->whereAmI()=='post' ) { Theme::keywords( $Post->tags() ); + Theme::description( $Post->description() ); } elseif( $Url->whereAmI()=='page' ) { Theme::keywords( $Page->tags() ); + Theme::description( $Page->description() ); + } + else { + Theme::description( $Site->description() ); } ?> diff --git a/themes/pure/php/home.php b/themes/pure/php/home.php index 89812dd3..d0bc82cf 100644 --- a/themes/pure/php/home.php +++ b/themes/pure/php/home.php @@ -23,7 +23,7 @@ echo $Language->get('Posted By').' '; if( Text::isNotEmpty($Post->authorFirstName()) && Text::isNotEmpty($Post->authorLastName()) ) { - echo $Post->authorFirstName().', '.$Post->authorLastName(); + echo $Post->authorFirstName().' '.$Post->authorLastName(); } else { echo $Post->username(); diff --git a/themes/pure/php/post.php b/themes/pure/php/post.php index d4f4436f..4f1c2011 100644 --- a/themes/pure/php/post.php +++ b/themes/pure/php/post.php @@ -21,7 +21,7 @@ echo $Language->get('Posted By').' '; if( Text::isNotEmpty($Post->authorFirstName()) && Text::isNotEmpty($Post->authorLastName()) ) { - echo $Post->authorFirstName().', '.$Post->authorLastName(); + echo $Post->authorFirstName().' '.$Post->authorLastName(); } else { echo $Post->username();