Skip to content

Commit

Permalink
Merge pull request #2 from dignajar/master
Browse files Browse the repository at this point in the history
Merge update from dignajar
  • Loading branch information
ethan42411 committed Sep 9, 2015
2 parents c22730b + 98a1084 commit 1738e23
Show file tree
Hide file tree
Showing 179 changed files with 4,781 additions and 5,099 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand All @@ -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
------------------

Expand All @@ -29,4 +37,4 @@ Installation guide

License
-------
Bludit is opensource software licensed under the [MIT license](https://tldrlegal.com/license/mit-license)
Bludit is opensource software licensed under the [MIT license](https://tldrlegal.com/license/mit-license)
7 changes: 7 additions & 0 deletions admin/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Bludit

If you are reading this, you must enable rewrite module.

Documentation:
- http://docs.bludit.com/en/getting-started/requirements
- http://docs.bludit.com/en/troubleshooting/browser-returns-not-found
9 changes: 5 additions & 4 deletions admin/controllers/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
// Main after POST
// ============================================================================

$_newPosts = $dbPosts->regenerate();
$_newPages = $dbPages->regenerate();
//$_newPosts = $dbPosts->regenerateCli();
$_newPages = $dbPages->regenerateCli();

$_newPages = $_newPosts = array();

$_draftPosts = array();
foreach($posts as $Post)
{
if(!$Post->published()) {
if($Post->draft()) {
array_push($_draftPosts, $Post);
}
}
Expand All @@ -34,4 +36,3 @@
array_push($_draftPages, $Page);
}
}

2 changes: 1 addition & 1 deletion admin/controllers/edit-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function editPage($args)
// Edit the page.
if( $dbPages->edit($args) )
{
$dbPages->regenerate();
$dbPages->regenerateCli();

Alert::set($Language->g('The changes have been saved'));
Redirect::page('admin', 'edit-page/'.$args['key']);
Expand Down
12 changes: 12 additions & 0 deletions admin/controllers/edit-post.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php defined('BLUDIT') or die('Bludit CMS.');

// ============================================================================
// Check role
// ============================================================================

// ============================================================================
// Functions
// ============================================================================
Expand All @@ -20,13 +24,18 @@ function editPost($args)
// Edit the post.
if( $dbPosts->edit($args) )
{
// 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']);
}
else
{
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to edit the post.');
}

return false;
}

function deletePost($key)
Expand All @@ -36,6 +45,9 @@ function deletePost($key)

if( $dbPosts->delete($key) )
{
// 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');
}
Expand Down
3 changes: 3 additions & 0 deletions admin/controllers/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 5 additions & 0 deletions admin/controllers/new-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ function addPost($args)
// Add the page.
if( $dbPosts->add($args) )
{
// Reindex tags, this function is in 70.posts.php
reIndexTagsPosts();

Alert::set($Language->g('Post added successfully'));
Redirect::page('admin', 'manage-posts');
}
else
{
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to create the post.');
}

return false;
}

// ============================================================================
Expand Down
4 changes: 0 additions & 4 deletions admin/controllers/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ function setSettings($args)
global $Site;
global $Language;

if(!isset($args['advancedOptions'])) {
$args['advancedOptions'] = 'false';
}

// Add slash at the begin and end.
// This fields are in the settings->advanced mode
if(isset($args['advanced'])) {
Expand Down
4 changes: 2 additions & 2 deletions admin/controllers/themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
// Load each plugin clasess
foreach($themesPaths as $themePath)
{
$langLocaleFile = $themePath.DS.'language'.DS.$Site->locale().'.json';
$langDefaultFile = $themePath.DS.'language'.DS.'en_US.json';
$langLocaleFile = $themePath.DS.'languages'.DS.$Site->locale().'.json';
$langDefaultFile = $themePath.DS.'languages'.DS.'en_US.json';
$database = false;

// Check if exists locale language
Expand Down
15 changes: 0 additions & 15 deletions admin/index.php

This file was deleted.

35 changes: 30 additions & 5 deletions admin/themes/default/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ div.unit-80 {
text-align: center;
}

span.label {
margin-right: 8px;
}

/* ----------- FONTS AWESOME ----------- */
.fa-right {
margin-right: 5px;
Expand All @@ -28,7 +32,7 @@ div.unit-80 {
/* ----------- HEAD ----------- */
#head {
overflow: auto;
border-top: 10px #f1f1f1 solid;
border-top: 10px #eee solid;
border-bottom: 1px solid #f1f1f1;
padding: 10px 0;
}
Expand Down Expand Up @@ -101,6 +105,10 @@ h2.title {
font-weight: normal;
}

h2.title i.fa {
margin-right: 8px;
}

/* ----------- TABLE ----------- */
table {
background-color: #fff;
Expand Down Expand Up @@ -201,7 +209,6 @@ div.dashboardBox ul.menu li.description:last-child {


/* ----------- FORMS ----------- */

form h4 {
border-bottom: 1px solid #e2e2e2;
font-weight: 300;
Expand All @@ -210,9 +217,27 @@ form h4 {
width: 60%;
}

p.advOptions {
color: #777;
font-size: 0.8em;
#jsadvancedButton {
display: block;
margin-bottom: 1.1em;
}

#jsadvancedOptions {
display: none;
}

.btn {
color: #fff;
background: #999999;
padding: 0.3em 1.3em !important;
}

.btn-blue {
background: #2672ec;
}

.btn-red {
background: #EC2626;
}

a.btn:hover {
Expand Down

0 comments on commit 1738e23

Please sign in to comment.