Compare commits
6 commits
feat/new-u
...
koblog
Author | SHA1 | Date | |
---|---|---|---|
|
c34a81b052 | ||
|
53ccfb6795 | ||
|
12afb94516 | ||
|
9e8607ca8e | ||
|
d1d83e0542 | ||
|
89e866d656 |
226 changed files with 852 additions and 883 deletions
2
.github/issue_template.md
vendored
2
.github/issue_template.md
vendored
|
@ -6,7 +6,7 @@ Complete here.
|
|||
### Steps to reproduce the problem
|
||||
Complete here.
|
||||
|
||||
### Bludit version
|
||||
### Koblog version
|
||||
Complete here.
|
||||
|
||||
### PHP version
|
||||
|
|
42
README.md
42
README.md
|
@ -1,20 +1,8 @@
|
|||
# [Bludit](https://www.bludit.com/)
|
||||
# 🦎 Koblog
|
||||
|
||||
Bludit the Simple, Fast, and Flexible CMS.
|
||||
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.
|
||||
|
||||
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)
|
||||
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).
|
||||
|
||||
## Requirements
|
||||
|
||||
|
@ -27,26 +15,16 @@ As a Flat-File CMS, Bludit offers unparalleled flexibility and speed. Plus, with
|
|||
|
||||
## Installation
|
||||
|
||||
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 `bludit`.
|
||||
3. Upload the `bludit` directory to your web server or hosting.
|
||||
4. Visit your domain (e.g., https://example.com/bludit/).
|
||||
5. Follow the Bludit Installer to set up your website.
|
||||
1. Download the latest version from here.
|
||||
2. Extract the zip file into a directory, such as `koblog`.
|
||||
3. Upload the `koblog` directory to your web server or hosting.
|
||||
4. Visit your domain (e.g., https://example.com/koblog/).
|
||||
5. Follow the installer to set up your website.
|
||||
|
||||
## Quick installation for testing
|
||||
|
||||
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
|
||||
You can use PHP Built-in web server (`php -S localhost:8000`)
|
||||
|
||||
## License
|
||||
|
||||
Bludit is open source software licensed under the [MIT license](https://tldrlegal.com/license/mit-license).
|
||||
Koblog is open source software licensed under the [MIT license](https://tldrlegal.com/license/mit-license).
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class dbJSON {
|
||||
|
||||
|
@ -66,7 +66,7 @@ class dbJSON {
|
|||
{
|
||||
$data = '';
|
||||
if ($this->firstLine) {
|
||||
$data = "<?php defined('BLUDIT') or die('Bludit CMS.'); ?>".PHP_EOL;
|
||||
$data = "<?php defined('KOBLOG') or die('Koblog CMS.'); ?>".PHP_EOL;
|
||||
}
|
||||
|
||||
// Serialize database
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
/*
|
||||
Database structure
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Plugin
|
||||
{
|
||||
|
@ -8,11 +8,11 @@ class Plugin
|
|||
public $directoryName;
|
||||
|
||||
// (string) Absolute database filename and path
|
||||
// Ex: /www/bludit/bl-content/plugins/sitemap/db.php
|
||||
// Ex: /www/koblog/bl-content/plugins/sitemap/db.php
|
||||
public $filenameDb;
|
||||
|
||||
// (string) Absolute metadata filename and path
|
||||
// Ex: /www/bludit/bl-plugins/sitemap/metadata.json
|
||||
// Ex: /www/koblog/bl-plugins/sitemap/metadata.json
|
||||
public $filenameMetadata;
|
||||
|
||||
// (array) Plugin metadata
|
||||
|
@ -80,12 +80,12 @@ class Plugin
|
|||
|
||||
public function includeCSS($filename)
|
||||
{
|
||||
return '<link rel="stylesheet" type="text/css" href="' . $this->domainPath() . 'css/' . $filename . '?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||
return '<link rel="stylesheet" type="text/css" href="' . $this->domainPath() . 'css/' . $filename . '?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
||||
}
|
||||
|
||||
public function includeJS($filename)
|
||||
{
|
||||
return '<script charset="utf-8" src="' . $this->domainPath() . 'js/' . $filename . '?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||
return '<script charset="utf-8" src="' . $this->domainPath() . 'js/' . $filename . '?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
||||
}
|
||||
|
||||
// Returns absolute URL and path of the plugin directory
|
||||
|
@ -203,11 +203,11 @@ class Plugin
|
|||
|
||||
public function isCompatible()
|
||||
{
|
||||
$bluditRoot = explode('.', BLUDIT_VERSION);
|
||||
$koblogRoot = explode('.', KOBLOG_VERSION);
|
||||
$compatible = explode(',', $this->getMetadata('compatible'));
|
||||
foreach ($compatible as $version) {
|
||||
$root = explode('.', $version);
|
||||
if ($root[0] == $bluditRoot[0] && $root[1] == $bluditRoot[1]) {
|
||||
if ($root[0] == $koblogRoot[0] && $root[1] == $koblogRoot[1]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ class Plugin
|
|||
}
|
||||
|
||||
// Returns the parameters after the URI, FALSE if the URI doesn't match with the webhook
|
||||
// Example: https://www.mybludit.com/api/foo/bar
|
||||
// Example: https://www.mykoblog.website/api/foo/bar
|
||||
public function webhook($URI = false, $returnsAfterURI = false, $fixed = true)
|
||||
{
|
||||
global $url;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] = $L->g('About') . ' - ' . $layout['title'];
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
function updateBludit() {
|
||||
function updateKoblog() {
|
||||
global $site;
|
||||
global $syslog;
|
||||
|
||||
// New installation
|
||||
if ($site->currentBuild()==0) {
|
||||
$site->set(array('currentBuild'=>BLUDIT_BUILD));
|
||||
$site->set(array('currentBuild'=>KOBLOG_BUILD));
|
||||
}
|
||||
|
||||
// Check if Bludit need to be update
|
||||
if ( ($site->currentBuild() < BLUDIT_BUILD) || isset($_GET['update']) ) {
|
||||
// Check if Koblog need to be update
|
||||
if ( ($site->currentBuild() < KOBLOG_BUILD) || isset($_GET['update']) ) {
|
||||
Log::set('UPDATE SYSTEM - Starting.');
|
||||
|
||||
// Updates only for version less than Bludit v3.0 rc-3
|
||||
// Updates only for version less than Koblog v3.0 rc-3
|
||||
if ($site->currentBuild()<='20180910') {
|
||||
@mkdir(PATH_WORKSPACES, DIR_PERMISSIONS, true);
|
||||
$plugins = array('simple-stats', 'pluginRSS', 'pluginSitemap', 'pluginTimeMachineX', 'pluginBackup');
|
||||
|
@ -29,20 +29,20 @@ function updateBludit() {
|
|||
}
|
||||
}
|
||||
|
||||
// Updates only for version less than Bludit v3.1
|
||||
// Updates only for version less than Koblog v3.1
|
||||
if ($site->currentBuild()<='20180921') {
|
||||
@mkdir(PATH_UPLOADS_PAGES, DIR_PERMISSIONS, true);
|
||||
$site->set(array('imageRelativeToAbsolute'=>true, 'imageRestrict'=>false));
|
||||
}
|
||||
|
||||
// Set the current build number
|
||||
$site->set(array('currentBuild'=>BLUDIT_BUILD));
|
||||
$site->set(array('currentBuild'=>KOBLOG_BUILD));
|
||||
Log::set('UPDATE SYSTEM - Finished.');
|
||||
|
||||
// Add to syslog
|
||||
$syslog->add(array(
|
||||
'dictionaryKey'=>'system-updated',
|
||||
'notes'=>'Bludit v'.BLUDIT_VERSION
|
||||
'notes'=>'Koblog v'.KOBLOG_VERSION
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -59,8 +59,8 @@ function updateBludit() {
|
|||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Try update Bludit
|
||||
updateBludit();
|
||||
// Try update Koblog
|
||||
updateKoblog();
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('Dashboard');
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
|
|
|
@ -28,7 +28,7 @@ $numberOfPages = count($listOfFilesByPage);
|
|||
<div id="jsalertMedia" class="alert alert-warning d-none" role="alert"></div>
|
||||
|
||||
<!-- Form and Input file -->
|
||||
<form name="bluditFormUpload" id="jsbluditFormUpload" enctype="multipart/form-data">
|
||||
<form name="koblogFormUpload" id="jskoblogFormUpload" enctype="multipart/form-data">
|
||||
<div class="custom-file">
|
||||
<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>
|
||||
|
@ -37,21 +37,21 @@ $numberOfPages = count($listOfFilesByPage);
|
|||
|
||||
<!-- Progress bar -->
|
||||
<div class="progress mt-3">
|
||||
<div id="jsbluditProgressBar" class="progress-bar bg-primary" role="progressbar" style="width:0%"></div>
|
||||
<div id="jskoblogProgressBar" class="progress-bar bg-primary" role="progressbar" style="width:0%"></div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
IMAGES LIST
|
||||
-->
|
||||
<!-- Table for list files -->
|
||||
<table id="jsbluditMediaTable" class="table mt-3">
|
||||
<table id="jskoblogMediaTable" class="table mt-3">
|
||||
<tr>
|
||||
<td><?php $L->p('There are no images'); ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Paginator -->
|
||||
<nav id="jsbluditMediaTablePagination"></nav>
|
||||
<nav id="jskoblogMediaTablePagination"></nav>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -76,7 +76,7 @@ function closeMediaManager() {
|
|||
|
||||
// Remove all files from the table
|
||||
function cleanTable() {
|
||||
$('#jsbluditMediaTable').empty();
|
||||
$('#jskoblogMediaTable').empty();
|
||||
}
|
||||
|
||||
function showMediaAlert(message) {
|
||||
|
@ -115,7 +115,7 @@ function displayFiles(files, numberOfPages = <?= $numberOfPages ?>) {
|
|||
'<\/div>'+
|
||||
'<\/td>'+
|
||||
'<\/tr>';
|
||||
$('#jsbluditMediaTable').append(tableRow);
|
||||
$('#jskoblogMediaTable').append(tableRow);
|
||||
});
|
||||
|
||||
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 += '</ul>';
|
||||
$('#jsbluditMediaTablePagination').html(mediaPagination);
|
||||
$('#jskoblogMediaTablePagination').html(mediaPagination);
|
||||
|
||||
}
|
||||
|
||||
if (files.length == 0) {
|
||||
$('#jsbluditMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
|
||||
$('#jsbluditMediaTablePagination').html('');
|
||||
$('#jskoblogMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
|
||||
$('#jskoblogMediaTablePagination').html('');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,11 +195,11 @@ function uploadImages() {
|
|||
};
|
||||
|
||||
// Clean progress bar
|
||||
$("#jsbluditProgressBar").removeClass().addClass("progress-bar bg-primary");
|
||||
$("#jsbluditProgressBar").width("0");
|
||||
$("#jskoblogProgressBar").removeClass().addClass("progress-bar bg-primary");
|
||||
$("#jskoblogProgressBar").width("0");
|
||||
|
||||
// Data to send via AJAX
|
||||
var formData = new FormData($("#jsbluditFormUpload")[0]);
|
||||
var formData = new FormData($("#jskoblogFormUpload")[0]);
|
||||
formData.append("uuid", "<?php echo PAGE_IMAGES_KEY ?>");
|
||||
formData.append("tokenCSRF", tokenCSRF);
|
||||
|
||||
|
@ -216,7 +216,7 @@ function uploadImages() {
|
|||
xhr.upload.addEventListener("progress", function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var percentComplete = (e.loaded / e.total)*100;
|
||||
$("#jsbluditProgressBar").width(percentComplete+"%");
|
||||
$("#jskoblogProgressBar").width(percentComplete+"%");
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
@ -224,11 +224,11 @@ function uploadImages() {
|
|||
}
|
||||
}).done(function(data) {
|
||||
if (data.status==0) {
|
||||
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-success");
|
||||
$("#jskoblogProgressBar").removeClass("bg-primary").addClass("bg-success");
|
||||
// Get the files for the first page, this include the files uploaded
|
||||
getFiles(1);
|
||||
} else {
|
||||
$("#jsbluditProgressBar").removeClass("bg-primary").addClass("bg-danger");
|
||||
$("#jskoblogProgressBar").removeClass("bg-primary").addClass("bg-danger");
|
||||
showMediaAlert(data.message);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text-uppercase d-block d-lg-none">
|
||||
<div class="container">
|
||||
<span class="navbar-brand">
|
||||
<?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
|
||||
<?php echo (defined('KOBLOG_PRO'))?'KOBLOG PRO':'KOBLOG' ?></span>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false"
|
||||
aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<ul class="nav flex-column pt-4">
|
||||
|
||||
<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="bludit-logo"><span class="ml-2 align-middle"><?php echo (defined('BLUDIT_PRO'))?'BLUDIT PRO':'BLUDIT' ?></span>
|
||||
<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>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
<meta charset="<?php echo CHARSET ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta name="generator" content="Bludit">
|
||||
<meta name="generator" content="Koblog">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.BLUDIT_VERSION ?>">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG.'favicon.png?version='.KOBLOG_VERSION ?>">
|
||||
|
||||
<!-- CSS -->
|
||||
<?php
|
||||
echo Theme::cssBootstrap();
|
||||
echo Theme::cssLineAwesome();
|
||||
echo Theme::css(array(
|
||||
'bludit.css',
|
||||
'bludit.bootstrap.css'
|
||||
'koblog.css',
|
||||
'koblog.bootstrap.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
echo Theme::css(array(
|
||||
'jquery.datetimepicker.min.css',
|
||||
|
@ -53,7 +53,7 @@
|
|||
echo '</script>'.PHP_EOL;
|
||||
|
||||
echo '<script charset="utf-8">'.PHP_EOL;
|
||||
include(PATH_CORE_JS.'bludit-ajax.php');
|
||||
include(PATH_CORE_JS.'koblog-ajax.php');
|
||||
echo '</script>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<title>Bludit</title>
|
||||
<title>Koblog</title>
|
||||
<meta charset="<?php echo CHARSET ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG . 'favicon.png?version=' . BLUDIT_VERSION ?>">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo HTML_PATH_CORE_IMG . 'favicon.png?version=' . KOBLOG_VERSION ?>">
|
||||
|
||||
<!-- CSS -->
|
||||
<?php
|
||||
echo Theme::cssBootstrap();
|
||||
echo Theme::css(array(
|
||||
'bludit.css',
|
||||
'bludit.bootstrap.css'
|
||||
'koblog.css',
|
||||
'koblog.bootstrap.css'
|
||||
), DOMAIN_ADMIN_THEME_CSS);
|
||||
?>
|
||||
|
||||
|
|
|
@ -8,27 +8,23 @@ echo '
|
|||
';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit Edition</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 '<td>Engine</td>';
|
||||
echo '<td>KOBLOG</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit Version</td>';
|
||||
echo '<td>'.BLUDIT_VERSION.'</td>';
|
||||
echo '<td>Koblog Version</td>';
|
||||
echo '<td>'.KOBLOG_VERSION.'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit Codename</td>';
|
||||
echo '<td>'.BLUDIT_CODENAME.'</td>';
|
||||
echo '<td>Koblog Codename</td>';
|
||||
echo '<td>'.KOBLOG_CODENAME.'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>Bludit Build Number</td>';
|
||||
echo '<td>'.BLUDIT_BUILD.'</td>';
|
||||
echo '<td>Koblog Build Number</td>';
|
||||
echo '<td>'.KOBLOG_BUILD.'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
|
@ -37,7 +33,7 @@ echo '<td>'.Filesystem::bytesToHumanFileSize(Filesystem::getSize(PATH_ROOT)).'</
|
|||
echo '</tr>';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'developers'.'">Bludit Developers</a></td>';
|
||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'developers'.'">Koblog Developers</a></td>';
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'plugin-form')); ?>
|
||||
|
||||
|
|
|
@ -26,12 +26,12 @@ exec('locale -a', $locales);
|
|||
printTable('Locales installed', $locales);
|
||||
|
||||
echo '<hr>';
|
||||
echo '<h2>BLUDIT</h2>';
|
||||
echo '<h2>KOBLOG</h2>';
|
||||
echo '<hr>';
|
||||
|
||||
// Constanst defined by Bludit
|
||||
// Constanst defined by Koblog
|
||||
$constants = get_defined_constants(true);
|
||||
printTable('Bludit Constants', $constants['user']);
|
||||
printTable('Koblog Constants', $constants['user']);
|
||||
|
||||
// Site object
|
||||
printTable('$site object database',$site->db);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform')); ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php
|
||||
|
||||
|
@ -327,7 +327,7 @@ echo Bootstrap::formInputHidden(array(
|
|||
'name' => 'slug',
|
||||
'tip' => $L->g('URL associated with the content'),
|
||||
'label' => $L->g('Friendly URL'),
|
||||
'placeholder' => $L->g('Leave empty for autocomplete by Bludit.'),
|
||||
'placeholder' => $L->g('Leave empty for autocomplete by Koblog.'),
|
||||
'value' => $page->slug()
|
||||
));
|
||||
|
||||
|
@ -502,9 +502,9 @@ foreach ($customFields as $field => $options) {
|
|||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val();
|
||||
var content = editorGetContent();
|
||||
var ajax = new bluditAjax();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $page->uuid() . '?preview=' . md5('autosave-' . $page->uuid()) ?>", "bludit-preview");
|
||||
var ajax = new koblogAjax();
|
||||
koblogAjax.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");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
@ -551,7 +551,7 @@ foreach ($customFields as $field => $options) {
|
|||
// Autosave only when the user change the content
|
||||
if (currentContent != content) {
|
||||
currentContent = content;
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
koblogAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
if (data.status == 0) {
|
||||
showAlert("<?php $L->p('Autosave') ?>");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id' => 'jsform', 'class' => 'tab-content')); ?>
|
||||
|
||||
|
@ -160,7 +160,7 @@ echo Bootstrap::formInputHidden(array(
|
|||
<script>
|
||||
// $("#jsbuttonRemovePicture").on("click", function() {
|
||||
// var username = $("#jsusername").val();
|
||||
// bluditAjax.removeProfilePicture(username);
|
||||
// koblogAjax.removeProfilePicture(username);
|
||||
// $("#jsprofilePicturePreview").attr("src", "<?php echo HTML_PATH_CORE_IMG . 'default.svg' ?>");
|
||||
// });
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
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 '<p class="mt-3 text-right">' . $L->g('Powered by Bludit') . ((defined('BLUDIT_PRO')) ? ' PRO' : '') . '</p>';
|
||||
echo '<p class="mt-3 text-right">' . $L->g('Powered by Koblog') . ((defined('KOBLOG_PRO')) ? ' PRO' : '') . '</p>';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php
|
||||
|
||||
|
@ -259,7 +259,7 @@ echo Bootstrap::formInputHidden(array(
|
|||
var text = $(this).val();
|
||||
var parent = $("#jsparent").val();
|
||||
var currentKey = "";
|
||||
var ajax = new bluditAjax();
|
||||
var ajax = new koblogAjax();
|
||||
var callBack = $("#jsslug");
|
||||
ajax.generateSlug(text, parent, currentKey, callBack);
|
||||
});
|
||||
|
@ -308,7 +308,7 @@ echo Bootstrap::formInputHidden(array(
|
|||
'name' => 'slug',
|
||||
'tip' => $L->g('URL associated with the content'),
|
||||
'label' => $L->g('Friendly URL'),
|
||||
'placeholder' => $L->g('Leave empty for autocomplete by Bludit.')
|
||||
'placeholder' => $L->g('Leave empty for autocomplete by Koblog.')
|
||||
));
|
||||
|
||||
// Robots
|
||||
|
@ -458,8 +458,8 @@ foreach ($customFields as $field => $options) {
|
|||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val();
|
||||
var content = editorGetContent();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $uuid . '?preview=' . md5('autosave-' . $uuid) ?>", "bludit-preview");
|
||||
koblogAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $uuid . '?preview=' . md5('autosave-' . $uuid) ?>", "koblog-preview");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
@ -499,7 +499,7 @@ foreach ($customFields as $field => $options) {
|
|||
// Autosave only when the user change the content
|
||||
if (currentContent != content) {
|
||||
currentContent = content;
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
koblogAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
if (data.status == 0) {
|
||||
showAlert("<?php $L->p('Autosave') ?>");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id' => 'jsform', 'class' => 'tab-content')); ?>
|
||||
|
||||
|
@ -600,7 +600,7 @@ echo Bootstrap::formInputHidden(array(
|
|||
</div>
|
||||
<script>
|
||||
$("#jsbuttonRemoveLogo").on("click", function() {
|
||||
bluditAjax.removeLogo();
|
||||
koblogAjax.removeLogo();
|
||||
$("#jssiteLogoPreview").attr("src", "<?php echo HTML_PATH_CORE_IMG . 'default.svg' ?>");
|
||||
});
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.'); ?>
|
||||
|
||||
<?php
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// $_GET
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
// $_POST
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
/*
|
||||
|
@ -73,7 +73,7 @@ foreach ($_FILES['images']['name'] as $uuid => $filename) {
|
|||
}
|
||||
}
|
||||
|
||||
// Move from PHP tmp file to Bludit tmp directory
|
||||
// Move from PHP tmp file to Koblog tmp directory
|
||||
Filesystem::mv($_FILES['images']['tmp_name'][$uuid], PATH_TMP . $filename);
|
||||
|
||||
// Transform the image and generate the thumbnail
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// Start the session
|
||||
// If the session is not possible to start the admin area is not available
|
||||
Session::start($site->urlPath(), $site->isHTTPS());
|
||||
if (Session::started()===false) {
|
||||
exit('Bludit CMS. Session initialization failed.');
|
||||
exit('Koblog CMS. Session initialization failed.');
|
||||
}
|
||||
|
||||
$login = new Login();
|
||||
|
@ -16,7 +16,7 @@ $layout = array(
|
|||
'slug'=>null,
|
||||
'plugin'=>false,
|
||||
'parameters'=>null,
|
||||
'title'=>'Bludit'
|
||||
'title'=>'Koblog'
|
||||
);
|
||||
|
||||
// Get the Controller
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// Bludit version
|
||||
define('BLUDIT_VERSION', '3.16.2');
|
||||
define('BLUDIT_CODENAME', 'Valencia');
|
||||
define('BLUDIT_RELEASE_DATE', '2024-08-23');
|
||||
define('BLUDIT_BUILD', '20240806');
|
||||
// Koblog version
|
||||
define('KOBLOG_VERSION', 'kb_0.0.1');
|
||||
define('KOBLOG_CODENAME', 'Valencia');
|
||||
define('KOBLOG_RELEASE_DATE', '2024-08-23');
|
||||
define('KOBLOG_BUILD', '20240806');
|
||||
|
||||
// Change to TRUE for debugging
|
||||
define('DEBUG_MODE', TRUE);
|
||||
|
@ -122,10 +122,6 @@ include(PATH_HELPERS . 'tcp.class.php');
|
|||
include(PATH_HELPERS . 'dom.class.php');
|
||||
include(PATH_HELPERS . 'cookie.class.php');
|
||||
|
||||
if (file_exists(PATH_KERNEL . 'bludit.pro.php')) {
|
||||
include(PATH_KERNEL . 'bludit.pro.php');
|
||||
}
|
||||
|
||||
// Objects
|
||||
$pages = new Pages();
|
||||
$users = new Users();
|
||||
|
@ -141,7 +137,7 @@ $syslog = new Syslog();
|
|||
|
||||
// Base URL
|
||||
// The user can define the base URL.
|
||||
// Left empty if you want to Bludit try to detect the base URL.
|
||||
// Left empty if you want to Koblog try to detect the base URL.
|
||||
$base = '';
|
||||
|
||||
if (!empty($_SERVER['DOCUMENT_ROOT']) && !empty($_SERVER['SCRIPT_NAME']) && empty($base)) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Variables
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// Redirect admin, from /admin to /admin/
|
||||
if ($url->uri()==HTML_PATH_ROOT.ADMIN_URI_FILTER) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Variables
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
header('HTTP/1.0 '.$url->httpCode().' '.$url->httpMessage());
|
||||
header('X-Powered-By: Bludit');
|
||||
header('X-Powered-By: Koblog');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// Current page number
|
||||
$currentPage = $url->pageNumber();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Variables
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Variables
|
||||
|
@ -44,11 +44,11 @@ function buildThemes()
|
|||
|
||||
$database['compatible'] = false;
|
||||
if (!empty($metadata['compatible'])) {
|
||||
$bluditRoot = explode('.', BLUDIT_VERSION);
|
||||
$koblogRoot = explode('.', KOBLOG_VERSION);
|
||||
$compatible = explode(',', $metadata['compatible']);
|
||||
foreach ($compatible as $version) {
|
||||
$root = explode('.', $version);
|
||||
if ($root[0] == $bluditRoot[0] && $root[1] == $bluditRoot[1]) {
|
||||
if ($root[0] == $koblogRoot[0] && $root[1] == $koblogRoot[1]) {
|
||||
$database['compatible'] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// Load plugins rules
|
||||
include(PATH_RULES.'60.plugins.php');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
/*
|
||||
Environment variables
|
||||
|
@ -38,8 +38,8 @@ define('SALT_LENGTH', 8);
|
|||
define('PAGE_BREAK', '<!-- pagebreak -->');
|
||||
|
||||
// Remember me
|
||||
define('REMEMBER_COOKIE_USERNAME', 'BLUDITREMEMBERUSERNAME');
|
||||
define('REMEMBER_COOKIE_TOKEN', 'BLUDITREMEMBERTOKEN');
|
||||
define('REMEMBER_COOKIE_USERNAME', 'KOBLOGREMEMBERUSERNAME');
|
||||
define('REMEMBER_COOKIE_TOKEN', 'KOBLOGREMEMBERTOKEN');
|
||||
define('REMEMBER_COOKIE_EXPIRE_IN_DAYS', 30);
|
||||
|
||||
// Filename
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Categories extends dbList {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Category {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
// Re-index database of categories
|
||||
// If you create/edit/remove a page is necessary regenerate the database of categories
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Alert {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Cookie {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Date {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class DOM {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Email {
|
||||
|
||||
|
@ -27,7 +27,7 @@ class Email {
|
|||
$message = '<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>BLUDIT</title>
|
||||
<title>KOBLOG</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Filesystem
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Image {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Log {
|
||||
|
||||
|
@ -18,7 +18,7 @@ class Log {
|
|||
}
|
||||
error_log('------------------------', $messageType);
|
||||
}
|
||||
error_log($type.' ['.BLUDIT_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType);
|
||||
error_log($type.' ['.KOBLOG_VERSION.'] ['.$_SERVER['REQUEST_URI'].'] '.$text, $messageType);
|
||||
|
||||
if (DEBUG_TYPE=='TRACE') {
|
||||
error_log(print_r(debug_backtrace(), true));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Paginator {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Redirect {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Sanitize {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Session {
|
||||
|
||||
private static $started = false;
|
||||
private static $sessionName = 'BLUDIT-KEY';
|
||||
private static $sessionName = 'KOBLOG-KEY';
|
||||
|
||||
public static function start($path, $secure)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class TCP {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Text {
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class Theme
|
|||
|
||||
// Returns the absolute URL of the site
|
||||
// Ex. https://example.com the method returns https://example.com/
|
||||
// Ex. https://example.com/bludit/ the method returns https://example.com/bludit/
|
||||
// Ex. https://example.com/koblog/ the method returns https://example.com/koblog/
|
||||
public static function siteUrl()
|
||||
{
|
||||
return DOMAIN_BASE;
|
||||
|
@ -85,7 +85,7 @@ class Theme
|
|||
|
||||
// Returns the absolute URL of admin panel
|
||||
// Ex. https://example.com/admin/ the method returns https://example.com/admin/
|
||||
// Ex. https://example.com/bludit/admin/ the method returns https://example.com/bludit/admin/
|
||||
// Ex. https://example.com/koblog/admin/ the method returns https://example.com/koblog/admin/
|
||||
public static function adminUrl()
|
||||
{
|
||||
return DOMAIN_ADMIN;
|
||||
|
@ -203,7 +203,7 @@ class Theme
|
|||
|
||||
$links = '';
|
||||
foreach ($files as $file) {
|
||||
$links .= '<link rel="stylesheet" type="text/css" href="' . $base . $file . '?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||
$links .= '<link rel="stylesheet" type="text/css" href="' . $base . $file . '?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
||||
}
|
||||
|
||||
return $links;
|
||||
|
@ -217,7 +217,7 @@ class Theme
|
|||
|
||||
$scripts = '';
|
||||
foreach ($files as $file) {
|
||||
$scripts .= '<script ' . $attributes . ' src="' . $base . $file . '?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||
$scripts .= '<script ' . $attributes . ' src="' . $base . $file . '?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
||||
}
|
||||
|
||||
return $scripts;
|
||||
|
@ -251,33 +251,33 @@ class Theme
|
|||
|
||||
public static function jquery()
|
||||
{
|
||||
return '<script src="' . DOMAIN_CORE_JS . 'jquery.min.js?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||
return '<script src="' . DOMAIN_CORE_JS . 'jquery.min.js?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
||||
}
|
||||
|
||||
public static function jsBootstrap($attributes = '')
|
||||
{
|
||||
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'bootstrap.bundle.min.js?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'bootstrap.bundle.min.js?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
||||
}
|
||||
|
||||
public static function cssBootstrap()
|
||||
{
|
||||
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap.min.css?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap.min.css?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
||||
}
|
||||
|
||||
public static function cssBootstrapIcons()
|
||||
{
|
||||
// https://icons.getbootstrap.com/
|
||||
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap-icons/bootstrap-icons.css?version=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||
return '<link rel="stylesheet" type="text/css" href="' . DOMAIN_CORE_CSS . 'bootstrap-icons/bootstrap-icons.css?version=' . KOBLOG_VERSION . '">' . PHP_EOL;
|
||||
}
|
||||
|
||||
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=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||
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;
|
||||
}
|
||||
|
||||
public static function jsSortable($attributes = '')
|
||||
{
|
||||
// https://github.com/psfpro/bootstrap-html5sortable
|
||||
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'jquery.sortable.min.js?version=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||
return '<script ' . $attributes . ' src="' . DOMAIN_CORE_JS . 'jquery.sortable.min.js?version=' . KOBLOG_VERSION . '"></script>' . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Valid {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class bluditAjax {
|
||||
class koblogAjax {
|
||||
|
||||
static async saveAsDraft(uuid, title, content) {
|
||||
let url = HTML_PATH_ADMIN_ROOT+"ajax/save-as-draft"
|
||||
|
@ -55,7 +55,7 @@ class bluditAjax {
|
|||
ajaxRequest.abort();
|
||||
}
|
||||
|
||||
console.log("[INFO] [BLUDIT AJAX] [userLogged()] Checking if the user is logged.");
|
||||
console.log("[INFO] [KOBLOG AJAX] [userLogged()] Checking if the user is logged.");
|
||||
|
||||
ajaxRequest = $.ajax({
|
||||
type: "GET",
|
||||
|
@ -63,14 +63,14 @@ class bluditAjax {
|
|||
});
|
||||
|
||||
ajaxRequest.done(function (response, textStatus, jqXHR) {
|
||||
console.log("[INFO] [BLUDIT AJAX] [userLogged()] The user is logged.");
|
||||
console.log("[INFO] [KOBLOG AJAX] [userLogged()] The user is logged.");
|
||||
});
|
||||
|
||||
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
|
||||
console.log("[INFO] [BLUDIT AJAX] [userLogged()] The user is NOT logged.");
|
||||
console.log("[INFO] [KOBLOG AJAX] [userLogged()] The user is NOT logged.");
|
||||
if (jqXHR.status==401) {
|
||||
callBack("You are not logged in anymore, so Bludit can't save your settings and content.");
|
||||
callBack("You are not logged in anymore, so Koblog can't save your settings and content.");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -93,16 +93,16 @@ class bluditAjax {
|
|||
});
|
||||
|
||||
ajaxRequest.done(function (response, textStatus, jqXHR) {
|
||||
console.log("Bludit AJAX: generateSlug(): done handler");
|
||||
console.log("Koblog AJAX: generateSlug(): done handler");
|
||||
callBack.val(response["slug"]);
|
||||
});
|
||||
|
||||
ajaxRequest.fail(function (jqXHR, textStatus, errorThrown) {
|
||||
console.log("Bludit AJAX: generateSlug(): fail handler");
|
||||
console.log("Koblog AJAX: generateSlug(): fail handler");
|
||||
});
|
||||
|
||||
ajaxRequest.always(function () {
|
||||
console.log("Bludit AJAX: generateSlug(): always handler");
|
||||
console.log("Koblog AJAX: generateSlug(): always handler");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
echo 'var HTML_PATH_ROOT = "'.HTML_PATH_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_UPLOADS = "'.HTML_PATH_UPLOADS.'";'.PHP_EOL;
|
||||
echo 'var HTML_PATH_UPLOADS_THUMBNAILS = "'.HTML_PATH_UPLOADS_THUMBNAILS.'";'.PHP_EOL;
|
||||
echo 'var BLUDIT_VERSION = "'.BLUDIT_VERSION.'";'.PHP_EOL;
|
||||
echo 'var BLUDIT_BUILD = "'.BLUDIT_BUILD.'";'.PHP_EOL;
|
||||
echo 'var KOBLOG_VERSION = "'.KOBLOG_VERSION.'";'.PHP_EOL;
|
||||
echo 'var KOBLOG_BUILD = "'.KOBLOG_BUILD.'";'.PHP_EOL;
|
||||
echo 'var DOMAIN = "'.DOMAIN.'";'.PHP_EOL;
|
||||
echo 'var DOMAIN_BASE = "'.DOMAIN_BASE.'";'.PHP_EOL;
|
||||
echo 'var DOMAIN_PAGES = "'.DOMAIN_PAGES.'";'.PHP_EOL;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Language extends dbJSON {
|
||||
public $data;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Login
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ class Login
|
|||
{
|
||||
$agent = getenv('HTTP_USER_AGENT');
|
||||
if (empty($agent)) {
|
||||
$agent = 'Bludit/2.0 (Mr Nibbler Protocol)';
|
||||
$agent = 'Koblog/2.0 (Mr Nibbler Protocol)';
|
||||
}
|
||||
return sha1($agent);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Pages extends dbJSON
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog CMS.');
|
||||
|
||||
class Page
|
||||
{
|
||||
|
@ -539,7 +539,7 @@ class Page
|
|||
|
||||
// Returns relative time (e.g. "1 minute ago")
|
||||
// Based on http://stackoverflow.com/a/18602474
|
||||
// Modified for Bludit
|
||||
// Modified for Koblog
|
||||
// $complete = false : short version
|
||||
// $complete = true : full version
|
||||
public function relativeTime($complete = false)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php defined('BLUDIT') or die('Bludit Badass CMS.');
|
||||
<?php defined('KOBLOG') or die('Koblog Badass CMS.');
|
||||
|
||||
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