diff --git a/README.md b/README.md index 8efa3f35..e2a22431 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -[Bludit](http://www.bludit.com/) +[Bludit](https://www.bludit.com/) ================================ **Fast**, **simple**, **extensible** and **flat file** CMS. Bludit is a simple web application to make your own **blog** or **site** in seconds, it's completly **free and open source**. Bludit uses flat-files (text files in JSON format) to store the posts and pages, you don't need to install or configure a database. -- [Documentation](http://docs.bludit.com) -- [Help and Support](http://forum.bludit.com) -- [Plugins](https://github.com/dignajar/bludit-plugins) +- [Documentation](https://docs.bludit.com) +- [Help and Support](https://forum.bludit.com) +- [Plugins](https://plugins.bludit.com) - [Themes](https://github.com/dignajar/bludit-themes) -- [More plugins and themes](http://forum.bludit.com/viewforum.php?f=14) +- [More plugins and themes](https://forum.bludit.com/viewforum.php?f=14) Social networks --------------- @@ -36,7 +36,7 @@ You only need a web server with PHP support. Installation guide ------------------ -1. Download the latest version from http://www.bludit.com/bludit_latest.zip +1. Download the latest version from https://s3.amazonaws.com/bludit-s3/bludit-builds/bludit_latest.zip 2. Extract the zip file into a directory like `bludit`. 3. Upload the directory `bludit` to your hosting server. 4. Done! diff --git a/bl-kernel/abstract/content.class.php b/bl-kernel/abstract/content.class.php index 710605f5..dcb72fa0 100644 --- a/bl-kernel/abstract/content.class.php +++ b/bl-kernel/abstract/content.class.php @@ -17,6 +17,7 @@ class Content { return($this->vars!==false); } + // Returns the value from the $field, FALSE if the field doesn't exist. public function getField($field) { if(isset($this->vars[$field])) { @@ -38,7 +39,7 @@ class Content { private function build($path) { - if( !Sanitize::pathFile($path, 'index.txt') ) { + if( !Sanitize::pathFile($path.'index.txt') ) { return false; } diff --git a/bl-kernel/abstract/dbjson.class.php b/bl-kernel/abstract/dbjson.class.php index ef881474..04dffaa9 100644 --- a/bl-kernel/abstract/dbjson.class.php +++ b/bl-kernel/abstract/dbjson.class.php @@ -45,6 +45,7 @@ class dbJSON public function restoreDB() { $this->db = $this->dbBackup; + return true; } diff --git a/bl-kernel/abstract/plugin.class.php b/bl-kernel/abstract/plugin.class.php index 42a76d4e..c459d252 100644 --- a/bl-kernel/abstract/plugin.class.php +++ b/bl-kernel/abstract/plugin.class.php @@ -103,13 +103,27 @@ class Plugin { return ''; } - public function setDb($array) + public function setDb($args) { $tmp = array(); - // All fields will be sanitize before save. - foreach($array as $key=>$value) { - $tmp[$key] = Sanitize::html($value); + foreach($this->dbFields as $key=>$value) + { + if(isset($args[$key])) + { + // Sanitize value + $tmpValue = Sanitize::html( $args[$key] ); + + // Set type + settype($tmpValue, gettype($value)); + + // Set value + $tmp[$key] = $tmpValue; + } + else + { + $tmp[$key] = false; + } } $this->db = $tmp; diff --git a/bl-kernel/admin/controllers/dashboard.php b/bl-kernel/admin/controllers/dashboard.php index d00ff280..e60a92d4 100644 --- a/bl-kernel/admin/controllers/dashboard.php +++ b/bl-kernel/admin/controllers/dashboard.php @@ -7,11 +7,12 @@ function updateBludit() { global $Site; global $dbPosts; + global $dbPages; // Check if Bludit need to be update. if( ($Site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) { - // --- Update dates --- + // --- Update dates on posts --- foreach($dbPosts->db as $key=>$post) { $date = Date::format($post['date'], 'Y-m-d H:i', DB_DATE_FORMAT); @@ -22,6 +23,17 @@ function updateBludit() $dbPosts->save(); + // --- Update dates on pages --- + foreach($dbPages->db as $key=>$page) + { + $date = Date::format($page['date'], 'Y-m-d H:i', DB_DATE_FORMAT); + if($date !== false) { + $dbPages->setPageDb($key,'date',$date); + } + } + + $dbPages->save(); + // --- Update directories --- $directories = array( PATH_POSTS, diff --git a/bl-kernel/admin/themes/default/css/default.css b/bl-kernel/admin/themes/default/css/default.css index af0da748..38ba8fad 100644 --- a/bl-kernel/admin/themes/default/css/default.css +++ b/bl-kernel/admin/themes/default/css/default.css @@ -118,6 +118,14 @@ li.bludit-logo { /* ----------- BLUDIT ----------- */ +body { + overflow-y: scroll; +} + +.bludit-navbar { + +} + #logo { background: #f4f4f4; padding:20px 0; @@ -150,6 +158,10 @@ button.delete-button:hover { margin-bottom: 25px; } +table.statistics tr:last-child td { + border-bottom: none !important; +} + /* ----------- ALERT ----------- */ #alert { @@ -179,17 +191,53 @@ button.delete-button:hover { text-transform: uppercase; } -#jstagList { - margin-top: 5px; +#bludit-tags { + margin-top: 15px; } -#jstagList span { - background: #f1f1f1; - border-radius: 3px; - color: #2672ec; +#bludit-tags .uk-button { + padding: 0 12px !important; + margin-left: 10px; +} + +#jstagList { + margin-top: 15px; +} + +#jstagList span.unselect, +#jstagList span.select { + margin-top: 5px; margin-right: 5px; - padding: 3px 10px; + padding: 2px 15px; cursor: pointer; + display: inline-block; + border-radius: 3px; + background: #f1f1f1; + vertical-align: middle; +} + +#jstagList span.unselect:before { + font-family: FontAwesome; + content: "\f067"; + padding-right: 5px; +} + +#jstagList span.unselect { + color: #AAA; +} + +#jstagList span.unselect:hover { + color: #888; +} + +#jstagList span.select:before { + font-family: FontAwesome; + content: "\f00c"; + padding-right: 5px; +} + +#jstagList span.select { + color: #2672ec; } /* ----------- BLUDIT IMAGES V8 ----------- */ @@ -229,6 +277,36 @@ button.delete-button:hover { font-size: 0; } +/* Bludit Menu v8 */ + +#bludit-menuV8 { + display: none; + z-index: 1020; + position: absolute; + overflow: hidden; + border: 1px solid #CCC; + background: #FFF; + color: #333; + border-radius: 2px; + list-style-type: none; + padding: 5px; + margin: 0; +} + +#bludit-menuV8 li { + padding: 8px 12px; + cursor: pointer; +} + +#bludit-menuV8 li:hover { + background-color: #2672ec; + color: #fff; +} + +#bludit-menuV8 li i { + margin-right: 10px; +} + /* ----------- BLUDIT QUICK IMAGES ----------- */ #bludit-quick-images { diff --git a/bl-kernel/admin/themes/default/css/jquery.auto-complete.css b/bl-kernel/admin/themes/default/css/jquery.auto-complete.css deleted file mode 100644 index 4261b1d0..00000000 --- a/bl-kernel/admin/themes/default/css/jquery.auto-complete.css +++ /dev/null @@ -1,9 +0,0 @@ -.autocomplete-suggestions { - text-align: left; cursor: default; border: 1px solid #ccc; border-top: 0; background: #fff; box-shadow: -1px 1px 3px rgba(0,0,0,.1); - - /* core styles should not be changed */ - position: absolute; display: none; z-index: 9999; max-height: 254px; overflow: hidden; overflow-y: auto; box-sizing: border-box; -} -.autocomplete-suggestion { position: relative; padding: 0 .6em; line-height: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.02em; color: #333; } -.autocomplete-suggestion b { font-weight: normal; color: #1f8dd6; } -.autocomplete-suggestion.selected { background: #f0f0f0; } diff --git a/bl-kernel/admin/themes/default/index.php b/bl-kernel/admin/themes/default/index.php index d90c144e..ff233a77 100644 --- a/bl-kernel/admin/themes/default/index.php +++ b/bl-kernel/admin/themes/default/index.php @@ -20,14 +20,12 @@ - - @@ -56,7 +54,7 @@ $(document).ready(function() { -