minor changes
This commit is contained in:
parent
d148d8f468
commit
2d6a0d9532
@ -15,12 +15,12 @@
|
||||
<script src="./js/kube.min.js"></script>
|
||||
|
||||
<!-- Plugins -->
|
||||
<?php Theme::plugins('onAdminHead') ?>
|
||||
<?php Theme::plugins('adminHead') ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Plugins -->
|
||||
<?php Theme::plugins('onAdminBodyBegin') ?>
|
||||
<?php Theme::plugins('adminBodyBegin') ?>
|
||||
|
||||
<!-- ALERT -->
|
||||
<script>
|
||||
@ -92,7 +92,7 @@ $(document).ready(function() {
|
||||
?>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
|
@ -10,9 +10,15 @@
|
||||
<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/css/font-awesome.css?version=<?php echo BLUDIT_VERSION ?>">
|
||||
|
||||
<!-- Plugins Login Head -->
|
||||
<?php Theme::plugins('loginHead') ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Plugins Login Body Begin -->
|
||||
<?php Theme::plugins('loginBodyBegin') ?>
|
||||
|
||||
<div id="head">
|
||||
<nav class="navbar nav-fullwidth">
|
||||
<h1>Bludit</h1>
|
||||
@ -45,7 +51,10 @@
|
||||
|
||||
</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>
|
||||
</html>
|
50
install.php
50
install.php
@ -39,10 +39,26 @@ if(!defined('JSON_PRETTY_PRINT')) {
|
||||
// Check if JSON encode and decode are enabled.
|
||||
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.'valid.class.php');
|
||||
include(PATH_HELPERS.'text.class.php');
|
||||
include(PATH_ABSTRACT.'dbjson.class.php');
|
||||
include(PATH_KERNEL.'dblanguage.class.php');
|
||||
|
||||
// ============================================================================
|
||||
// FUNCTIONS
|
||||
@ -128,8 +144,10 @@ function checkSystem()
|
||||
return $stdOut;
|
||||
}
|
||||
|
||||
function install($adminPassword, $email, $language)
|
||||
function install($adminPassword, $email, $locale)
|
||||
{
|
||||
$Language = new dbLanguage($locale);
|
||||
|
||||
$stdOut = array();
|
||||
|
||||
// ============================================================================
|
||||
@ -204,9 +222,9 @@ function install($adminPassword, $email, $language)
|
||||
'title'=>'Bludit',
|
||||
'slogan'=>'cms',
|
||||
'description'=>'',
|
||||
'footer'=>'Footer text - ©2015',
|
||||
'language'=>$language,
|
||||
'locale'=>$language,
|
||||
'footer'=>'©2015',
|
||||
'language'=>$locale,
|
||||
'locale'=>$locale,
|
||||
'timezone'=>'UTC',
|
||||
'theme'=>'pure',
|
||||
'adminTheme'=>'default',
|
||||
@ -244,31 +262,31 @@ function install($adminPassword, $email, $language)
|
||||
// File plugins/pages/db.php
|
||||
$data = array(
|
||||
'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 index.txt for error page
|
||||
$data = 'Title: Error
|
||||
Content: The page has not been found.';
|
||||
$data = 'Title: '.$Language->get('Error').'
|
||||
Content: '.$Language->get('The page has not been found');
|
||||
|
||||
file_put_contents(PATH_PAGES.'error'.DS.'index.txt', $data, LOCK_EX);
|
||||
|
||||
// File index.txt for welcome post
|
||||
$data = 'Title: First post
|
||||
$data = 'Title: '.$Language->get('First post').'
|
||||
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/)
|
||||
- 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
|
||||
- Read the [documentation](http://docs.bludit.com) for more information
|
||||
- Share with your friend :D';
|
||||
- '.$Language->get('Manage your Bludit from the admin panel').'
|
||||
- '.$Language->get('Follow Bludit on').' [Twitter](https://twitter.com/bludit) / [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) / [Google+](https://plus.google.com/+Bluditcms)
|
||||
- '.$Language->get('Visit the support forum').'
|
||||
- '.$Language->get('Read the documentation for more information').'
|
||||
- '.$Language->get('Share with your friends and enjoy');
|
||||
|
||||
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.
|
||||
}
|
||||
|
||||
// EVENTS
|
||||
// HOOKS
|
||||
|
||||
|
||||
public function form()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Before the posts load.
|
||||
public function beforePostsLoad()
|
||||
@ -222,53 +219,81 @@ class Plugin {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onSiteHead()
|
||||
{
|
||||
// SITE HOOKS
|
||||
|
||||
public function beforeSiteLoad() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onSiteBodyBegin()
|
||||
{
|
||||
public function afterSiteLoad() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onSiteBodyEnd()
|
||||
{
|
||||
public function siteHead() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onAdminHead()
|
||||
{
|
||||
public function siteBodyBegin() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onAdminBodyBegin()
|
||||
{
|
||||
public function siteBodyEnd() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onAdminBodyEnd()
|
||||
{
|
||||
public function siteSidebar() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onSiteSidebar()
|
||||
{
|
||||
public function postBegin() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function onAdminSidebar()
|
||||
{
|
||||
public function postEnd() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public function beforeSiteLoad()
|
||||
{
|
||||
public function pageBegin() {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -5,14 +5,25 @@
|
||||
// ============================================================================
|
||||
|
||||
$plugins = array(
|
||||
'onSiteHead'=>array(), // <html><head>HERE</head><body>...</body></html>
|
||||
'onSiteBodyBegin'=>array(), // <html><head>...</head><body>HERE...</body></html>
|
||||
'onSiteBodyEnd'=>array(), // <html><head>...</head><body>...HERE</body></html>
|
||||
'onSiteSidebar'=>array(), // <html><head>...</head><body>...<sidebar>HERE</sidebar>...</body></html>
|
||||
'onAdminHead'=>array(),
|
||||
'onAdminBodyBegin'=>array(),
|
||||
'onAdminBodyEnd'=>array(),
|
||||
'onAdminSidebar'=>array(),
|
||||
'siteHead'=>array(), // <html><head>HERE</head><body>...</body></html>
|
||||
'siteBodyBegin'=>array(), // <html><head>...</head><body>HERE...</body></html>
|
||||
'siteBodyEnd'=>array(), // <html><head>...</head><body>...HERE</body></html>
|
||||
'siteSidebar'=>array(), // <html><head>...</head><body>...<sidebar>HERE</sidebar>...</body></html>
|
||||
|
||||
'pageBegin'=>array(),
|
||||
'pageEnd'=>array(),
|
||||
'postBegin'=>array(),
|
||||
'postEnd'=>array(),
|
||||
|
||||
'adminHead'=>array(),
|
||||
'adminBodyBegin'=>array(),
|
||||
'adminBodyEnd'=>array(),
|
||||
'adminSidebar'=>array(),
|
||||
|
||||
'loginHead'=>array(),
|
||||
'loginBodyBegin'=>array(),
|
||||
'loginBodyEnd'=>array(),
|
||||
|
||||
'beforeSiteLoad'=>array(),
|
||||
'afterSiteLoad'=>array(),
|
||||
'beforePostsLoad'=>array(),
|
||||
|
@ -137,5 +137,16 @@
|
||||
"language-and-timezone":"Language and timezone",
|
||||
"author": "Author",
|
||||
"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",
|
||||
"author": "Author",
|
||||
"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 {
|
||||
|
||||
public function onSiteHead()
|
||||
public function siteHead()
|
||||
{
|
||||
global $Url, $Site;
|
||||
global $Post, $Page;
|
||||
|
||||
|
||||
$og = array(
|
||||
'locale' =>$Site->locale(),
|
||||
'type' =>'website',
|
||||
|
@ -27,7 +27,7 @@ class pluginPages extends Plugin {
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function onSiteSidebar()
|
||||
public function siteSidebar()
|
||||
{
|
||||
global $Language;
|
||||
global $pagesParents;
|
||||
|
@ -34,7 +34,7 @@ class pluginTinymce extends Plugin {
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function onAdminHead()
|
||||
public function adminHead()
|
||||
{
|
||||
global $Language;
|
||||
global $Site;
|
||||
@ -55,7 +55,7 @@ class pluginTinymce extends Plugin {
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function onAdminBodyEnd()
|
||||
public function adminBodyEnd()
|
||||
{
|
||||
global $Language;
|
||||
global $Site;
|
||||
|
@ -9,7 +9,7 @@
|
||||
<body>
|
||||
|
||||
<!-- Plugins Site Body Begin -->
|
||||
<?php Theme::plugins('onSiteBodyBegin') ?>
|
||||
<?php Theme::plugins('siteBodyBegin') ?>
|
||||
|
||||
<!-- Layout -->
|
||||
<div id="layout" class="pure-g">
|
||||
@ -48,7 +48,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Plugins Site Body End -->
|
||||
<?php Theme::plugins('onSiteBodyEnd') ?>
|
||||
<?php Theme::plugins('siteBodyEnd') ?>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -48,4 +48,4 @@ html, button, input, select, textarea,
|
||||
</style>
|
||||
|
||||
<!-- Plugins Site Head -->
|
||||
<?php Theme::plugins('onSiteHead') ?>
|
||||
<?php Theme::plugins('siteHead') ?>
|
||||
|
@ -4,6 +4,9 @@
|
||||
|
||||
<section class="post">
|
||||
|
||||
<!-- Plugins Post Begin -->
|
||||
<?php Theme::plugins('postBegin') ?>
|
||||
|
||||
<!-- 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>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Plugins Post End -->
|
||||
<?php Theme::plugins('postEnd') ?>
|
||||
|
||||
</section>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
<section class="page">
|
||||
|
||||
<!-- Plugins Page Begin -->
|
||||
<?php Theme::plugins('pageBegin') ?>
|
||||
|
||||
<!-- page header -->
|
||||
<header class="page-header">
|
||||
|
||||
@ -17,4 +20,7 @@
|
||||
<?php echo $Page->content() ?>
|
||||
</div>
|
||||
|
||||
<!-- Plugins Page Begin -->
|
||||
<?php Theme::plugins('pageEnd') ?>
|
||||
|
||||
</section>
|
@ -2,6 +2,9 @@
|
||||
|
||||
<section class="post">
|
||||
|
||||
<!-- Plugins Post Begin -->
|
||||
<?php Theme::plugins('postBegin') ?>
|
||||
|
||||
<!-- Post header -->
|
||||
<header class="post-header">
|
||||
|
||||
@ -34,4 +37,7 @@
|
||||
<?php echo $Post->content() ?>
|
||||
</div>
|
||||
|
||||
<!-- Plugins Post End -->
|
||||
<?php Theme::plugins('postEnd') ?>
|
||||
|
||||
</section>
|
@ -2,4 +2,4 @@
|
||||
<h2 class="slogan"><?php echo $Site->slogan() ?></h2>
|
||||
|
||||
<!-- Plugins Sidebar -->
|
||||
<?php Theme::plugins('onSiteSidebar'); ?>
|
||||
<?php Theme::plugins('siteSidebar') ?>
|
Loading…
Reference in New Issue
Block a user