Merge pull request #2 from dignajar/master

Update from original #2
This commit is contained in:
Jory Phillips 2015-08-10 16:57:23 -07:00
commit 273d897ec3
31 changed files with 544 additions and 429 deletions

View File

@ -32,7 +32,7 @@ if($_Plugin===false) {
} }
// Check if the plugin has the method form() // Check if the plugin has the method form()
if($_Plugin->form()===false) { if(!method_exists($_Plugin, 'form')) {
Redirect::page('admin', 'plugins'); Redirect::page('admin', 'plugins');
} }

View File

@ -18,10 +18,8 @@
if( $_SERVER['REQUEST_METHOD'] == 'POST' ) if( $_SERVER['REQUEST_METHOD'] == 'POST' )
{ {
$username = Sanitize::html($_POST['username']); // Verify User sanitize the input
$password = Sanitize::html($_POST['password']); if( $Login->verifyUser($_POST['username'], $_POST['password']) )
if( $Login->verifyUser($username, $password) )
{ {
Redirect::page('admin', 'dashboard'); Redirect::page('admin', 'dashboard');
} }

View File

@ -15,12 +15,12 @@
<script src="./js/kube.min.js"></script> <script src="./js/kube.min.js"></script>
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('onAdminHead') ?> <?php Theme::plugins('adminHead') ?>
</head> </head>
<body> <body>
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('onAdminBodyBegin') ?> <?php Theme::plugins('adminBodyBegin') ?>
<!-- ALERT --> <!-- ALERT -->
<script> <script>
@ -92,7 +92,7 @@ $(document).ready(function() {
?> ?>
<!-- Plugins --> <!-- Plugins -->
<?php Theme::plugins('onAdminBodyEnd') ?> <?php Theme::plugins('adminBodyEnd') ?>
<div id="footer">Bludit <?php echo BLUDIT_VERSION ?> | Load time <?php echo (microtime(true) - $loadTime) ?></div> <div id="footer">Bludit <?php echo BLUDIT_VERSION ?> | Load time <?php echo (microtime(true) - $loadTime) ?></div>

View File

@ -10,9 +10,15 @@
<link rel="stylesheet" href="./css/kube.min.css?version=<?php echo BLUDIT_VERSION ?>"> <link rel="stylesheet" href="./css/kube.min.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" href="./css/default.css?version=<?php echo BLUDIT_VERSION ?>"> <link rel="stylesheet" href="./css/default.css?version=<?php echo BLUDIT_VERSION ?>">
<link rel="stylesheet" href="./css/css/font-awesome.css?version=<?php echo BLUDIT_VERSION ?>"> <link rel="stylesheet" href="./css/css/font-awesome.css?version=<?php echo BLUDIT_VERSION ?>">
<!-- Plugins Login Head -->
<?php Theme::plugins('loginHead') ?>
</head> </head>
<body> <body>
<!-- Plugins Login Body Begin -->
<?php Theme::plugins('loginBodyBegin') ?>
<div id="head"> <div id="head">
<nav class="navbar nav-fullwidth"> <nav class="navbar nav-fullwidth">
<h1>Bludit</h1> <h1>Bludit</h1>
@ -45,7 +51,10 @@
</div> </div>
<div id="footer">Bludit <?php echo BLUDIT_VERSION ?> | Load time <?php echo (microtime(true) - $loadTime) ?></div> <div id="footer">Bludit</div>
<!-- Plugins Login Body Begin -->
<?php Theme::plugins('loginBodyEnd') ?>
</body> </body>
</html> </html>

View File

@ -5,7 +5,7 @@
<form method="post" action="" class="forms"> <form method="post" action="" class="forms">
<label> <label>
<?php $Language->p('Username') ?> <?php $Language->p('Username') ?>
<input type="text" name="username" class="width-50"> <input type="text" name="username" class="width-50" value="<?php echo (isset($_POST['username'])?$_POST['username']:'') ?>">
</label> </label>
<label> <label>
@ -29,7 +29,7 @@
<label> <label>
Email Email
<input type="text" name="email" class="width-50"> <input type="text" name="email" class="width-50" value="<?php echo (isset($_POST['email'])?$_POST['email']:'') ?>">
<div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div> <div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
</label> </label>

2
admin/views/manage-posts.php Normal file → Executable file
View File

@ -16,7 +16,7 @@
foreach($posts as $Post) foreach($posts as $Post)
{ {
echo '<tr>'; echo '<tr>';
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($Post->published()?'':'['.$Language->g('Draft').'] ').($Post->title()?$Post->title():'['.$Language->g('Empty title').'] ').'</a></td>'; echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-post/'.$Post->key().'">'.($Post->published()?'':'<span class="label label-outline label-red smaller">'.$Language->g('Draft').'</span> ').($Post->title()?$Post->title():'['.$Language->g('Empty title').'] ').'</a></td>';
echo '<td>'.$Post->dateCreated().'</td>'; echo '<td>'.$Post->dateCreated().'</td>';
echo '<td>'.$Post->timeago().'</td>'; echo '<td>'.$Post->timeago().'</td>';
echo '</tr>'; echo '</tr>';

View File

@ -10,7 +10,7 @@
echo '<span class="version">'.$Language->g('Version').': '.$Plugin->version().'</span><span class="author">'.$Language->g('author').': <a targe="_blank" href="'.$Plugin->website().'">'.$Plugin->author().'</a></span>'; echo '<span class="version">'.$Language->g('Version').': '.$Plugin->version().'</span><span class="author">'.$Language->g('author').': <a targe="_blank" href="'.$Plugin->website().'">'.$Plugin->author().'</a></span>';
if($Plugin->installed()) { if($Plugin->installed()) {
if($Plugin->form()) { if(method_exists($Plugin, 'form')) {
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$Plugin->className().'" class="btn btn-smaller">'.$Language->g('Configure plugin').'</a>'; echo '<a href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$Plugin->className().'" class="btn btn-smaller">'.$Language->g('Configure plugin').'</a>';
} }
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$Plugin->className().'" class="btn btn-red btn-smaller">'.$Language->g('Uninstall plugin').'</a>'; echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$Plugin->className().'" class="btn btn-red btn-smaller">'.$Language->g('Uninstall plugin').'</a>';

2
content/README Normal file
View File

@ -0,0 +1,2 @@
Set the correct permissions on this directory.
Check the documentation: http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205

View File

@ -24,8 +24,8 @@ define('BLUDIT', true);
define('DS', DIRECTORY_SEPARATOR); define('DS', DIRECTORY_SEPARATOR);
// PHP paths // PHP paths
define('PATH_ROOT', __DIR__.DS); define('PATH_ROOT', __DIR__.DS);
define('PATH_BOOT', PATH_ROOT.'kernel'.DS.'boot'.DS); define('PATH_BOOT', PATH_ROOT.'kernel'.DS.'boot'.DS);
// Init // Init
require(PATH_BOOT.'init.php'); require(PATH_BOOT.'init.php');

View File

@ -36,10 +36,29 @@ if(!defined('JSON_PRETTY_PRINT')) {
define('JSON_PRETTY_PRINT', 128); define('JSON_PRETTY_PRINT', 128);
} }
// Helpers class // Check if JSON encode and decode are enabled.
define('JSON', function_exists('json_encode'));
// Multibyte string / UTF-8
define('MB_STRING', extension_loaded('mbstring'));
define('CHARSET', 'UTF-8');
if(MB_STRING)
{
// Tell PHP that we're using UTF-8 strings until the end of the script.
mb_internal_encoding(CHARSET);
// Tell PHP that we'll be outputting UTF-8 to the browser.
mb_http_output(CHARSET);
}
// PHP Classes
include(PATH_HELPERS.'sanitize.class.php'); include(PATH_HELPERS.'sanitize.class.php');
include(PATH_HELPERS.'valid.class.php'); include(PATH_HELPERS.'valid.class.php');
include(PATH_HELPERS.'text.class.php');
include(PATH_ABSTRACT.'dbjson.class.php'); include(PATH_ABSTRACT.'dbjson.class.php');
include(PATH_KERNEL.'dblanguage.class.php');
// ============================================================================ // ============================================================================
// FUNCTIONS // FUNCTIONS
@ -125,8 +144,10 @@ function checkSystem()
return $stdOut; return $stdOut;
} }
function install($adminPassword, $email, $language) function install($adminPassword, $email, $locale)
{ {
$Language = new dbLanguage($locale);
$stdOut = array(); $stdOut = array();
// ============================================================================ // ============================================================================
@ -201,9 +222,9 @@ function install($adminPassword, $email, $language)
'title'=>'Bludit', 'title'=>'Bludit',
'slogan'=>'cms', 'slogan'=>'cms',
'description'=>'', 'description'=>'',
'footer'=>'Footer text - ©2015', 'footer'=>'©2015',
'language'=>$language, 'language'=>$locale,
'locale'=>$language, 'locale'=>$locale,
'timezone'=>'UTC', 'timezone'=>'UTC',
'theme'=>'pure', 'theme'=>'pure',
'adminTheme'=>'default', 'adminTheme'=>'default',
@ -241,56 +262,56 @@ function install($adminPassword, $email, $language)
// File plugins/pages/db.php // File plugins/pages/db.php
$data = array( $data = array(
'homeLink'=>true, 'homeLink'=>true,
'label'=>'Pages' 'label'=>$Language->get('Pages')
); );
file_put_contents(PATH_PLUGINS_DATABASES.'pages'.DS.'db.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX); file_put_contents(PATH_PLUGINS_DATABASES.'pages'.DS.'db.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
// File index.txt for error page // File index.txt for error page
$data = 'Title: Error $data = 'Title: '.$Language->get('Error').'
Content: The page has not been found.'; Content: '.$Language->get('The page has not been found');
file_put_contents(PATH_PAGES.'error'.DS.'index.txt', $data, LOCK_EX); file_put_contents(PATH_PAGES.'error'.DS.'index.txt', $data, LOCK_EX);
// File index.txt for welcome post // File index.txt for welcome post
$data = 'Title: First post $data = 'Title: '.$Language->get('First post').'
Content: Content:
Congratulations, you have installed **Bludit** successfully! '.$Language->get('Congratulations you have successfully installed your Bludit').'
--- ---
What\'s next: '.$Language->get('Whats next').'
--- ---
- Administrate your Bludit from the [admin area](./admin/) - '.$Language->get('Manage your Bludit from the admin panel').'
- Follow Bludit on [Twitter](https://twitter.com/bludit) / [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) / [Google+](https://plus.google.com/+Bluditcms) - '.$Language->get('Follow Bludit on').' [Twitter](https://twitter.com/bludit) / [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) / [Google+](https://plus.google.com/+Bluditcms)
- Visit the [forum](http://forum.bludit.com) for support - '.$Language->get('Visit the support forum').'
- Read the [documentation](http://docs.bludit.com) for more information - '.$Language->get('Read the documentation for more information').'
- Share with your friend :D'; - '.$Language->get('Share with your friends and enjoy');
file_put_contents(PATH_POSTS.$firstPostSlug.DS.'index.txt', $data, LOCK_EX); file_put_contents(PATH_POSTS.$firstPostSlug.DS.'index.txt', $data, LOCK_EX);
return true; return true;
} }
function checkPOST($_POST) function checkPOST($args)
{ {
// Check empty password // Check empty password
if(empty($_POST['password'])) if(empty($args['password']))
{ {
return '<div>The password field is empty</div>'; return '<div>The password field is empty</div>';
} }
// Check invalid email // Check invalid email
if( !Valid::email($_POST['email']) && ($_POST['noCheckEmail']=='0') ) if( !Valid::email($args['email']) && ($args['noCheckEmail']=='0') )
{ {
return '<div>Your email address is invalid.</div><div id="jscompleteEmail">Proceed anyway!</div>'; return '<div>Your email address is invalid.</div><div id="jscompleteEmail">Proceed anyway!</div>';
} }
// Sanitize email // Sanitize email
$email = sanitize::email($_POST['email']); $email = sanitize::email($args['email']);
// Install Bludit // Install Bludit
install($_POST['password'], $email, $_POST['language']); install($args['password'], $email, $args['language']);
return true; return true;
} }

View File

@ -191,85 +191,4 @@ class Plugin {
// The user can define your own dbFields. // The user can define your own dbFields.
} }
// EVENTS
public function form()
{
return false;
}
// Before the posts load.
public function beforePostsLoad()
{
return false;
}
// After the posts load.
public function afterPostsLoad()
{
return false;
}
// Before the pages load.
public function beforePagesLoad()
{
return false;
}
// After the pages load.
public function afterPagesLoad()
{
return false;
}
public function onSiteHead()
{
return false;
}
public function onSiteBodyBegin()
{
return false;
}
public function onSiteBodyEnd()
{
return false;
}
public function onAdminHead()
{
return false;
}
public function onAdminBodyBegin()
{
return false;
}
public function onAdminBodyEnd()
{
return false;
}
public function onSiteSidebar()
{
return false;
}
public function onAdminSidebar()
{
return false;
}
public function beforeSiteLoad()
{
return false;
}
public function afterSiteLoad()
{
return false;
}
} }

View File

@ -48,10 +48,13 @@ else
if($Url->notFound() || !$Login->isLogged() || ($Url->slug()==='login') ) if($Url->notFound() || !$Login->isLogged() || ($Url->slug()==='login') )
{ {
$layout['controller'] = 'login'; $layout['controller'] = 'login';
$layout['view'] = 'login'; $layout['view'] = 'login';
$layout['template'] = 'login.php'; $layout['template'] = 'login.php';
} }
// Plugins before admin area loaded
Theme::plugins('beforeAdminLoad');
// Admin theme init.php // Admin theme init.php
if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.'init.php') ) if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.'init.php') )
include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.'init.php'); include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.'init.php');
@ -63,4 +66,7 @@ else
// Load view and theme // Load view and theme
if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.$layout['template']) ) if( Sanitize::pathFile(PATH_ADMIN_THEMES, $Site->adminTheme().DS.$layout['template']) )
include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.$layout['template']); include(PATH_ADMIN_THEMES.$Site->adminTheme().DS.$layout['template']);
// Plugins after admin area loaded
Theme::plugins('afterAdminLoad');
} }

View File

@ -5,20 +5,29 @@
// ============================================================================ // ============================================================================
$plugins = array( $plugins = array(
'onSiteHead'=>array(), // <html><head>HERE</head><body>...</body></html> 'siteHead'=>array(),
'onSiteBodyBegin'=>array(), // <html><head>...</head><body>HERE...</body></html> 'siteBodyBegin'=>array(),
'onSiteBodyEnd'=>array(), // <html><head>...</head><body>...HERE</body></html> 'siteBodyEnd'=>array(),
'onSiteSidebar'=>array(), // <html><head>...</head><body>...<sidebar>HERE</sidebar>...</body></html> 'siteSidebar'=>array(),
'onAdminHead'=>array(),
'onAdminBodyBegin'=>array(),
'onAdminBodyEnd'=>array(),
'onAdminSidebar'=>array(),
'beforeSiteLoad'=>array(), 'beforeSiteLoad'=>array(),
'afterSiteLoad'=>array(), 'afterSiteLoad'=>array(),
'beforePostsLoad'=>array(),
'afterPostsLoad'=>array(), 'pageBegin'=>array(),
'beforePagesLoad'=>array(), 'pageEnd'=>array(),
'afterPagesLoad'=>array(), 'postBegin'=>array(),
'postEnd'=>array(),
'adminHead'=>array(),
'adminBodyBegin'=>array(),
'adminBodyEnd'=>array(),
'adminSidebar'=>array(),
'beforeAdminLoad'=>array(),
'afterAdminLoad'=>array(),
'loginHead'=>array(),
'loginBodyBegin'=>array(),
'loginBodyEnd'=>array(),
'all'=>array() 'all'=>array()
); );
@ -81,11 +90,7 @@ function build_plugins()
{ {
foreach($pluginsEvents as $event=>$value) foreach($pluginsEvents as $event=>$value)
{ {
/* if(method_exists($Plugin, $event)) {
if($Plugin->onSiteHead()!==false)
array_push($plugins['onSiteHead'], $Plugin);
*/
if($Plugin->{$event}()!==false) {
array_push($plugins[$event], $Plugin); array_push($plugins[$event], $Plugin);
} }
} }

View File

@ -52,6 +52,7 @@ class Text {
return $text; return $text;
} }
/*
public static function cleanUrl($string, $separator='-') public static function cleanUrl($string, $separator='-')
{ {
// Delete characters // Delete characters
@ -72,6 +73,21 @@ class Text {
return $string; return $string;
} }
*/
public static function cleanUrl($string, $separator='-')
{
if(function_exists('iconv')) {
$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);
}
$string = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $string);
$string = trim($string, '-');
$string = self::lowercase($string);
$string = preg_replace("/[\/_|+ -]+/", $separator, $string);
return $string;
}
// Replace all occurrences of the search string with the replacement string. // Replace all occurrences of the search string with the replacement string.
public static function replace($search, $replace, $string) public static function replace($search, $replace, $string)

View File

@ -23,8 +23,8 @@ class Login {
{ {
Session::set('username', $username); Session::set('username', $username);
Session::set('role', $role); Session::set('role', $role);
Session::set('fingerPrint', $this->fingerPrint()); Session::set('fingerPrint', $this->fingerPrint());
Session::set('sessionTime', time()); Session::set('sessionTime', time());
Log::set(__METHOD__.LOG_SEP.'Set fingerPrint: '.$this->fingerPrint()); Log::set(__METHOD__.LOG_SEP.'Set fingerPrint: '.$this->fingerPrint());
} }
@ -52,6 +52,9 @@ class Login {
public function verifyUser($username, $password) public function verifyUser($username, $password)
{ {
$username = Sanitize::html($username);
$password = Sanitize::html($password);
$username = trim($username); $username = trim($username);
$password = trim($password); $password = trim($password);

43
kernel/security.class.php Normal file
View File

@ -0,0 +1,43 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
class Security extends dbJSON
{
private $dbFields = array(
'minutesBlocked'=>5,
'numberFailures'=>10
);
function __construct()
{
parent::__construct(PATH_DATABASES.'security.php');
}
public function addLoginFail()
{
$ip = $this->getUserIp();
// Save the database
$this->db[$ip] = (int)$this->db[$ip] + 1;
if( $this->save() === false ) {
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.');
return false;
}
return true;
}
public function getUserIp()
{
// User IP
if(getenv('HTTP_X_FORWARDED_FOR'))
$ip = getenv('HTTP_X_FORWARDED_FOR');
elseif(getenv('HTTP_CLIENT_IP'))
$ip = getenv('HTTP_CLIENT_IP');
else
$ip = getenv('REMOTE_ADDR');
return $ip;
}
}

View File

@ -9,133 +9,141 @@
"website": "" "website": ""
}, },
"username": "Username", "username": "Username",
"password": "Password", "password": "Password",
"confirm-password": "Confirm Password", "confirm-password": "Confirm Password",
"editor": "Editor", "editor": "Editor",
"dashboard": "Dashboard", "dashboard": "Dashboard",
"role": "Role", "role": "Role",
"post": "Post", "post": "Post",
"posts": "Posts", "posts": "Posts",
"users": "Users", "users": "Users",
"administrator": "Administrator", "administrator": "Administrator",
"add": "Add", "add": "Add",
"cancel": "Cancel", "cancel": "Cancel",
"content": "Content", "content": "Content",
"title": "Title", "title": "Title",
"no-parent": "No parent", "no-parent": "No parent",
"edit-page": "Edit page", "edit-page": "Edit page",
"edit-post": "Edit post", "edit-post": "Edit post",
"add-a-new-user": "Add a new user", "add-a-new-user": "Add a new user",
"parent": "Parent", "parent": "Parent",
"friendly-url": "Friendly URL", "friendly-url": "Friendly URL",
"description": "Description", "description": "Description",
"posted-by": "Posted by", "posted-by": "Posted by",
"tags": "Tags", "tags": "Tags",
"position": "Position", "position": "Position",
"save": "Save", "save": "Save",
"draft": "Draft", "draft": "Draft",
"delete": "Delete", "delete": "Delete",
"registered": "Registered", "registered": "Registered",
"Notifications": "Notifications", "Notifications": "Notifications",
"profile": "Profile", "profile": "Profile",
"email": "Email", "email": "Email",
"settings": "Settings", "settings": "Settings",
"general": "General", "general": "General",
"advanced": "Advanced", "advanced": "Advanced",
"regional": "Regional", "regional": "Regional",
"about": "About", "about": "About",
"login": "Log in", "login": "Log in",
"logout": "Log out", "logout": "Log out",
"manage": "Manage", "manage": "Manage",
"themes": "Themes", "themes": "Themes",
"prev-page": "Prev page", "prev-page": "Prev page",
"next-page": "Next page", "next-page": "Next page",
"configure-plugin": "Configure plugin", "configure-plugin": "Configure plugin",
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.", "confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.",
"site-title": "Site title", "site-title": "Site title",
"site-slogan": "Site slogan", "site-slogan": "Site slogan",
"site-description": "Site description", "site-description": "Site description",
"footer-text": "Footer text", "footer-text": "Footer text",
"posts-per-page": "Posts per page", "posts-per-page": "Posts per page",
"site-url": "Site url", "site-url": "Site url",
"writting-settings": "Writting settings", "writting-settings": "Writting settings",
"url-filters": "URL filters", "url-filters": "URL filters",
"page": "Page", "page": "Page",
"pages": "Pages", "pages": "Pages",
"home": "Home", "home": "Home",
"welcome-back": "Welcome back", "welcome-back": "Welcome back",
"language": "Language", "language": "Language",
"website": "Website", "website": "Website",
"timezone": "Timezone", "timezone": "Timezone",
"locale": "Locale", "locale": "Locale",
"notifications": "Notifications", "new-post": "New post",
"new-post": "New post", "html-and-markdown-code-supported": "HTML and Markdown code supported",
"html-and-markdown-code-supported": "HTML and Markdown code supported", "new-page": "New page",
"new-page": "New page", "manage-posts": "Manage posts",
"manage-posts": "Manage posts", "published-date": "Published date",
"published-date": "Published date", "modified-date": "Modified date",
"modified-date": "Modified date", "empty-title": "Empty title",
"empty-title": "Empty title", "plugins": "Plugins",
"plugins": "Plugins", "install-plugin": "Install plugin",
"install-plugin": "Install plugin", "uninstall-plugin": "Uninstall plugin",
"uninstall-plugin": "Uninstall plugin", "new-password": "New password",
"new-password": "New password", "edit-user": "Edit user",
"edit-user": "Edit user", "publish-now": "Publish now",
"publish-now": "Publish now", "first-name": "First name",
"first-name": "First name", "last-name": "Last name",
"last-name": "Last name", "bludit-version": "Bludit version",
"bludit-version": "Bludit version", "powered-by": "Powered by",
"powered-by": "Powered by", "recent-posts": "Recent Posts",
"recent-posts": "Recent Posts", "manage-pages": "Manage pages",
"manage-pages": "Manage pages", "advanced-options": "Advanced options",
"advanced-options": "Advanced options", "user-deleted": "User deleted",
"user-deleted": "User deleted", "page-added-successfully": "Page added successfully",
"page-added-successfully": "Page added successfully", "post-added-successfully": "Post added successfully",
"post-added-successfully": "Post added successfully", "the-post-has-been-deleted-successfully": "The post has been deleted successfully",
"the-post-has-been-deleted-successfully": "The post has been deleted successfully", "the-page-has-been-deleted-successfully": "The page has been deleted successfully",
"the-page-has-been-deleted-successfully": "The page has been deleted successfully", "username-or-password-incorrect": "Username or password incorrect",
"username-or-password-incorrect": "Username or password incorrect", "database-regenerated": "Database regenerated",
"database-regenerated": "Database regenerated", "the-changes-have-been-saved": "The changes have been saved",
"the-changes-have-been-saved": "The changes have been saved", "enable-more-features-at": "Enable more features at",
"html-markdown-code-supported": "HTML and Markdown code supported.", "username-already-exists": "Username already exists",
"enable-more-features-at": "Enable more features at", "username-field-is-empty": "Username field is empty",
"username-already-exists": "Username already exists", "the-password-and-confirmation-password-do-not-match":"The password and confirmation password do not match",
"username-field-is-empty": "Username field is empty", "user-has-been-added-successfully": "User has been added successfully",
"the-password-and-confirmation-password-do-not-match":"The password and confirmation password do not match", "you-do-not-have-sufficient-permissions": "You do not have sufficient permissions to access this page, contact the administrator.",
"user-has-been-added-successfully": "User has been added successfully", "settings-advanced-writting-settings": "Settings->Advanced->Writting Settings",
"you-do-not-have-sufficient-permissions": "You do not have sufficient permissions to access this page, contact the administrator.", "new-posts-and-pages-synchronized": "New posts and pages synchronized.",
"settings-advanced-writting-settings": "Settings->Advanced->Writting Settings", "you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.",
"new-posts-and-pages-synchronized": "New posts and pages synchronized.", "email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.",
"you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.", "use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.",
"email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.", "use-this-field-to-add-a-catchy-prhase": "Use this field to add a catchy prhase on your site.",
"use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.", "you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.",
"use-this-field-to-add-a-catchy-prhase": "Use this field to add a catchy prhase on your site.", "you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.",
"you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.", "number-of-posts-to-show-per-page": "Number of posts to show per page.",
"you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.", "the-url-of-your-site": "The URL of your site.",
"number-of-posts-to-show-per-page": "Number of posts to show per page.", "add-or-edit-description-tags-or": "Add or edit description, tags or modify the friendly URL.",
"the-url-of-your-site": "The URL of your site.", "select-your-sites-language": "Select your site's language.",
"add-or-edit-description-tags-or": "Add or edit description, tags or modify the friendly URL.", "select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.",
"select-your-sites-language": "Select your site's language.", "you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.",
"select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.", "you-can-modify-the-url-which-identifies":"You can modify the URL which identifies a page or post using human-readable keywords. No more than 150 characters.",
"you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.", "this-field-can-help-describe-the-content": "This field can help describe the content in a few words. No more than 150 characters.",
"you-can-modify-the-url-which-identifies":"You can modify the URL which identifies a page or post using human-readable keywords. No more than 150 characters.", "write-the-tags-separeted-by-comma": "Write the tags separeted by comma. eg: tag1, tag2, tag3",
"this-field-can-help-describe-the-content": "This field can help describe the content in a few words. No more than 150 characters.", "delete-the-user-and-all-its-posts":"Delete the user and all its posts",
"write-the-tags-separeted-by-comma": "Write the tags separeted by comma. eg: tag1, tag2, tag3", "delete-the-user-and-associate-its-posts-to-admin-user": "Delete the user and associate its posts to admin user",
"delete": "Delete", "read-more": "Read more",
"delete-the-user-and-all-its-posts":"Delete the user and all its posts", "show-blog": "Show blog",
"delete-the-user-and-associate-its-posts-to-admin-user": "Delete the user and associate its posts to admin user", "default-home-page": "Default home page",
"read-more": "Read more", "version": "Version",
"show-blog": "Show blog", "there-are-no-drafts": "There are no drafts.",
"default-home-page": "Default home page", "create-a-new-article-for-your-blog":"Create a new article for your blog.",
"version": "Version", "create-a-new-page-for-your-website":"Create a new page for your website.",
"there-are-no-drafts": "There are no drafts.", "invite-a-friend-to-collaborate-on-your-website":"Invite a friend to collaborate on your website.",
"create-a-new-article-for-your-blog":"Create a new article for your blog.", "change-your-language-and-region-settings":"Change your language and region settings.",
"create-a-new-page-for-your-website":"Create a new page for your website.", "language-and-timezone":"Language and timezone",
"invite-a-friend-to-collaborate-on-your-website":"Invite a friend to collaborate on your website.", "author": "Author",
"change-your-language-and-region-settings":"Change your language and region settings.", "start-here": "Start here",
"language-and-timezone":"Language and timezone", "install-theme": "Install theme",
"author": "Author", "first-post": "First post",
"start-here": "Start here", "congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**",
"install-theme": "Install theme" "whats-next": "What's Next",
"manage-your-bludit-from-the-admin-panel": "Manage your Bludit from the [admin area](./admin/)",
"follow-bludit-on": "Follow Bludit on",
"visit-the-support-forum": "Visit the [forum](http://forum.bludit.com) for support",
"read-the-documentation-for-more-information": "Read the [documentation](http://docs.bludit.com) for more information",
"share-with-your-friends-and-enjoy": "Share with your friends and enjoy",
"the-page-has-not-been-found": "The page has not been found.",
"error": "Error"
} }

View File

@ -9,133 +9,140 @@
"website": "" "website": ""
}, },
"username": "Usuario", "username": "Usuario",
"password": "Contraseña", "password": "Contraseña",
"confirm-password": "Confirmar contraseña", "confirm-password": "Confirmar contraseña",
"editor": "Editor", "editor": "Editor",
"dashboard": "Panel", "dashboard": "Panel",
"role": "Rol", "role": "Rol",
"post": "Post", "post": "Post",
"posts": "Posts", "posts": "Posts",
"users": "Usuarios", "users": "Usuarios",
"administrator": "Administrador", "administrator": "Administrador",
"add": "Agregar", "add": "Agregar",
"cancel": "Cancel", "cancel": "Cancel",
"content": "Contenido", "content": "Contenido",
"title": "Titulo", "title": "Titulo",
"no-parent": "Sin padre", "no-parent": "Sin padre",
"edit-page": "Editar pagina", "edit-page": "Editar pagina",
"edit-post": "Editar post", "edit-post": "Editar post",
"add-a-new-user": "Agregar nuevo usuario", "add-a-new-user": "Agregar nuevo usuario",
"parent": "Parent", "parent": "Padre",
"friendly-url": "Friendly URL", "friendly-url": "URL Amistosa",
"description": "Description", "description": "Descripcion",
"posted-by": "Posted by", "posted-by": "Publicado por",
"tags": "Tags", "tags": "Etiquetas",
"position": "Position", "position": "Posicion",
"save": "Save", "save": "Guardar",
"draft": "Draft", "draft": "Borrador",
"delete": "Delete", "delete": "Eliminar",
"registered": "Registered", "registered": "Registrado",
"Notifications": "Notifications", "Notifications": "Notificaciones",
"profile": "Profile", "profile": "Perfil",
"email": "Email", "email": "Correo electronico",
"settings": "Settings", "settings": "Ajustes",
"general": "General", "general": "General",
"advanced": "Advanced", "advanced": "Avanzado",
"regional": "Regional", "regional": "Regional",
"about": "About", "about": "Acerca de",
"login": "Log in", "login": "Iniciar sesión",
"logout": "Log out", "logout": "Cerrar sesión",
"manage": "Manage", "manage": "Administrar",
"themes": "Themes", "themes": "Temas",
"prev-page": "Prev page", "prev-page": "Pag. anterior",
"next-page": "Next page", "next-page": "Pag. siguiente",
"configure-plugin": "Configure plugin", "configure-plugin": "Configurar plugin",
"confirm-delete-this-action-cannot-be-undone": "Confirm delete, this action cannot be undone.", "confirm-delete-this-action-cannot-be-undone": "Confirmar eliminacion, esta operacion no se puede deshacer.",
"site-title": "Site title", "site-title": "Titulo del sitio",
"site-slogan": "Site slogan", "site-slogan": "Slogan del sitio",
"site-description": "Site description", "site-description": "Descripcion del sitio",
"footer-text": "Footer text", "footer-text": "Texto de pie de pagina",
"posts-per-page": "Posts per page", "posts-per-page": "Posts por pagina",
"site-url": "Site url", "site-url": "URL del sitio",
"writting-settings": "Writting settings", "writting-settings": "Ajustes de redaccion",
"url-filters": "URL filters", "url-filters": "Filtros URL",
"page": "Page", "page": "Pagina",
"pages": "Pages", "pages": "Paginas",
"home": "Home", "home": "Inicio",
"welcome-back": "Welcome back", "welcome-back": "Bienvenido",
"language": "Language", "language": "Lenguage",
"website": "Website", "website": "Sitio web",
"timezone": "Timezone", "timezone": "Zona horaria",
"locale": "Locale", "locale": "Locale",
"notifications": "Notifications", "new-post": "Nuevo post",
"new-post": "New post", "new-page": "Nueva pagina",
"html-and-markdown-code-supported": "HTML and Markdown code supported", "html-and-markdown-code-supported": "Codigo HTML y Markdown soportado",
"new-page": "New page", "manage-posts": "Administrar posts",
"manage-posts": "Manage posts", "published-date": "Fecha de publicacion",
"published-date": "Published date", "modified-date": "Fecha de modificacion",
"modified-date": "Modified date", "empty-title": "Titulo vacio",
"empty-title": "Empty title", "plugins": "Plugins",
"plugins": "Plugins", "install-plugin": "Instalar plugin",
"install-plugin": "Install plugin", "uninstall-plugin": "Desinstalar plugin",
"uninstall-plugin": "Uninstall plugin", "new-password": "Nueva contraseña",
"new-password": "New password", "edit-user": "Editar usuario",
"edit-user": "Edit user", "publish-now": "Publicar",
"publish-now": "Publish now", "first-name": "Nombre",
"first-name": "First name", "last-name": "Apellido",
"last-name": "Last name", "bludit-version": "Bludit version",
"bludit-version": "Bludit version", "powered-by": "Corriendo con",
"powered-by": "Powered by", "recent-posts": "Posts recientes",
"recent-posts": "Recent Posts", "manage-pages": "Administrar paginas",
"manage-pages": "Manage pages", "advanced-options": "Opciones avanzadas",
"advanced-options": "Advanced options", "user-deleted": "Usuario eliminado",
"user-deleted": "User deleted", "page-added-successfully": "Página agregada con éxito",
"page-added-successfully": "Page added successfully", "post-added-successfully": "Post agregado con éxito ",
"post-added-successfully": "Post added successfully", "the-post-has-been-deleted-successfully": "El post fue eliminado con exito",
"the-post-has-been-deleted-successfully": "The post has been deleted successfully", "the-page-has-been-deleted-successfully": "La pagina fue eliminada con exito",
"the-page-has-been-deleted-successfully": "The page has been deleted successfully", "username-or-password-incorrect": "Usuario o contraseña icorrectos",
"username-or-password-incorrect": "Username or password incorrect", "database-regenerated": "Base de datos regenerada",
"database-regenerated": "Database regenerated", "the-changes-have-been-saved": "Los cambios fueron guardados",
"the-changes-have-been-saved": "The changes have been saved", "enable-more-features-at": "Habilitar más funciones en",
"html-markdown-code-supported": "HTML and Markdown code supported.", "username-already-exists": "El usuario ya existe",
"enable-more-features-at": "Enable more features at", "username-field-is-empty": "El campo usuario esta vacio",
"username-already-exists": "Username already exists", "the-password-and-confirmation-password-do-not-match":"Las contraseña no coiniciden",
"username-field-is-empty": "Username field is empty", "user-has-been-added-successfully": "El usuario fue creado con exito",
"the-password-and-confirmation-password-do-not-match":"The password and confirmation password do not match", "you-do-not-have-sufficient-permissions": "No tiene suficientes permisos para acceder a esta pagina, contacte al administrador.",
"user-has-been-added-successfully": "User has been added successfully", "settings-advanced-writting-settings": "Ajustes->Avanzado->Ajustes de redaccion",
"you-do-not-have-sufficient-permissions": "You do not have sufficient permissions to access this page, contact the administrator.", "new-posts-and-pages-synchronized": "Nuevos posts y paginas sincronizados.",
"settings-advanced-writting-settings": "Settings->Advanced->Writting Settings", "you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.",
"new-posts-and-pages-synchronized": "New posts and pages synchronized.", "email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.",
"you-can-choose-the-users-privilege": "You can choose the user's privilege. The editor role only can write pages and posts.", "use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.",
"email-will-not-be-publicly-displayed": "Email will not be publicly displayed. Recommended for recovery password and notifications.", "use-this-field-to-add-a-catchy-prhase": "Use this field to add a catchy prhase on your site.",
"use-this-field-to-name-your-site": "Use this field to name your site, it will appear at the top of every page of your site.", "you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.",
"use-this-field-to-add-a-catchy-prhase": "Use this field to add a catchy prhase on your site.", "you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.",
"you-can-add-a-site-description-to-provide": "You can add a site description to provide a short bio or description of your site.", "number-of-posts-to-show-per-page": "Number of posts to show per page.",
"you-can-add-a-small-text-on-the-bottom": "You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.", "the-url-of-your-site": "The URL of your site.",
"number-of-posts-to-show-per-page": "Number of posts to show per page.", "add-or-edit-description-tags-or": "Add or edit description, tags or modify the friendly URL.",
"the-url-of-your-site": "The URL of your site.", "select-your-sites-language": "Seleccione el lenguage de su sitio.",
"add-or-edit-description-tags-or": "Add or edit description, tags or modify the friendly URL.", "select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.",
"select-your-sites-language": "Select your site's language.", "you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.",
"select-a-timezone-for-a-correct": "Select a timezone for a correct date/time display on your site.", "you-can-modify-the-url-which-identifies":"You can modify the URL which identifies a page or post using human-readable keywords. No more than 150 characters.",
"you-can-use-this-field-to-define-a-set-of": "You can use this field to define a set of parameters related to the languege, country and special preferences.", "this-field-can-help-describe-the-content": "This field can help describe the content in a few words. No more than 150 characters.",
"you-can-modify-the-url-which-identifies":"You can modify the URL which identifies a page or post using human-readable keywords. No more than 150 characters.", "write-the-tags-separeted-by-comma": "Write the tags separeted by comma. eg: tag1, tag2, tag3",
"this-field-can-help-describe-the-content": "This field can help describe the content in a few words. No more than 150 characters.", "delete-the-user-and-all-its-posts":"Delete the user and all its posts",
"write-the-tags-separeted-by-comma": "Write the tags separeted by comma. eg: tag1, tag2, tag3", "delete-the-user-and-associate-its-posts-to-admin-user": "Delete the user and associate its posts to admin user",
"delete": "Delete", "read-more": "Leer mas",
"delete-the-user-and-all-its-posts":"Delete the user and all its posts", "show-blog": "Mostrar blog",
"delete-the-user-and-associate-its-posts-to-admin-user": "Delete the user and associate its posts to admin user", "default-home-page": "Pagina de inicio predeterminada",
"read-more": "Read more", "version": "Version",
"show-blog": "Show blog", "there-are-no-drafts": "No hay borradores.",
"default-home-page": "Default home page", "create-a-new-article-for-your-blog":"Create a new article for your blog.",
"version": "Version", "create-a-new-page-for-your-website":"Create a new page for your website.",
"there-are-no-drafts": "There are no drafts.", "invite-a-friend-to-collaborate-on-your-website":"Invite a friend to collaborate on your website.",
"create-a-new-article-for-your-blog":"Create a new article for your blog.", "change-your-language-and-region-settings":"Change your language and region settings.",
"create-a-new-page-for-your-website":"Create a new page for your website.", "language-and-timezone":"Lenguage y zona horaria",
"invite-a-friend-to-collaborate-on-your-website":"Invite a friend to collaborate on your website.", "author": "Autor",
"change-your-language-and-region-settings":"Change your language and region settings.", "start-here": "Comience aqui",
"language-and-timezone":"Language and timezone", "install-theme": "Instalar tema",
"author": "Author", "first-post": "Primer post",
"start-here": "Start here", "congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**",
"install-theme": "Install theme" "whats-next": "Que sigue",
"manage-your-bludit-from-the-admin-panel": "Manage your Bludit from the [admin area](./admin/)",
"follow-bludit-on": "Siga Bludit en",
"visit-the-support-forum": "Visite el [foro](http://forum.bludit.com) para soporte",
"read-the-documentation-for-more-information": "Lea la [documentacion](http://docs.bludit.com) para mas informacion",
"share-with-your-friends-and-enjoy": "Comparti con tus amigos y a disfrutar",
"the-page-has-not-been-found": "La pagina no fue encontrada.",
"error": "Error"
} }

View File

@ -69,7 +69,6 @@
"website": "Site", "website": "Site",
"timezone": "Fuseau horaire", "timezone": "Fuseau horaire",
"locale": "Localisation", "locale": "Localisation",
"notifications": "Notifications",
"new-post": "Nouvel article", "new-post": "Nouvel article",
"html-and-markdown-code-supported": "Code HTML et Markdown pris en charge.", "html-and-markdown-code-supported": "Code HTML et Markdown pris en charge.",
"new-page": "Nouvelle page", "new-page": "Nouvelle page",
@ -98,7 +97,6 @@
"username-or-password-incorrect": "Nom dutilisateur ou mot de passe incorrect.", "username-or-password-incorrect": "Nom dutilisateur ou mot de passe incorrect.",
"database-regenerated": "Base de données régénérée.", "database-regenerated": "Base de données régénérée.",
"the-changes-have-been-saved": "Les modifications on était sauvegardées.", "the-changes-have-been-saved": "Les modifications on était sauvegardées.",
"html-markdown-code-supported": "Code HTML et Markdown pris en charge.",
"enable-more-features-at": "Activer plus de fonctionnalités en vous rendant vers ", "enable-more-features-at": "Activer plus de fonctionnalités en vous rendant vers ",
"username-already-exists-or-is-empty": "Le nom dutilisateur existe déjà ou est inexistant.", "username-already-exists-or-is-empty": "Le nom dutilisateur existe déjà ou est inexistant.",
"username-field-is-empty": "Le champ utilisateur est vide !", "username-field-is-empty": "Le champ utilisateur est vide !",
@ -122,7 +120,6 @@
"you-can-modify-the-url-which-identifies":"Vous pouvez modifier l'URL qui identifie une page ou un article, en utilisant des mots-clés lisibles. Pas plus de 150 caractères.", "you-can-modify-the-url-which-identifies":"Vous pouvez modifier l'URL qui identifie une page ou un article, en utilisant des mots-clés lisibles. Pas plus de 150 caractères.",
"this-field-can-help-describe-the-content": "Ce champ peut aider à décrire le contenu en quelques mots. Pas plus de 150 caractères.", "this-field-can-help-describe-the-content": "Ce champ peut aider à décrire le contenu en quelques mots. Pas plus de 150 caractères.",
"write-the-tags-separeted-by-comma": "Écrivez les tags en les séparant par une virgule. par exemple : tag1, tag2, tag3", "write-the-tags-separeted-by-comma": "Écrivez les tags en les séparant par une virgule. par exemple : tag1, tag2, tag3",
"delete": "Supprimer",
"delete-the-user-and-all-its-posts":"Supprimer lutilisateur et tous ses messages associés.", "delete-the-user-and-all-its-posts":"Supprimer lutilisateur et tous ses messages associés.",
"delete-the-user-and-associate-its-posts-to-admin-user": "Supprimez lutilisateur et associez ses messages à ladministrateur principal.", "delete-the-user-and-associate-its-posts-to-admin-user": "Supprimez lutilisateur et associez ses messages à ladministrateur principal.",
"read-more": "Lire la suite...", "read-more": "Lire la suite...",
@ -136,5 +133,17 @@
"change-your-language-and-region-settings":"Modifiez vos paramètres linguistiques et régionaux.", "change-your-language-and-region-settings":"Modifiez vos paramètres linguistiques et régionaux.",
"language-and-timezone":"Langue et fuseau horaire", "language-and-timezone":"Langue et fuseau horaire",
"author": "Auteur", "author": "Auteur",
"start-here": "Prise en main rapide" "start-here": "Prise en main rapide",
"install-theme": "Installer ce thème",
"first-post": "Premier article",
"congratulations-you-have-successfully-installed-your-bludit": "Félicitations, vous avez correctement installé **Bludit**",
"whats-next": "pour la prochaine étape",
"manage-your-bludit-from-the-admin-panel": "Gérez Bludit dans la [zone dadministration](./admin/)",
"follow-bludit-on": "Suivez Bludit sur",
"visit-the-support-forum": "Visitez le [forum](http://forum.bludit.com) de support",
"read-the-documentation-for-more-information": "Lisez la [documentation](http://docs.bludit.com) pour plus dinformation",
"share-with-your-friends-and-enjoy": "Partagez avec vos amis et apprécier !",
"the-page-has-not-been-found": "La page na pas été trouvée.",
"error": "Erreur"
} }

View File

@ -0,0 +1,15 @@
{
"plugin-data":
{
"name": "Maintenance mode",
"description": "Set your site on maintenance mode, you can access to admin area.",
"author": "Bludit",
"email": "",
"website": "http://www.bludit.com",
"version": "0.1",
"releaseDate": "2015-08-02"
},
"enable-maintence-mode": "Enable maintence mode",
"message": "Message"
}

View File

@ -0,0 +1,36 @@
<?php
class pluginMaintanceMode extends Plugin {
public function init()
{
$this->dbFields = array(
'enable'=>true,
'message'=>'Temporarily down for maintenance.'
);
}
public function form()
{
global $Language;
$html = '<div>';
$html .= '<input name="enable" id="jsenable" type="checkbox" value="true" '.($this->getDbField('enable')?'checked':'').'>';
$html .= '<label class="forCheckbox" for="jsenable">'.$Language->get('Enable maintence mode').'</label>';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$Language->get('Message').'</label>';
$html .= '<input name="message" id="jsmessage" type="text" value="'.$this->getDbField('message').'">';
$html .= '</div>';
return $html;
}
public function beforeSiteLoad()
{
if($this->getDbField('enable')) {
exit( $this->getDbField('message') );
}
}
}

View File

@ -2,11 +2,11 @@
class pluginOpenGraph extends Plugin { class pluginOpenGraph extends Plugin {
public function onSiteHead() public function siteHead()
{ {
global $Url, $Site; global $Url, $Site;
global $Post, $Page; global $Post, $Page;
$og = array( $og = array(
'locale' =>$Site->locale(), 'locale' =>$Site->locale(),
'type' =>'website', 'type' =>'website',

View File

@ -27,7 +27,7 @@ class pluginPages extends Plugin {
return $html; return $html;
} }
public function onSiteSidebar() public function siteSidebar()
{ {
global $Language; global $Language;
global $pagesParents; global $pagesParents;
@ -47,21 +47,24 @@ class pluginPages extends Plugin {
foreach($parents as $parent) foreach($parents as $parent)
{ {
// Print the parent if($Site->homepage()!==$parent->key())
$html .= '<li><a class="parent" href="'.$parent->permalink().'">'.$parent->title().'</a></li>';
// Check if the parent hash children
if(isset($pagesParents[$parent->key()]))
{ {
$children = $pagesParents[$parent->key()]; // Print the parent
$html .= '<li><a class="parent" href="'.$parent->permalink().'">'.$parent->title().'</a></li>';
// Print the children // Check if the parent hash children
$html .= '<li><ul>'; if(isset($pagesParents[$parent->key()]))
foreach($children as $child)
{ {
$html .= '<li><a class="children" href="'.$child->permalink().'">— '.$child->title().'</a></li>'; $children = $pagesParents[$parent->key()];
// Print the children
$html .= '<li><ul>';
foreach($children as $child)
{
$html .= '<li><a class="children" href="'.$child->permalink().'">— '.$child->title().'</a></li>';
}
$html .= '</ul></li>';
} }
$html .= '</ul></li>';
} }
} }

View File

@ -34,7 +34,7 @@ class pluginTinymce extends Plugin {
return $html; return $html;
} }
public function onAdminHead() public function adminHead()
{ {
global $Language; global $Language;
global $Site; global $Site;
@ -55,7 +55,7 @@ class pluginTinymce extends Plugin {
return $html; return $html;
} }
public function onAdminBodyEnd() public function adminBodyEnd()
{ {
global $Language; global $Language;
global $Site; global $Site;

View File

@ -8,8 +8,8 @@
</head> </head>
<body> <body>
<!-- Plugins --> <!-- Plugins Site Body Begin -->
<?php Theme::plugins('onSiteBodyBegin') ?> <?php Theme::plugins('siteBodyBegin') ?>
<!-- Layout --> <!-- Layout -->
<div id="layout" class="pure-g"> <div id="layout" class="pure-g">
@ -47,8 +47,8 @@
</div> </div>
<!-- Plugins --> <!-- Plugins Site Body End -->
<?php Theme::plugins('onSiteBodyEnd') ?> <?php Theme::plugins('siteBodyEnd') ?>
</body> </body>
</html> </html>

View File

@ -47,7 +47,5 @@ html, button, input, select, textarea,
} }
</style> </style>
<!-- Plugins --> <!-- Plugins Site Head -->
<?php <?php Theme::plugins('siteHead') ?>
Theme::plugins('onSiteHead');
?>

View File

@ -4,6 +4,9 @@
<section class="post"> <section class="post">
<!-- Plugins Post Begin -->
<?php Theme::plugins('postBegin') ?>
<!-- Post header --> <!-- Post header -->
<header class="post-header"> <header class="post-header">
@ -34,7 +37,7 @@
<!-- Post content --> <!-- Post content -->
<div class="post-content"> <div class="post-content">
<?php <?php
// FALSE to get the first part of the post // Call the method with FALSE to get the first part of the post
echo $Post->content(false) echo $Post->content(false)
?> ?>
</div> </div>
@ -43,10 +46,14 @@
<a class="read-more" href="<?php echo $Post->permalink() ?>"><?php $Language->printMe('Read more') ?></a> <a class="read-more" href="<?php echo $Post->permalink() ?>"><?php $Language->printMe('Read more') ?></a>
<?php } ?> <?php } ?>
<!-- Plugins Post End -->
<?php Theme::plugins('postEnd') ?>
</section> </section>
<?php endforeach; ?> <?php endforeach; ?>
<!-- Paginator for posts -->
<?php <?php
echo Paginator::html(); echo Paginator::html();
?> ?>

View File

@ -2,6 +2,9 @@
<section class="page"> <section class="page">
<!-- Plugins Page Begin -->
<?php Theme::plugins('pageBegin') ?>
<!-- page header --> <!-- page header -->
<header class="page-header"> <header class="page-header">
@ -17,4 +20,7 @@
<?php echo $Page->content() ?> <?php echo $Page->content() ?>
</div> </div>
<!-- Plugins Page Begin -->
<?php Theme::plugins('pageEnd') ?>
</section> </section>

View File

@ -2,6 +2,9 @@
<section class="post"> <section class="post">
<!-- Plugins Post Begin -->
<?php Theme::plugins('postBegin') ?>
<!-- Post header --> <!-- Post header -->
<header class="post-header"> <header class="post-header">
@ -34,4 +37,7 @@
<?php echo $Post->content() ?> <?php echo $Post->content() ?>
</div> </div>
<!-- Plugins Post End -->
<?php Theme::plugins('postEnd') ?>
</section> </section>

View File

@ -1,7 +1,5 @@
<h1 class="title"><?php echo $Site->title() ?></h1> <h1 class="title"><?php echo $Site->title() ?></h1>
<h2 class="slogan"><?php echo $Site->slogan() ?></h2> <h2 class="slogan"><?php echo $Site->slogan() ?></h2>
<!-- Plugins --> <!-- Plugins Sidebar -->
<?php <?php Theme::plugins('siteSidebar') ?>
Theme::plugins('onSiteSidebar');
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB