diff --git a/README.md b/README.md index ff0d329b..d12a0f68 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,16 @@ Bludit is a fast, simple, extensible and Flat file CMS. - [Documentation](http://docs.bludit.com/en/) - [Help and Support](http://forum.bludit.com) -- Follow Bludit on [Twitter](https://twitter.com/bludit) and [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) +- [Plugins](https://github.com/dignajar/bludit-plugins) +- [Themes](https://github.com/dignajar/bludit-themes) +- [More plugins and themes](http://forum.bludit.com/viewforum.php?f=14) + +Social +------ + +- [Twitter](https://twitter.com/bludit) +- [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) +- [Google+](https://plus.google.com/+Bluditcms) Requirements ------------ @@ -18,7 +27,6 @@ You only need a Webserver with PHP support. * Apache with module [mod_rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) * Ngnix with module [ngx_http_rewrite_module](http://nginx.org/en/docs/http/ngx_http_rewrite_module.html) - Installation guide ------------------ @@ -29,4 +37,4 @@ Installation guide License ------- -Bludit is opensource software licensed under the [MIT license](https://tldrlegal.com/license/mit-license) \ No newline at end of file +Bludit is opensource software licensed under the [MIT license](https://tldrlegal.com/license/mit-license) diff --git a/admin/controllers/dashboard.php b/admin/controllers/dashboard.php index 602e33e0..09f40ab2 100644 --- a/admin/controllers/dashboard.php +++ b/admin/controllers/dashboard.php @@ -16,8 +16,10 @@ // Main after POST // ============================================================================ -$_newPosts = $dbPosts->regenerate(); -$_newPages = $dbPages->regenerate(); +//$_newPosts = $dbPosts->regenerateCli(); +//$_newPages = $dbPages->regenerateCli(); + +$_newPages = $_newPosts = array(); $_draftPosts = array(); foreach($posts as $Post) diff --git a/admin/controllers/edit-page.php b/admin/controllers/edit-page.php index e591d578..b6466732 100644 --- a/admin/controllers/edit-page.php +++ b/admin/controllers/edit-page.php @@ -24,9 +24,7 @@ function editPage($args) // Edit the page. if( $dbPages->edit($args) ) { - $dbPages->regenerate(); - - //$dbTags->reindexPages( $dbPages->db ); + $dbPages->regenerateCli(); Alert::set($Language->g('The changes have been saved')); Redirect::page('admin', 'edit-page/'.$args['key']); diff --git a/admin/controllers/edit-post.php b/admin/controllers/edit-post.php index a52ee912..435f6ef2 100644 --- a/admin/controllers/edit-post.php +++ b/admin/controllers/edit-post.php @@ -1,5 +1,9 @@ edit($args) ) { - // Regenerate the database tags - $dbTags->reindexPosts( $dbPosts->db ); + // Reindex tags, this function is in 70.posts.php + reIndexTagsPosts(); Alert::set($Language->g('The changes have been saved')); Redirect::page('admin', 'edit-post/'.$args['key']); @@ -31,18 +34,19 @@ function editPost($args) { Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to edit the post.'); } + + return false; } function deletePost($key) { global $dbPosts; - global $dbTags; global $Language; if( $dbPosts->delete($key) ) { - // Regenerate the database tags - $dbTags->reindexPosts( $dbPosts->db ); + // Reindex tags, this function is in 70.posts.php + reIndexTagsPosts(); Alert::set($Language->g('The post has been deleted successfully')); Redirect::page('admin', 'manage-posts'); diff --git a/admin/controllers/login.php b/admin/controllers/login.php index d9ee03fe..a7aca352 100644 --- a/admin/controllers/login.php +++ b/admin/controllers/login.php @@ -22,6 +22,9 @@ function checkPost($args) // Verify User sanitize the input if( $Login->verifyUser($_POST['username'], $_POST['password']) ) { + // Renew the token. This token will be the same inside the session for multiple forms. + $Security->generateToken(); + Redirect::page('admin', 'dashboard'); return true; } diff --git a/admin/controllers/new-page.php b/admin/controllers/new-page.php index 0b54d994..0dd12df7 100644 --- a/admin/controllers/new-page.php +++ b/admin/controllers/new-page.php @@ -24,8 +24,6 @@ function addPage($args) // Add the page. if( $dbPages->add($args) ) { - //$dbTags->reindexPages( $dbPages->db ); - Alert::set($Language->g('Page added successfully')); Redirect::page('admin', 'manage-pages'); } diff --git a/admin/controllers/new-post.php b/admin/controllers/new-post.php index 92131b52..04ef4c8e 100644 --- a/admin/controllers/new-post.php +++ b/admin/controllers/new-post.php @@ -11,7 +11,6 @@ function addPost($args) { global $dbPosts; - global $dbTags; global $Language; // Page status, published or draft. @@ -25,8 +24,8 @@ function addPost($args) // Add the page. if( $dbPosts->add($args) ) { - // Regenerate the database tags - $dbTags->reindexPosts( $dbPosts->db ); + // Reindex tags, this function is in 70.posts.php + reIndexTagsPosts(); Alert::set($Language->g('Post added successfully')); Redirect::page('admin', 'manage-posts'); @@ -35,6 +34,8 @@ function addPost($args) { Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to create the post.'); } + + return false; } // ============================================================================ diff --git a/admin/themes/default/css/default.css b/admin/themes/default/css/default.css index f3dd8459..c7626bc6 100644 --- a/admin/themes/default/css/default.css +++ b/admin/themes/default/css/default.css @@ -32,7 +32,7 @@ span.label { /* ----------- HEAD ----------- */ #head { overflow: auto; - border-top: 10px #f1f1f1 solid; + border-top: 10px #eee solid; border-bottom: 1px solid #f1f1f1; padding: 10px 0; } @@ -105,6 +105,10 @@ h2.title { font-weight: normal; } +h2.title i.fa { + margin-right: 8px; +} + /* ----------- TABLE ----------- */ table { background-color: #fff; diff --git a/admin/views/add-user.php b/admin/views/add-user.php index 7090db0d..c7bb96be 100644 --- a/admin/views/add-user.php +++ b/admin/views/add-user.php @@ -1,38 +1,41 @@ -

p('Add a new user') ?>

+

p('Add a new user') ?>

-
- + - + - + - + - + - - p('Cancel') ?> + + + + + + p('Cancel') ?>
\ No newline at end of file diff --git a/admin/views/configure-plugin.php b/admin/views/configure-plugin.php index 92743329..87bce405 100644 --- a/admin/views/configure-plugin.php +++ b/admin/views/configure-plugin.php @@ -2,14 +2,15 @@
- + + - form(); - ?> + form(); + ?> -
- -
+
+ +
\ No newline at end of file diff --git a/admin/views/edit-page.php b/admin/views/edit-page.php index 3f733924..30f57e5f 100644 --- a/admin/views/edit-page.php +++ b/admin/views/edit-page.php @@ -1,7 +1,8 @@ -

p('Edit page') ?>

+

p('Edit page') ?>

+