Compare commits
No commits in common. "koblog" and "feat/new-user-stuff" have entirely different histories.
koblog
...
feat/new-u
226 changed files with 883 additions and 852 deletions
2
.github/issue_template.md
vendored
2
.github/issue_template.md
vendored
|
@ -6,7 +6,7 @@ Complete here.
|
||||||
### Steps to reproduce the problem
|
### Steps to reproduce the problem
|
||||||
Complete here.
|
Complete here.
|
||||||
|
|
||||||
### Koblog version
|
### Bludit version
|
||||||
Complete here.
|
Complete here.
|
||||||
|
|
||||||
### PHP version
|
### PHP version
|
||||||
|
|
42
README.md
42
README.md
|
@ -1,8 +1,20 @@
|
||||||
# 🦎 Koblog
|
# [Bludit](https://www.bludit.com/)
|
||||||
|
|
||||||
Koblog is a fork of bludit, a simple, fast and flexible CMS, with a more IndieWeb/Personnal Web direction. It's made for my personnal [blog](https://blog.kazhnuz.space) and [quarante-douze.net](https://quarante-douze.net). Like Bludit, Koblog is a flat-file cms/blog that stores content in JSON format, eliminating the need for database installation or configuration. It support both markdown and HTML.
|
Bludit the Simple, Fast, and Flexible CMS.
|
||||||
|
|
||||||
It's not yet ready for use (I need some more features first, the reason why it's forked), and isn't really made for public use (but it's open-source, just there won't be doc and stuff).
|
With Bludit, you can build your own website or blog in just seconds. It’s completely free, open-source, and easy to use. Bludit stores content in JSON format, eliminating the need for database installation or configuration. All you need is a web server with PHP support.
|
||||||
|
|
||||||
|
As a Flat-File CMS, Bludit offers unparalleled flexibility and speed. Plus, with support for both Markdown and HTML code, creating and managing content has never been easier.
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
- [Plugins](https://plugins.bludit.com)
|
||||||
|
- [Themes](https://themes.bludit.com)
|
||||||
|
- [Documentation](https://docs.bludit.com)
|
||||||
|
- News and announcement on [Twitter](https://twitter.com/bludit), [Facebook](https://www.facebook.com/bluditcms), and [Reddit](https://www.reddit.com/r/bludit/)
|
||||||
|
- Talk & Chat on [Discord](https://discord.gg/CFaXEdZWds)
|
||||||
|
- Help and Support on [Forum](https://forum.bludit.org)
|
||||||
|
- Bugs reports on [Github Issues](https://github.com/bludit/bludit/issues)
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
@ -15,16 +27,26 @@ It's not yet ready for use (I need some more features first, the reason why it's
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Download the latest version from here.
|
1. Download the latest version from the official page: [Bludit.com](https://www.bludit.com)
|
||||||
2. Extract the zip file into a directory, such as `koblog`.
|
2. Extract the zip file into a directory, such as `bludit`.
|
||||||
3. Upload the `koblog` directory to your web server or hosting.
|
3. Upload the `bludit` directory to your web server or hosting.
|
||||||
4. Visit your domain (e.g., https://example.com/koblog/).
|
4. Visit your domain (e.g., https://example.com/bludit/).
|
||||||
5. Follow the installer to set up your website.
|
5. Follow the Bludit Installer to set up your website.
|
||||||
|
|
||||||
## Quick installation for testing
|
## Quick installation for testing
|
||||||
|
|
||||||
You can use PHP Built-in web server (`php -S localhost:8000`)
|
You can use PHP Built-in web server (`php -S localhost:8000`) or [Docker image](https://hub.docker.com/r/bludit/docker/)
|
||||||
|
|
||||||
|
## Support Bludit
|
||||||
|
|
||||||
|
Bludit is open-source and free to use, but if you find the project useful and would like to support its development, you can contribute on [Patreon](https://www.patreon.com/bePatron?c=921115&rid=2458860). As a token of our appreciation, supporters will receive Bludit PRO.
|
||||||
|
|
||||||
|
If you prefer, you can also make a one-time donation to buy us a coffee or beer. Every contribution helps us continue to improve Bludit and provide the best possible experience for our users.
|
||||||
|
|
||||||
|
- [PayPal](https://www.paypal.me/bludit/10)
|
||||||
|
- BTC (Network BTC): bc1qtets5pdj73uyysjpegfh2gar4pfywra4rglcph
|
||||||
|
- ETH (Network ETH): 0x0d7D58D848aA5f175D75Ce4bC746bAC107f331b7
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Koblog is open source software licensed under the [MIT license](https://tldrlegal.com/license/mit-license).
|
Bludit is open source software licensed under the [MIT license](https://tldrlegal.com/license/mit-license).
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class dbJSON {
|
class dbJSON {
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class dbJSON {
|
||||||
{
|
{
|
||||||
$data = '';
|
$data = '';
|
||||||
if ($this->firstLine) {
|
if ($this->firstLine) {
|
||||||
$data = "<?php defined('KOBLOG') or die('Koblog CMS.'); ?>".PHP_EOL;
|
$data = "<?php defined('BLUDIT') or die('Bludit CMS.'); ?>".PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Serialize database
|
// Serialize database
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Database structure
|
Database structure
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Plugin
|
class Plugin
|
||||||
{
|
{
|
||||||
|
@ -8,11 +8,11 @@ class Plugin
|
||||||
public $directoryName;
|
public $directoryName;
|
||||||
|
|
||||||
// (string) Absolute database filename and path
|
// (string) Absolute database filename and path
|
||||||
// Ex: /www/koblog/bl-content/plugins/sitemap/db.php
|
// Ex: /www/bludit/bl-content/plugins/sitemap/db.php
|
||||||
public $filenameDb;
|
public $filenameDb;
|
||||||
|
|
||||||
// (string) Absolute metadata filename and path
|
// (string) Absolute metadata filename and path
|
||||||
// Ex: /www/koblog/bl-plugins/sitemap/metadata.json
|
// Ex: /www/bludit/bl-plugins/sitemap/metadata.json
|
||||||
public $filenameMetadata;
|
public $filenameMetadata;
|
||||||
|
|
||||||
// (array) Plugin metadata
|
// (array) Plugin metadata
|
||||||
|
@ -80,12 +80,12 @@ class Plugin
|
||||||
|
|
||||||
public function includeCSS($filename)
|
public function includeCSS($filename)
|
||||||
{
|
{
|
||||||
return '<link rel="stylesheet" type="text/css" href="' . $this->domainPath() . 'css/' . $filename . '?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
return '<link rel="stylesheet" type="text/css" href="' . $this->domainPath() . 'css/' . $filename . '?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function includeJS($filename)
|
public function includeJS($filename)
|
||||||
{
|
{
|
||||||
return '<script charset="utf-8" src="' . $this->domainPath() . 'js/' . $filename . '?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
return '<script charset="utf-8" src="' . $this->domainPath() . 'js/' . $filename . '?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns absolute URL and path of the plugin directory
|
// Returns absolute URL and path of the plugin directory
|
||||||
|
@ -203,11 +203,11 @@ class Plugin
|
||||||
|
|
||||||
public function isCompatible()
|
public function isCompatible()
|
||||||
{
|
{
|
||||||
$koblogRoot = explode('.', KOBLOG_VERSION);
|
$bluditRoot = explode('.', BLUDIT_VERSION);
|
||||||
$compatible = explode(',', $this->getMetadata('compatible'));
|
$compatible = explode(',', $this->getMetadata('compatible'));
|
||||||
foreach ($compatible as $version) {
|
foreach ($compatible as $version) {
|
||||||
$root = explode('.', $version);
|
$root = explode('.', $version);
|
||||||
if ($root[0] == $koblogRoot[0] && $root[1] == $koblogRoot[1]) {
|
if ($root[0] == $bluditRoot[0] && $root[1] == $bluditRoot[1]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ class Plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the parameters after the URI, FALSE if the URI doesn't match with the webhook
|
// Returns the parameters after the URI, FALSE if the URI doesn't match with the webhook
|
||||||
// Example: https://www.mykoblog.website/api/foo/bar
|
// Example: https://www.mybludit.com/api/foo/bar
|
||||||
public function webhook($URI = false, $returnsAfterURI = false, $fixed = true)
|
public function webhook($URI = false, $returnsAfterURI = false, $fixed = true)
|
||||||
{
|
{
|
||||||
global $url;
|
global $url;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Title of the page
|
// Title of the page
|
||||||
$layout['title'] = $L->g('About') . ' - ' . $layout['title'];
|
$layout['title'] = $L->g('About') . ' - ' . $layout['title'];
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Functions
|
// Functions
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
function updateKoblog() {
|
function updateBludit() {
|
||||||
global $site;
|
global $site;
|
||||||
global $syslog;
|
global $syslog;
|
||||||
|
|
||||||
// New installation
|
// New installation
|
||||||
if ($site->currentBuild()==0) {
|
if ($site->currentBuild()==0) {
|
||||||
$site->set(array('currentBuild'=>KOBLOG_BUILD));
|
$site->set(array('currentBuild'=>BLUDIT_BUILD));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if Koblog need to be update
|
// Check if Bludit need to be update
|
||||||
if ( ($site->currentBuild() < KOBLOG_BUILD) || isset($_GET['update']) ) {
|
if ( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
|
||||||
Log::set('UPDATE SYSTEM - Starting.');
|
Log::set('UPDATE SYSTEM - Starting.');
|
||||||
|
|
||||||
// Updates only for version less than Koblog v3.0 rc-3
|
// Updates only for version less than Bludit v3.0 rc-3
|
||||||
if ($site->currentBuild()<='20180910') {
|
if ($site->currentBuild()<='20180910') {
|
||||||
@mkdir(PATH_WORKSPACES, DIR_PERMISSIONS, true);
|
@mkdir(PATH_WORKSPACES, DIR_PERMISSIONS, true);
|
||||||
$plugins = array('simple-stats', 'pluginRSS', 'pluginSitemap', 'pluginTimeMachineX', 'pluginBackup');
|
$plugins = array('simple-stats', 'pluginRSS', 'pluginSitemap', 'pluginTimeMachineX', 'pluginBackup');
|
||||||
|
@ -29,20 +29,20 @@ function updateKoblog() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates only for version less than Koblog v3.1
|
// Updates only for version less than Bludit v3.1
|
||||||
if ($site->currentBuild()<='20180921') {
|
if ($site->currentBuild()<='20180921') {
|
||||||
@mkdir(PATH_UPLOADS_PAGES, DIR_PERMISSIONS, true);
|
@mkdir(PATH_UPLOADS_PAGES, DIR_PERMISSIONS, true);
|
||||||
$site->set(array('imageRelativeToAbsolute'=>true, 'imageRestrict'=>false));
|
$site->set(array('imageRelativeToAbsolute'=>true, 'imageRestrict'=>false));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the current build number
|
// Set the current build number
|
||||||
$site->set(array('currentBuild'=>KOBLOG_BUILD));
|
$site->set(array('currentBuild'=>BLUDIT_BUILD));
|
||||||
Log::set('UPDATE SYSTEM - Finished.');
|
Log::set('UPDATE SYSTEM - Finished.');
|
||||||
|
|
||||||
// Add to syslog
|
// Add to syslog
|
||||||
$syslog->add(array(
|
$syslog->add(array(
|
||||||
'dictionaryKey'=>'system-updated',
|
'dictionaryKey'=>'system-updated',
|
||||||
'notes'=>'Koblog v'.KOBLOG_VERSION
|
'notes'=>'Bludit v'.BLUDIT_VERSION
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,8 @@ function updateKoblog() {
|
||||||
// Main after POST
|
// Main after POST
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// Try update Koblog
|
// Try update Bludit
|
||||||
updateKoblog();
|
updateBludit();
|
||||||
|
|
||||||
// Title of the page
|
// Title of the page
|
||||||
$layout['title'] .= ' - '.$L->g('Dashboard');
|
$layout['title'] .= ' - '.$L->g('Dashboard');
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Functions
|
// Functions
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Functions
|
// Functions
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Check role
|
// Check role
|
||||||
|
|
|
@ -28,7 +28,7 @@ $numberOfPages = count($listOfFilesByPage);
|
||||||
<div id="jsalertMedia" class="alert alert-warning d-none" role="alert"></div>
|
<div id="jsalertMedia" class="alert alert-warning d-none" role="alert"></div>
|
||||||
|
|
||||||
<!-- Form and Input file -->
|
<!-- Form and Input file -->
|
||||||
<form name="koblogFormUpload" id="jskoblogFormUpload" enctype="multipart/form-data">
|
<form name="bluditFormUpload" id="jsbluditFormUpload" enctype="multipart/form-data">
|
||||||
<div class="custom-file">
|
<div class="custom-file">
|
||||||
<input type="file" class="custom-file-input" id="jsimages" name="images[]" multiple>
|
<input type="file" class="custom-file-input" id="jsimages" name="images[]" multiple>
|
||||||
<label class="custom-file-label" for="jsimages"><?php $L->p('Choose images to upload'); ?></label>
|
<label class="custom-file-label" for="jsimages"><?php $L->p('Choose images to upload'); ?></label>
|
||||||
|
@ -37,21 +37,21 @@ $numberOfPages = count($listOfFilesByPage);
|
||||||
|
|
||||||
<!-- Progress bar -->
|
<!-- Progress bar -->
|
||||||
<div class="progress mt-3">
|
<div class="progress mt-3">
|
||||||
<div id="jskoblogProgressBar" class="progress-bar bg-primary" role="progressbar" style="width:0%"></div>
|
<div id="jsbluditProgressBar" class="progress-bar bg-primary" role="progressbar" style="width:0%"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
IMAGES LIST
|
IMAGES LIST
|
||||||
-->
|
-->
|
||||||
<!-- Table for list files -->
|
<!-- Table for list files -->
|
||||||
<table id="jskoblogMediaTable" class="table mt-3">
|
<table id="jsbluditMediaTable" class="table mt-3">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php $L->p('There are no images'); ?></td>
|
<td><?php $L->p('There are no images'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Paginator -->
|
<!-- Paginator -->
|
||||||
<nav id="jskoblogMediaTablePagination"></nav>
|
<nav id="jsbluditMediaTablePagination"></nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -76,7 +76,7 @@ function closeMediaManager() {
|
||||||
|
|
||||||
// Remove all files from the table
|
// Remove all files from the table
|
||||||
function cleanTable() {
|
function cleanTable() {
|
||||||
$('#jskoblogMediaTable').empty();
|
$('#jsbluditMediaTable').empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMediaAlert(message) {
|
function showMediaAlert(message) {
|
||||||
|
@ -115,7 +115,7 @@ function displayFiles(files, numberOfPages = <?= $numberOfPages ?>) {
|
||||||
'<\/div>'+
|
'<\/div>'+
|
||||||
'<\/td>'+
|
'<\/td>'+
|
||||||
'<\/tr>';
|
'<\/tr>';
|
||||||
$('#jskoblogMediaTable').append(tableRow);
|
$('#jsbluditMediaTable').append(tableRow);
|
||||||
});
|
});
|
||||||
|
|
||||||
mediaPagination = '<ul class="pagination justify-content-center flex-wrap">';
|
mediaPagination = '<ul class="pagination justify-content-center flex-wrap">';
|
||||||
|
@ -123,13 +123,13 @@ function displayFiles(files, numberOfPages = <?= $numberOfPages ?>) {
|
||||||
mediaPagination += '<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles('+i+')">'+i+'</button></li>';
|
mediaPagination += '<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles('+i+')">'+i+'</button></li>';
|
||||||
}
|
}
|
||||||
mediaPagination += '</ul>';
|
mediaPagination += '</ul>';
|
||||||
$('#jskoblogMediaTablePagination').html(mediaPagination);
|
$('#jsbluditMediaTablePagination').html(mediaPagination);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (files.length == 0) {
|
if (files.length == 0) {
|
||||||
$('#jskoblogMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
|
$('#jsbluditMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
|
||||||
$('#jskoblogMediaTablePagination').html('');
|
$('#jsbluditMediaTablePagination').html('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,11 +195,11 @@ function uploadImages() {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Clean progress bar
|
// Clean progress bar
|
||||||
$("#jskoblogProgressBar").removeClass().addClass("progress-bar bg-primary");
|
$("#jsbluditProgressBar").removeClass().addClass("progress-bar bg-primary");
|
||||||
$("#jskoblogProgressBar").width("0");
|
$("#jsbluditProgressBar").width("0");
|
||||||
|
|
||||||
// Data to send via AJAX
|
// Data to send via AJAX
|
||||||
var formData = new FormData($("#jskoblogFormUpload")[0]);
|
var formData = new FormData($("#jsbluditFormUpload")[0]);
|
||||||
formData.append("uuid", "<?php echo PAGE_IMAGES_KEY ?>");
|
formData.append("uuid", "<?php echo PAGE_IMAGES_KEY ?>");
|
||||||
formData.append("tokenCSRF", tokenCSRF);
|
formData.append("tokenCSRF", tokenCSRF);
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ function uploadImages() {
|
||||||
xhr.upload.addEventListener("progress", function(e) {
|
xhr.upload.addEventListener("progress", function(e) {
|
||||||
if (e.lengthComputable) {
|
if (e.lengthComputable) {
|
||||||
var percentComplete = (e.loaded / e.total)*100;
|
var percentComplete = (e.loaded / e.total)*100;
|
||||||
$("#jskoblogProgressBar").width(percentComplete+"%");
|
$("#jsbluditProgressBar").width(percentComplete+"%");
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
|
@ -224,11 +224,11 @@ function uploadImages() {
|
||||||
}
|
}
|
||||||
}).done(function(data) {
|
}).done(function(data) {
|
||||||
if (data.status==0) {
|
if (data.status==0) {
|
||||||
$("#jskoblogProgressBar").removeClass("bg-primary").addClass("bg-success");
|
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-success");
|
||||||
// Get the files for the first page, this include the files uploaded
|
// Get the files for the first page, this include the files uploaded
|
||||||
getFiles(1);
|
getFiles(1);
|
||||||
} else {
|
} else {
|
||||||
$("#jskoblogProgressBar").removeClass("bg-primary").addClass("bg-danger");
|
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-danger");
|
||||||
showMediaAlert(data.message);
|
showMediaAlert(data.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-uppercase d-block d-lg-none">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-uppercase d-block d-lg-none">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<?php echo (defined('KOBLOG_PRO'))?'KOBLOG PRO':'KOBLOG' ?></span>
|
<?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false"
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false"
|
||||||
aria-label="Toggle navigation">
|
aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<ul class="nav flex-column pt-4">
|
<ul class="nav flex-column pt-4">
|
||||||
|
|
||||||
<li class="nav-item mb-4" style="margin-left: -4px;">
|
<li class="nav-item mb-4" style="margin-left: -4px;">
|
||||||
<img src="<?php echo HTML_PATH_CORE_IMG ?>logo.svg" width="20" height="20" alt="koblog-logo"><span class="ml-2 align-middle"><?php echo (defined('KOBLOG_PRO'))?'KOBLOG PRO':'KOBLOG' ?></span>
|
<img src="<?php echo HTML_PATH_CORE_IMG ?>logo.svg" width="20" height="20" alt="bludit-logo"><span class="ml-2 align-middle"><?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
|
|
|
@ -5,18 +5,18 @@
|
||||||
<meta charset="<?php echo CHARSET ?>">
|
<meta charset="<?php echo CHARSET ?>">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="robots" content="noindex,nofollow">
|
<meta name="robots" content="noindex,nofollow">
|
||||||
<meta name="generator" content="Koblog">
|
<meta name="generator" content="Bludit">
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.KOBLOG_VERSION ?>">
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.BLUDIT_VERSION ?>">
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<?php
|
<?php
|
||||||
echo Theme::cssBootstrap();
|
echo Theme::cssBootstrap();
|
||||||
echo Theme::cssLineAwesome();
|
echo Theme::cssLineAwesome();
|
||||||
echo Theme::css(array(
|
echo Theme::css(array(
|
||||||
'koblog.css',
|
'bludit.css',
|
||||||
'koblog.bootstrap.css'
|
'bludit.bootstrap.css'
|
||||||
), DOMAIN_ADMIN_THEME_CSS);
|
), DOMAIN_ADMIN_THEME_CSS);
|
||||||
echo Theme::css(array(
|
echo Theme::css(array(
|
||||||
'jquery.datetimepicker.min.css',
|
'jquery.datetimepicker.min.css',
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
echo '</script>'.PHP_EOL;
|
echo '</script>'.PHP_EOL;
|
||||||
|
|
||||||
echo '<script charset="utf-8">'.PHP_EOL;
|
echo '<script charset="utf-8">'.PHP_EOL;
|
||||||
include(PATH_CORE_JS.'koblog-ajax.php');
|
include(PATH_CORE_JS.'bludit-ajax.php');
|
||||||
echo '</script>'.PHP_EOL;
|
echo '</script>'.PHP_EOL;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -2,20 +2,20 @@
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Koblog</title>
|
<title>Bludit</title>
|
||||||
<meta charset="<?php echo CHARSET ?>">
|
<meta charset="<?php echo CHARSET ?>">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<meta name="robots" content="noindex,nofollow">
|
<meta name="robots" content="noindex,nofollow">
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG . 'favicon.png?version=' . KOBLOG_VERSION ?>">
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG . 'favicon.png?version=' . BLUDIT_VERSION ?>">
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<?php
|
<?php
|
||||||
echo Theme::cssBootstrap();
|
echo Theme::cssBootstrap();
|
||||||
echo Theme::css(array(
|
echo Theme::css(array(
|
||||||
'koblog.css',
|
'bludit.css',
|
||||||
'koblog.bootstrap.css'
|
'bludit.bootstrap.css'
|
||||||
), DOMAIN_ADMIN_THEME_CSS);
|
), DOMAIN_ADMIN_THEME_CSS);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -8,23 +8,27 @@ echo '
|
||||||
';
|
';
|
||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>Engine</td>';
|
echo '<td>Bludit Edition</td>';
|
||||||
echo '<td>KOBLOG</td>';
|
if (defined('BLUDIT_PRO')) {
|
||||||
|
echo '<td>PRO - '.$L->g('Thanks for supporting Bludit').' <span class="fa fa-heart" style="color: #ffc107"></span></td>';
|
||||||
|
} else {
|
||||||
|
echo '<td>Standard - <a target="_blank" href="https://pro.bludit.com">'.$L->g('Upgrade to Bludit PRO').'</a></td>';
|
||||||
|
}
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>Koblog Version</td>';
|
echo '<td>Bludit Version</td>';
|
||||||
echo '<td>'.KOBLOG_VERSION.'</td>';
|
echo '<td>'.BLUDIT_VERSION.'</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>Koblog Codename</td>';
|
echo '<td>Bludit Codename</td>';
|
||||||
echo '<td>'.KOBLOG_CODENAME.'</td>';
|
echo '<td>'.BLUDIT_CODENAME.'</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>Koblog Build Number</td>';
|
echo '<td>Bludit Build Number</td>';
|
||||||
echo '<td>'.KOBLOG_BUILD.'</td>';
|
echo '<td>'.BLUDIT_BUILD.'</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
|
@ -33,7 +37,7 @@ echo '<td>'.Filesystem::bytesToHumanFileSize(Filesystem::getSize(PATH_ROOT)).'</
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'developers'.'">Koblog Developers</a></td>';
|
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'developers'.'">Bludit Developers</a></td>';
|
||||||
echo '<td></td>';
|
echo '<td></td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
|
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,12 @@ exec('locale -a', $locales);
|
||||||
printTable('Locales installed', $locales);
|
printTable('Locales installed', $locales);
|
||||||
|
|
||||||
echo '<hr>';
|
echo '<hr>';
|
||||||
echo '<h2>KOBLOG</h2>';
|
echo '<h2>BLUDIT</h2>';
|
||||||
echo '<hr>';
|
echo '<hr>';
|
||||||
|
|
||||||
// Constanst defined by Koblog
|
// Constanst defined by Bludit
|
||||||
$constants = get_defined_constants(true);
|
$constants = get_defined_constants(true);
|
||||||
printTable('Koblog Constants', $constants['user']);
|
printTable('Bludit Constants', $constants['user']);
|
||||||
|
|
||||||
// Site object
|
// Site object
|
||||||
printTable('$site object database',$site->db);
|
printTable('$site object database',$site->db);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform')); ?>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ echo Bootstrap::formInputHidden(array(
|
||||||
'name' => 'slug',
|
'name' => 'slug',
|
||||||
'tip' => $L->g('URL associated with the content'),
|
'tip' => $L->g('URL associated with the content'),
|
||||||
'label' => $L->g('Friendly URL'),
|
'label' => $L->g('Friendly URL'),
|
||||||
'placeholder' => $L->g('Leave empty for autocomplete by Koblog.'),
|
'placeholder' => $L->g('Leave empty for autocomplete by Bludit.'),
|
||||||
'value' => $page->slug()
|
'value' => $page->slug()
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -502,9 +502,9 @@ foreach ($customFields as $field => $options) {
|
||||||
var uuid = $("#jsuuid").val();
|
var uuid = $("#jsuuid").val();
|
||||||
var title = $("#jstitle").val();
|
var title = $("#jstitle").val();
|
||||||
var content = editorGetContent();
|
var content = editorGetContent();
|
||||||
var ajax = new koblogAjax();
|
var ajax = new bluditAjax();
|
||||||
koblogAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||||
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $page->uuid() . '?preview=' . md5('autosave-' . $page->uuid()) ?>", "koblog-preview");
|
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $page->uuid() . '?preview=' . md5('autosave-' . $page->uuid()) ?>", "bludit-preview");
|
||||||
preview.focus();
|
preview.focus();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -551,7 +551,7 @@ foreach ($customFields as $field => $options) {
|
||||||
// Autosave only when the user change the content
|
// Autosave only when the user change the content
|
||||||
if (currentContent != content) {
|
if (currentContent != content) {
|
||||||
currentContent = content;
|
currentContent = content;
|
||||||
koblogAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||||
if (data.status == 0) {
|
if (data.status == 0) {
|
||||||
showAlert("<?php $L->p('Autosave') ?>");
|
showAlert("<?php $L->p('Autosave') ?>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id' => 'jsform', 'class' => 'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id' => 'jsform', 'class' => 'tab-content')); ?>
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ echo Bootstrap::formInputHidden(array(
|
||||||
<script>
|
<script>
|
||||||
// $("#jsbuttonRemovePicture").on("click", function() {
|
// $("#jsbuttonRemovePicture").on("click", function() {
|
||||||
// var username = $("#jsusername").val();
|
// var username = $("#jsusername").val();
|
||||||
// koblogAjax.removeProfilePicture(username);
|
// bluditAjax.removeProfilePicture(username);
|
||||||
// $("#jsprofilePicturePreview").attr("src", "<?php echo HTML_PATH_CORE_IMG . 'default.svg' ?>");
|
// $("#jsprofilePicturePreview").attr("src", "<?php echo HTML_PATH_CORE_IMG . 'default.svg' ?>");
|
||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
echo '<h1 class="text-center mb-3 mt-3 font-weight-normal" style="color: #555;">' . $site->title() . '</h1>';
|
echo '<h1 class="text-center mb-3 mt-3 font-weight-normal" style="color: #555;">' . $site->title() . '</h1>';
|
||||||
|
|
||||||
|
@ -34,4 +34,4 @@ echo '
|
||||||
|
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
echo '<p class="mt-3 text-right">' . $L->g('Powered by Koblog') . ((defined('KOBLOG_PRO')) ? ' PRO' : '') . '</p>';
|
echo '<p class="mt-3 text-right">' . $L->g('Powered by Bludit') . ((defined('BLUDIT_PRO')) ? ' PRO' : '') . '</p>';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ echo Bootstrap::formInputHidden(array(
|
||||||
var text = $(this).val();
|
var text = $(this).val();
|
||||||
var parent = $("#jsparent").val();
|
var parent = $("#jsparent").val();
|
||||||
var currentKey = "";
|
var currentKey = "";
|
||||||
var ajax = new koblogAjax();
|
var ajax = new bluditAjax();
|
||||||
var callBack = $("#jsslug");
|
var callBack = $("#jsslug");
|
||||||
ajax.generateSlug(text, parent, currentKey, callBack);
|
ajax.generateSlug(text, parent, currentKey, callBack);
|
||||||
});
|
});
|
||||||
|
@ -308,7 +308,7 @@ echo Bootstrap::formInputHidden(array(
|
||||||
'name' => 'slug',
|
'name' => 'slug',
|
||||||
'tip' => $L->g('URL associated with the content'),
|
'tip' => $L->g('URL associated with the content'),
|
||||||
'label' => $L->g('Friendly URL'),
|
'label' => $L->g('Friendly URL'),
|
||||||
'placeholder' => $L->g('Leave empty for autocomplete by Koblog.')
|
'placeholder' => $L->g('Leave empty for autocomplete by Bludit.')
|
||||||
));
|
));
|
||||||
|
|
||||||
// Robots
|
// Robots
|
||||||
|
@ -458,8 +458,8 @@ foreach ($customFields as $field => $options) {
|
||||||
var uuid = $("#jsuuid").val();
|
var uuid = $("#jsuuid").val();
|
||||||
var title = $("#jstitle").val();
|
var title = $("#jstitle").val();
|
||||||
var content = editorGetContent();
|
var content = editorGetContent();
|
||||||
koblogAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||||
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $uuid . '?preview=' . md5('autosave-' . $uuid) ?>", "koblog-preview");
|
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $uuid . '?preview=' . md5('autosave-' . $uuid) ?>", "bludit-preview");
|
||||||
preview.focus();
|
preview.focus();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -499,7 +499,7 @@ foreach ($customFields as $field => $options) {
|
||||||
// Autosave only when the user change the content
|
// Autosave only when the user change the content
|
||||||
if (currentContent != content) {
|
if (currentContent != content) {
|
||||||
currentContent = content;
|
currentContent = content;
|
||||||
koblogAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||||
if (data.status == 0) {
|
if (data.status == 0) {
|
||||||
showAlert("<?php $L->p('Autosave') ?>");
|
showAlert("<?php $L->p('Autosave') ?>");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id' => 'jsform', 'class' => 'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id' => 'jsform', 'class' => 'tab-content')); ?>
|
||||||
|
|
||||||
|
@ -600,7 +600,7 @@ echo Bootstrap::formInputHidden(array(
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$("#jsbuttonRemoveLogo").on("click", function() {
|
$("#jsbuttonRemoveLogo").on("click", function() {
|
||||||
koblogAjax.removeLogo();
|
bluditAjax.removeLogo();
|
||||||
$("#jssiteLogoPreview").attr("src", "<?php echo HTML_PATH_CORE_IMG . 'default.svg' ?>");
|
$("#jssiteLogoPreview").attr("src", "<?php echo HTML_PATH_CORE_IMG . 'default.svg' ?>");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
// $_GET
|
// $_GET
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
// $_POST
|
// $_POST
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -73,7 +73,7 @@ foreach ($_FILES['images']['name'] as $uuid => $filename) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move from PHP tmp file to Koblog tmp directory
|
// Move from PHP tmp file to Bludit tmp directory
|
||||||
Filesystem::mv($_FILES['images']['tmp_name'][$uuid], PATH_TMP . $filename);
|
Filesystem::mv($_FILES['images']['tmp_name'][$uuid], PATH_TMP . $filename);
|
||||||
|
|
||||||
// Transform the image and generate the thumbnail
|
// Transform the image and generate the thumbnail
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Start the session
|
// Start the session
|
||||||
// If the session is not possible to start the admin area is not available
|
// If the session is not possible to start the admin area is not available
|
||||||
Session::start($site->urlPath(), $site->isHTTPS());
|
Session::start($site->urlPath(), $site->isHTTPS());
|
||||||
if (Session::started()===false) {
|
if (Session::started()===false) {
|
||||||
exit('Koblog CMS. Session initialization failed.');
|
exit('Bludit CMS. Session initialization failed.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$login = new Login();
|
$login = new Login();
|
||||||
|
@ -16,7 +16,7 @@ $layout = array(
|
||||||
'slug'=>null,
|
'slug'=>null,
|
||||||
'plugin'=>false,
|
'plugin'=>false,
|
||||||
'parameters'=>null,
|
'parameters'=>null,
|
||||||
'title'=>'Koblog'
|
'title'=>'Bludit'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get the Controller
|
// Get the Controller
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Koblog version
|
// Bludit version
|
||||||
define('KOBLOG_VERSION', 'kb_0.0.1');
|
define('BLUDIT_VERSION', '3.16.2');
|
||||||
define('KOBLOG_CODENAME', 'Valencia');
|
define('BLUDIT_CODENAME', 'Valencia');
|
||||||
define('KOBLOG_RELEASE_DATE', '2024-08-23');
|
define('BLUDIT_RELEASE_DATE', '2024-08-23');
|
||||||
define('KOBLOG_BUILD', '20240806');
|
define('BLUDIT_BUILD', '20240806');
|
||||||
|
|
||||||
// Change to TRUE for debugging
|
// Change to TRUE for debugging
|
||||||
define('DEBUG_MODE', TRUE);
|
define('DEBUG_MODE', TRUE);
|
||||||
|
@ -122,6 +122,10 @@ include(PATH_HELPERS . 'tcp.class.php');
|
||||||
include(PATH_HELPERS . 'dom.class.php');
|
include(PATH_HELPERS . 'dom.class.php');
|
||||||
include(PATH_HELPERS . 'cookie.class.php');
|
include(PATH_HELPERS . 'cookie.class.php');
|
||||||
|
|
||||||
|
if (file_exists(PATH_KERNEL . 'bludit.pro.php')) {
|
||||||
|
include(PATH_KERNEL . 'bludit.pro.php');
|
||||||
|
}
|
||||||
|
|
||||||
// Objects
|
// Objects
|
||||||
$pages = new Pages();
|
$pages = new Pages();
|
||||||
$users = new Users();
|
$users = new Users();
|
||||||
|
@ -137,7 +141,7 @@ $syslog = new Syslog();
|
||||||
|
|
||||||
// Base URL
|
// Base URL
|
||||||
// The user can define the base URL.
|
// The user can define the base URL.
|
||||||
// Left empty if you want to Koblog try to detect the base URL.
|
// Left empty if you want to Bludit try to detect the base URL.
|
||||||
$base = '';
|
$base = '';
|
||||||
|
|
||||||
if (!empty($_SERVER['DOCUMENT_ROOT']) && !empty($_SERVER['SCRIPT_NAME']) && empty($base)) {
|
if (!empty($_SERVER['DOCUMENT_ROOT']) && !empty($_SERVER['SCRIPT_NAME']) && empty($base)) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Variables
|
// Variables
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Redirect admin, from /admin to /admin/
|
// Redirect admin, from /admin to /admin/
|
||||||
if ($url->uri()==HTML_PATH_ROOT.ADMIN_URI_FILTER) {
|
if ($url->uri()==HTML_PATH_ROOT.ADMIN_URI_FILTER) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Variables
|
// Variables
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
header('HTTP/1.0 '.$url->httpCode().' '.$url->httpMessage());
|
header('HTTP/1.0 '.$url->httpCode().' '.$url->httpMessage());
|
||||||
header('X-Powered-By: Koblog');
|
header('X-Powered-By: Bludit');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Current page number
|
// Current page number
|
||||||
$currentPage = $url->pageNumber();
|
$currentPage = $url->pageNumber();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Variables
|
// Variables
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Variables
|
// Variables
|
||||||
|
@ -44,11 +44,11 @@ function buildThemes()
|
||||||
|
|
||||||
$database['compatible'] = false;
|
$database['compatible'] = false;
|
||||||
if (!empty($metadata['compatible'])) {
|
if (!empty($metadata['compatible'])) {
|
||||||
$koblogRoot = explode('.', KOBLOG_VERSION);
|
$bluditRoot = explode('.', BLUDIT_VERSION);
|
||||||
$compatible = explode(',', $metadata['compatible']);
|
$compatible = explode(',', $metadata['compatible']);
|
||||||
foreach ($compatible as $version) {
|
foreach ($compatible as $version) {
|
||||||
$root = explode('.', $version);
|
$root = explode('.', $version);
|
||||||
if ($root[0] == $koblogRoot[0] && $root[1] == $koblogRoot[1]) {
|
if ($root[0] == $bluditRoot[0] && $root[1] == $bluditRoot[1]) {
|
||||||
$database['compatible'] = true;
|
$database['compatible'] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Load plugins rules
|
// Load plugins rules
|
||||||
include(PATH_RULES.'60.plugins.php');
|
include(PATH_RULES.'60.plugins.php');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Environment variables
|
Environment variables
|
||||||
|
@ -38,8 +38,8 @@ define('SALT_LENGTH', 8);
|
||||||
define('PAGE_BREAK', '<!-- pagebreak -->');
|
define('PAGE_BREAK', '<!-- pagebreak -->');
|
||||||
|
|
||||||
// Remember me
|
// Remember me
|
||||||
define('REMEMBER_COOKIE_USERNAME', 'KOBLOGREMEMBERUSERNAME');
|
define('REMEMBER_COOKIE_USERNAME', 'BLUDITREMEMBERUSERNAME');
|
||||||
define('REMEMBER_COOKIE_TOKEN', 'KOBLOGREMEMBERTOKEN');
|
define('REMEMBER_COOKIE_TOKEN', 'BLUDITREMEMBERTOKEN');
|
||||||
define('REMEMBER_COOKIE_EXPIRE_IN_DAYS', 30);
|
define('REMEMBER_COOKIE_EXPIRE_IN_DAYS', 30);
|
||||||
|
|
||||||
// Filename
|
// Filename
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Categories extends dbList {
|
class Categories extends dbList {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Category {
|
class Category {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Re-index database of categories
|
// Re-index database of categories
|
||||||
// If you create/edit/remove a page is necessary regenerate the database of categories
|
// If you create/edit/remove a page is necessary regenerate the database of categories
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Alert {
|
class Alert {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Cookie {
|
class Cookie {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Date {
|
class Date {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class DOM {
|
class DOM {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Email {
|
class Email {
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class Email {
|
||||||
$message = '<html>
|
$message = '<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>KOBLOG</title>
|
<title>BLUDIT</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Filesystem
|
class Filesystem
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Image {
|
class Image {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Log {
|
class Log {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class Log {
|
||||||
}
|
}
|
||||||
error_log('------------------------', $messageType);
|
error_log('------------------------', $messageType);
|
||||||
}
|
}
|
||||||
error_log($type.' ['.KOBLOG_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType);
|
error_log($type.' ['.BLUDIT_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType);
|
||||||
|
|
||||||
if (DEBUG_TYPE=='TRACE') {
|
if (DEBUG_TYPE=='TRACE') {
|
||||||
error_log(print_r(debug_backtrace(), true));
|
error_log(print_r(debug_backtrace(), true));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Paginator {
|
class Paginator {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Redirect {
|
class Redirect {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Sanitize {
|
class Sanitize {
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Session {
|
class Session {
|
||||||
|
|
||||||
private static $started = false;
|
private static $started = false;
|
||||||
private static $sessionName = 'KOBLOG-KEY';
|
private static $sessionName = 'BLUDIT-KEY';
|
||||||
|
|
||||||
public static function start($path, $secure)
|
public static function start($path, $secure)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class TCP {
|
class TCP {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Text {
|
class Text {
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ class Theme
|
||||||
|
|
||||||
// Returns the absolute URL of the site
|
// Returns the absolute URL of the site
|
||||||
// Ex. https://example.com the method returns https://example.com/
|
// Ex. https://example.com the method returns https://example.com/
|
||||||
// Ex. https://example.com/koblog/ the method returns https://example.com/koblog/
|
// Ex. https://example.com/bludit/ the method returns https://example.com/bludit/
|
||||||
public static function siteUrl()
|
public static function siteUrl()
|
||||||
{
|
{
|
||||||
return DOMAIN_BASE;
|
return DOMAIN_BASE;
|
||||||
|
@ -85,7 +85,7 @@ class Theme
|
||||||
|
|
||||||
// Returns the absolute URL of admin panel
|
// Returns the absolute URL of admin panel
|
||||||
// Ex. https://example.com/admin/ the method returns https://example.com/admin/
|
// Ex. https://example.com/admin/ the method returns https://example.com/admin/
|
||||||
// Ex. https://example.com/koblog/admin/ the method returns https://example.com/koblog/admin/
|
// Ex. https://example.com/bludit/admin/ the method returns https://example.com/bludit/admin/
|
||||||
public static function adminUrl()
|
public static function adminUrl()
|
||||||
{
|
{
|
||||||
return DOMAIN_ADMIN;
|
return DOMAIN_ADMIN;
|
||||||
|
@ -203,7 +203,7 @@ class Theme
|
||||||
|
|
||||||
$links = '';
|
$links = '';
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$links .= '<link rel="stylesheet" type="text/css" href="' . $base . $file . '?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
$links .= '<link rel="stylesheet" type="text/css" href="' . $base . $file . '?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $links;
|
return $links;
|
||||||
|
@ -217,7 +217,7 @@ class Theme
|
||||||
|
|
||||||
$scripts = '';
|
$scripts = '';
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$scripts .= '<script ' . $attributes . ' src="' . $base . $file . '?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
$scripts .= '<script ' . $attributes . ' src="' . $base . $file . '?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $scripts;
|
return $scripts;
|
||||||
|
@ -251,33 +251,33 @@ class Theme
|
||||||
|
|
||||||
public static function jquery()
|
public static function jquery()
|
||||||
{
|
{
|
||||||
return '<script src="' . DOMAIN_CORE_JS . 'jquery.min.js?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
return '<script src="' . DOMAIN_CORE_JS . 'jquery.min.js?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function jsBootstrap($attributes = '')
|
public static function jsBootstrap($attributes = '')
|
||||||
{
|
{
|
||||||
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'bootstrap.bundle.min.js?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'bootstrap.bundle.min.js?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function cssBootstrap()
|
public static function cssBootstrap()
|
||||||
{
|
{
|
||||||
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap.min.css?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap.min.css?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function cssBootstrapIcons()
|
public static function cssBootstrapIcons()
|
||||||
{
|
{
|
||||||
// https://icons.getbootstrap.com/
|
// https://icons.getbootstrap.com/
|
||||||
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap-icons/bootstrap-icons.css?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap-icons/bootstrap-icons.css?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function cssLineAwesome()
|
public static function cssLineAwesome()
|
||||||
{
|
{
|
||||||
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'line-awesome/css/line-awesome-font-awesome.min.css?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'line-awesome/css/line-awesome-font-awesome.min.css?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function jsSortable($attributes = '')
|
public static function jsSortable($attributes = '')
|
||||||
{
|
{
|
||||||
// https://github.com/psfpro/bootstrap-html5sortable
|
// https://github.com/psfpro/bootstrap-html5sortable
|
||||||
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'jquery.sortable.min.js?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'jquery.sortable.min.js?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Valid {
|
class Valid {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class koblogAjax {
|
class bluditAjax {
|
||||||
|
|
||||||
static async saveAsDraft(uuid, title, content) {
|
static async saveAsDraft(uuid, title, content) {
|
||||||
let url = HTML_PATH_ADMIN_ROOT+"ajax/save-as-draft"
|
let url = HTML_PATH_ADMIN_ROOT+"ajax/save-as-draft"
|
||||||
|
@ -55,7 +55,7 @@ class koblogAjax {
|
||||||
ajaxRequest.abort();
|
ajaxRequest.abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("[INFO] [KOBLOG AJAX] [userLogged()] Checking if the user is logged.");
|
console.log("[INFO] [BLUDIT AJAX] [userLogged()] Checking if the user is logged.");
|
||||||
|
|
||||||
ajaxRequest = $.ajax({
|
ajaxRequest = $.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
|
@ -63,14 +63,14 @@ class koblogAjax {
|
||||||
});
|
});
|
||||||
|
|
||||||
ajaxRequest.done(function (response, textStatus, jqXHR) {
|
ajaxRequest.done(function (response, textStatus, jqXHR) {
|
||||||
console.log("[INFO] [KOBLOG AJAX] [userLogged()] The user is logged.");
|
console.log("[INFO] [BLUDIT AJAX] [userLogged()] The user is logged.");
|
||||||
});
|
});
|
||||||
|
|
||||||
ajaxRequest.fail(function (jqXHR, textStatus, errorThrown) {
|
ajaxRequest.fail(function (jqXHR, textStatus, errorThrown) {
|
||||||
// The fail is produced by admin.php when the user is not logged the ajax request is not possible and returns 401
|
// The fail is produced by admin.php when the user is not logged the ajax request is not possible and returns 401
|
||||||
console.log("[INFO] [KOBLOG AJAX] [userLogged()] The user is NOT logged.");
|
console.log("[INFO] [BLUDIT AJAX] [userLogged()] The user is NOT logged.");
|
||||||
if (jqXHR.status==401) {
|
if (jqXHR.status==401) {
|
||||||
callBack("You are not logged in anymore, so Koblog can't save your settings and content.");
|
callBack("You are not logged in anymore, so Bludit can't save your settings and content.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -93,16 +93,16 @@ class koblogAjax {
|
||||||
});
|
});
|
||||||
|
|
||||||
ajaxRequest.done(function (response, textStatus, jqXHR) {
|
ajaxRequest.done(function (response, textStatus, jqXHR) {
|
||||||
console.log("Koblog AJAX: generateSlug(): done handler");
|
console.log("Bludit AJAX: generateSlug(): done handler");
|
||||||
callBack.val(response["slug"]);
|
callBack.val(response["slug"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
ajaxRequest.fail(function (jqXHR, textStatus, errorThrown) {
|
ajaxRequest.fail(function (jqXHR, textStatus, errorThrown) {
|
||||||
console.log("Koblog AJAX: generateSlug(): fail handler");
|
console.log("Bludit AJAX: generateSlug(): fail handler");
|
||||||
});
|
});
|
||||||
|
|
||||||
ajaxRequest.always(function () {
|
ajaxRequest.always(function () {
|
||||||
console.log("Koblog AJAX: generateSlug(): always handler");
|
console.log("Bludit AJAX: generateSlug(): always handler");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
echo 'var HTML_PATH_ROOT = "'.HTML_PATH_ROOT.'";'.PHP_EOL;
|
echo 'var HTML_PATH_ROOT = "'.HTML_PATH_ROOT.'";'.PHP_EOL;
|
||||||
echo 'var HTML_PATH_ADMIN_ROOT = "'.HTML_PATH_ADMIN_ROOT.'";'.PHP_EOL;
|
echo 'var HTML_PATH_ADMIN_ROOT = "'.HTML_PATH_ADMIN_ROOT.'";'.PHP_EOL;
|
||||||
|
@ -6,8 +6,8 @@ echo 'var HTML_PATH_ADMIN_THEME = "'.HTML_PATH_ADMIN_THEME.'";'.PHP_EOL;
|
||||||
echo 'var HTML_PATH_CORE_IMG = "'.HTML_PATH_CORE_IMG.'";'.PHP_EOL;
|
echo 'var HTML_PATH_CORE_IMG = "'.HTML_PATH_CORE_IMG.'";'.PHP_EOL;
|
||||||
echo 'var HTML_PATH_UPLOADS = "'.HTML_PATH_UPLOADS.'";'.PHP_EOL;
|
echo 'var HTML_PATH_UPLOADS = "'.HTML_PATH_UPLOADS.'";'.PHP_EOL;
|
||||||
echo 'var HTML_PATH_UPLOADS_THUMBNAILS = "'.HTML_PATH_UPLOADS_THUMBNAILS.'";'.PHP_EOL;
|
echo 'var HTML_PATH_UPLOADS_THUMBNAILS = "'.HTML_PATH_UPLOADS_THUMBNAILS.'";'.PHP_EOL;
|
||||||
echo 'var KOBLOG_VERSION = "'.KOBLOG_VERSION.'";'.PHP_EOL;
|
echo 'var BLUDIT_VERSION = "'.BLUDIT_VERSION.'";'.PHP_EOL;
|
||||||
echo 'var KOBLOG_BUILD = "'.KOBLOG_BUILD.'";'.PHP_EOL;
|
echo 'var BLUDIT_BUILD = "'.BLUDIT_BUILD.'";'.PHP_EOL;
|
||||||
echo 'var DOMAIN = "'.DOMAIN.'";'.PHP_EOL;
|
echo 'var DOMAIN = "'.DOMAIN.'";'.PHP_EOL;
|
||||||
echo 'var DOMAIN_BASE = "'.DOMAIN_BASE.'";'.PHP_EOL;
|
echo 'var DOMAIN_BASE = "'.DOMAIN_BASE.'";'.PHP_EOL;
|
||||||
echo 'var DOMAIN_PAGES = "'.DOMAIN_PAGES.'";'.PHP_EOL;
|
echo 'var DOMAIN_PAGES = "'.DOMAIN_PAGES.'";'.PHP_EOL;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Language extends dbJSON {
|
class Language extends dbJSON {
|
||||||
public $data;
|
public $data;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Login
|
class Login
|
||||||
{
|
{
|
||||||
|
@ -167,7 +167,7 @@ class Login
|
||||||
{
|
{
|
||||||
$agent = getenv('HTTP_USER_AGENT');
|
$agent = getenv('HTTP_USER_AGENT');
|
||||||
if (empty($agent)) {
|
if (empty($agent)) {
|
||||||
$agent = 'Koblog/2.0 (Mr Nibbler Protocol)';
|
$agent = 'Bludit/2.0 (Mr Nibbler Protocol)';
|
||||||
}
|
}
|
||||||
return sha1($agent);
|
return sha1($agent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Pages extends dbJSON
|
class Pages extends dbJSON
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Page
|
class Page
|
||||||
{
|
{
|
||||||
|
@ -539,7 +539,7 @@ class Page
|
||||||
|
|
||||||
// Returns relative time (e.g. "1 minute ago")
|
// Returns relative time (e.g. "1 minute ago")
|
||||||
// Based on http://stackoverflow.com/a/18602474
|
// Based on http://stackoverflow.com/a/18602474
|
||||||
// Modified for Koblog
|
// Modified for Bludit
|
||||||
// $complete = false : short version
|
// $complete = false : short version
|
||||||
// $complete = true : full version
|
// $complete = true : full version
|
||||||
public function relativeTime($complete = false)
|
public function relativeTime($complete = false)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php defined('KOBLOG') or die('Koblog Badass CMS.');
|
<?php defined('BLUDIT') or die('Bludit Badass CMS.');
|
||||||
|
|
||||||
class Security extends dbJSON
|
class Security extends dbJSON
|
||||||
{
|
{
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue