minor changes
This commit is contained in:
parent
d148d8f468
commit
2d6a0d9532
|
@ -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>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
50
install.php
50
install.php
|
@ -39,10 +39,26 @@ if(!defined('JSON_PRETTY_PRINT')) {
|
||||||
// Check if JSON encode and decode are enabled.
|
// Check if JSON encode and decode are enabled.
|
||||||
define('JSON', function_exists('json_encode'));
|
define('JSON', function_exists('json_encode'));
|
||||||
|
|
||||||
// Helpers class
|
// 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
|
||||||
|
@ -128,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();
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
@ -204,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',
|
||||||
|
@ -244,31 +262,31 @@ 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);
|
||||||
|
|
||||||
|
|
|
@ -191,12 +191,9 @@ class Plugin {
|
||||||
// The user can define your own dbFields.
|
// The user can define your own dbFields.
|
||||||
}
|
}
|
||||||
|
|
||||||
// EVENTS
|
// HOOKS
|
||||||
|
|
||||||
|
|
||||||
public function form()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Before the posts load.
|
// Before the posts load.
|
||||||
public function beforePostsLoad()
|
public function beforePostsLoad()
|
||||||
|
@ -222,53 +219,81 @@ class Plugin {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onSiteHead()
|
// SITE HOOKS
|
||||||
{
|
|
||||||
|
public function beforeSiteLoad() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onSiteBodyBegin()
|
public function afterSiteLoad() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onSiteBodyEnd()
|
public function siteHead() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onAdminHead()
|
public function siteBodyBegin() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onAdminBodyBegin()
|
public function siteBodyEnd() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onAdminBodyEnd()
|
public function siteSidebar() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onSiteSidebar()
|
public function postBegin() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onAdminSidebar()
|
public function postEnd() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeSiteLoad()
|
public function pageBegin() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterSiteLoad()
|
public function pageEnd() {
|
||||||
{
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOGIN HOOKS
|
||||||
|
|
||||||
|
public function loginHead() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function loginBodyBegin() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function loginBodyEnd() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ADMIN HOOKS
|
||||||
|
|
||||||
|
public function adminHead() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function adminBodyBegin() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function adminBodyEnd() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function adminSidebar() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function form() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,25 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
$plugins = array(
|
$plugins = array(
|
||||||
'onSiteHead'=>array(), // <html><head>HERE</head><body>...</body></html>
|
'siteHead'=>array(), // <html><head>HERE</head><body>...</body></html>
|
||||||
'onSiteBodyBegin'=>array(), // <html><head>...</head><body>HERE...</body></html>
|
'siteBodyBegin'=>array(), // <html><head>...</head><body>HERE...</body></html>
|
||||||
'onSiteBodyEnd'=>array(), // <html><head>...</head><body>...HERE</body></html>
|
'siteBodyEnd'=>array(), // <html><head>...</head><body>...HERE</body></html>
|
||||||
'onSiteSidebar'=>array(), // <html><head>...</head><body>...<sidebar>HERE</sidebar>...</body></html>
|
'siteSidebar'=>array(), // <html><head>...</head><body>...<sidebar>HERE</sidebar>...</body></html>
|
||||||
'onAdminHead'=>array(),
|
|
||||||
'onAdminBodyBegin'=>array(),
|
'pageBegin'=>array(),
|
||||||
'onAdminBodyEnd'=>array(),
|
'pageEnd'=>array(),
|
||||||
'onAdminSidebar'=>array(),
|
'postBegin'=>array(),
|
||||||
|
'postEnd'=>array(),
|
||||||
|
|
||||||
|
'adminHead'=>array(),
|
||||||
|
'adminBodyBegin'=>array(),
|
||||||
|
'adminBodyEnd'=>array(),
|
||||||
|
'adminSidebar'=>array(),
|
||||||
|
|
||||||
|
'loginHead'=>array(),
|
||||||
|
'loginBodyBegin'=>array(),
|
||||||
|
'loginBodyEnd'=>array(),
|
||||||
|
|
||||||
'beforeSiteLoad'=>array(),
|
'beforeSiteLoad'=>array(),
|
||||||
'afterSiteLoad'=>array(),
|
'afterSiteLoad'=>array(),
|
||||||
'beforePostsLoad'=>array(),
|
'beforePostsLoad'=>array(),
|
||||||
|
|
|
@ -137,5 +137,16 @@
|
||||||
"language-and-timezone":"Language and timezone",
|
"language-and-timezone":"Language and timezone",
|
||||||
"author": "Author",
|
"author": "Author",
|
||||||
"start-here": "Start here",
|
"start-here": "Start here",
|
||||||
"install-theme": "Install theme"
|
"install-theme": "Install theme",
|
||||||
|
"first-post": "First post",
|
||||||
|
"congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**",
|
||||||
|
"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"
|
||||||
|
|
||||||
}
|
}
|
|
@ -137,5 +137,15 @@
|
||||||
"language-and-timezone":"Language and timezone",
|
"language-and-timezone":"Language and timezone",
|
||||||
"author": "Author",
|
"author": "Author",
|
||||||
"start-here": "Start here",
|
"start-here": "Start here",
|
||||||
"install-theme": "Install theme"
|
"install-theme": "Install theme",
|
||||||
|
"first-post": "Primer post",
|
||||||
|
"congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**",
|
||||||
|
"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": "Share with your friends and enjoy",
|
||||||
|
"the-page-has-not-been-found": "The page has not been found.",
|
||||||
|
"error": "Error"
|
||||||
}
|
}
|
|
@ -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',
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- Plugins Site Body Begin -->
|
<!-- 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">
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Plugins Site Body End -->
|
<!-- Plugins Site Body End -->
|
||||||
<?php Theme::plugins('onSiteBodyEnd') ?>
|
<?php Theme::plugins('siteBodyEnd') ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -48,4 +48,4 @@ html, button, input, select, textarea,
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Plugins Site Head -->
|
<!-- Plugins Site Head -->
|
||||||
<?php Theme::plugins('onSiteHead') ?>
|
<?php Theme::plugins('siteHead') ?>
|
||||||
|
|
|
@ -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">
|
||||||
|
|
||||||
|
@ -43,6 +46,9 @@
|
||||||
<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; ?>
|
||||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -2,4 +2,4 @@
|
||||||
<h2 class="slogan"><?php echo $Site->slogan() ?></h2>
|
<h2 class="slogan"><?php echo $Site->slogan() ?></h2>
|
||||||
|
|
||||||
<!-- Plugins Sidebar -->
|
<!-- Plugins Sidebar -->
|
||||||
<?php Theme::plugins('onSiteSidebar'); ?>
|
<?php Theme::plugins('siteSidebar') ?>
|
Loading…
Reference in New Issue