bludit v3.15.0
This commit is contained in:
parent
654be18345
commit
27415297e8
@ -6,7 +6,7 @@ AddDefaultCharset UTF-8
|
|||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
# Base directory
|
# Base directory
|
||||||
#RewriteBase /
|
RewriteBase /
|
||||||
|
|
||||||
# Deny direct access to the next directories
|
# Deny direct access to the next directories
|
||||||
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
|
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]
|
||||||
|
25
README.md
25
README.md
@ -1,12 +1,12 @@
|
|||||||
# [Bludit](https://www.bludit.com/)
|
# [Bludit](https://www.bludit.com/)
|
||||||
|
|
||||||
Simple, Fast and Flexible CMS.
|
Bludit the Simple, Fast, and Flexible CMS.
|
||||||
|
|
||||||
Bludit is a web application to build your own website or blog in seconds, it's completely free and open source. Bludit uses files in JSON format to store the content, you don't need to install or configure a database. You only need a web server with PHP support.
|
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.
|
||||||
|
|
||||||
Bludit is a Flat-File CMS.
|
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.
|
||||||
|
|
||||||
Bludit supports Markdown and HTML code for the content.
|
## Resources
|
||||||
|
|
||||||
- [Plugins](https://plugins.bludit.com)
|
- [Plugins](https://plugins.bludit.com)
|
||||||
- [Themes](https://themes.bludit.com)
|
- [Themes](https://themes.bludit.com)
|
||||||
@ -27,11 +27,11 @@ Bludit supports Markdown and HTML code for the content.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Download the latest version from the official page. [Bludit.com](https://www.bludit.com)
|
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`.
|
2. Extract the zip file into a directory, such as `bludit`.
|
||||||
3. Upload the directory `bludit` to your web server or hosting.
|
3. Upload the `bludit` directory to your web server or hosting.
|
||||||
4. Visit your domain https://example.com/bludit/
|
4. Visit your domain (e.g., https://example.com/bludit/).
|
||||||
5. Follow the Bludit Installer to set up the website.
|
5. Follow the Bludit Installer to set up your website.
|
||||||
|
|
||||||
## Quick installation for testing
|
## Quick installation for testing
|
||||||
|
|
||||||
@ -39,13 +39,14 @@ You can use PHP Built-in web server (`php -S localhost:8000`) or [Docker image](
|
|||||||
|
|
||||||
## Support Bludit
|
## Support Bludit
|
||||||
|
|
||||||
Bludit is open source and free, but if you really like the project and is useful for your you can contribute on [Patreon](https://www.patreon.com/bePatron?c=921115&rid=2458860), also for the supporters we provide Bludit PRO. [](https://pro.bludit.com/)
|
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.
|
||||||
|
|
||||||
Donate one time for the coffee or beer:
|
|
||||||
- [PayPal](https://www.paypal.me/bludit/10)
|
- [PayPal](https://www.paypal.me/bludit/10)
|
||||||
- BTC (Network BTC): bc1qtets5pdj73uyysjpegfh2gar4pfywra4rglcph
|
- BTC (Network BTC): bc1qtets5pdj73uyysjpegfh2gar4pfywra4rglcph
|
||||||
- ETH (Network ETH): 0x0d7D58D848aA5f175D75Ce4bC746bAC107f331b7
|
- ETH (Network ETH): 0x0d7D58D848aA5f175D75Ce4bC746bAC107f331b7
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Bludit 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,6 +1,7 @@
|
|||||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Plugin {
|
class Plugin
|
||||||
|
{
|
||||||
|
|
||||||
// (string) directory name, just the name
|
// (string) directory name, just the name
|
||||||
// Ex: sitemap
|
// Ex: sitemap
|
||||||
@ -55,10 +56,10 @@ class Plugin {
|
|||||||
// Init empty database with default values
|
// Init empty database with default values
|
||||||
$this->db = $this->dbFields;
|
$this->db = $this->dbFields;
|
||||||
|
|
||||||
$this->filenameDb = PATH_PLUGINS_DATABASES.$this->directoryName.DS.'db.php';
|
$this->filenameDb = PATH_PLUGINS_DATABASES . $this->directoryName . DS . 'db.php';
|
||||||
|
|
||||||
// --- Metadata ---
|
// --- Metadata ---
|
||||||
$this->filenameMetadata = PATH_PLUGINS.$this->directoryName().DS.'metadata.json';
|
$this->filenameMetadata = PATH_PLUGINS . $this->directoryName() . DS . 'metadata.json';
|
||||||
$metadataString = file_get_contents($this->filenameMetadata);
|
$metadataString = file_get_contents($this->filenameMetadata);
|
||||||
$this->metadata = json_decode($metadataString, true);
|
$this->metadata = json_decode($metadataString, true);
|
||||||
|
|
||||||
@ -79,44 +80,44 @@ class Plugin {
|
|||||||
|
|
||||||
public function includeCSS($filename)
|
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=' . BLUDIT_VERSION . '">' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function includeJS($filename)
|
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=' . BLUDIT_VERSION . '"></script>' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns absolute URL and path of the plugin directory
|
// Returns absolute URL and path of the plugin directory
|
||||||
// This function helps to include CSS or Javascript files with absolute URL
|
// This function helps to include CSS or Javascript files with absolute URL
|
||||||
public function domainPath()
|
public function domainPath()
|
||||||
{
|
{
|
||||||
return DOMAIN_PLUGINS.$this->directoryName.'/';
|
return DOMAIN_PLUGINS . $this->directoryName . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns relative path of the plugin directory
|
// Returns relative path of the plugin directory
|
||||||
// This function helps to include CSS or Javascript files with relative URL
|
// This function helps to include CSS or Javascript files with relative URL
|
||||||
public function htmlPath()
|
public function htmlPath()
|
||||||
{
|
{
|
||||||
return HTML_PATH_PLUGINS.$this->directoryName.'/';
|
return HTML_PATH_PLUGINS . $this->directoryName . '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns absolute path of the plugin directory
|
// Returns absolute path of the plugin directory
|
||||||
// This function helps to include PHP libraries or some file at server level
|
// This function helps to include PHP libraries or some file at server level
|
||||||
public function phpPath()
|
public function phpPath()
|
||||||
{
|
{
|
||||||
return PATH_PLUGINS.$this->directoryName.DS;
|
return PATH_PLUGINS . $this->directoryName . DS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function phpPathDB()
|
public function phpPathDB()
|
||||||
{
|
{
|
||||||
return PATH_PLUGINS_DATABASES.$this->directoryName.DS;
|
return PATH_PLUGINS_DATABASES . $this->directoryName . DS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the value of the key from the metadata of the plugin, FALSE if the key doesn't exist
|
// Returns the value of the key from the metadata of the plugin, FALSE if the key doesn't exist
|
||||||
public function getMetadata($key)
|
public function getMetadata($key)
|
||||||
{
|
{
|
||||||
if(isset($this->metadata[$key])) {
|
if (isset($this->metadata[$key])) {
|
||||||
return $this->metadata[$key];
|
return $this->metadata[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +134,7 @@ class Plugin {
|
|||||||
// Returns the value of the field from the database
|
// Returns the value of the field from the database
|
||||||
// (string) $field
|
// (string) $field
|
||||||
// (boolean) $html, TRUE returns the value sanitized, FALSE unsanitized
|
// (boolean) $html, TRUE returns the value sanitized, FALSE unsanitized
|
||||||
public function getValue($field, $html=true)
|
public function getValue($field, $html = true)
|
||||||
{
|
{
|
||||||
if (isset($this->db[$field])) {
|
if (isset($this->db[$field])) {
|
||||||
if ($html) {
|
if ($html) {
|
||||||
@ -204,9 +205,9 @@ class Plugin {
|
|||||||
{
|
{
|
||||||
$bluditRoot = explode('.', BLUDIT_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]==$bluditRoot[0] && $root[1]==$bluditRoot[1] ) {
|
if ($root[0] == $bluditRoot[0] && $root[1] == $bluditRoot[1]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,7 +220,7 @@ class Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Return TRUE if the installation success, otherwise FALSE.
|
// Return TRUE if the installation success, otherwise FALSE.
|
||||||
public function install($position=1)
|
public function install($position = 1)
|
||||||
{
|
{
|
||||||
if ($this->installed()) {
|
if ($this->installed()) {
|
||||||
return false;
|
return false;
|
||||||
@ -230,11 +231,11 @@ class Plugin {
|
|||||||
mkdir($workspace, DIR_PERMISSIONS, true);
|
mkdir($workspace, DIR_PERMISSIONS, true);
|
||||||
|
|
||||||
// Create plugin directory for the database
|
// Create plugin directory for the database
|
||||||
mkdir(PATH_PLUGINS_DATABASES.$this->directoryName, DIR_PERMISSIONS, true);
|
mkdir(PATH_PLUGINS_DATABASES . $this->directoryName, DIR_PERMISSIONS, true);
|
||||||
|
|
||||||
$this->dbFields['position'] = $position;
|
$this->dbFields['position'] = $position;
|
||||||
// Sanitize default values to store in the file
|
// Sanitize default values to store in the file
|
||||||
foreach ($this->dbFields as $key=>$value) {
|
foreach ($this->dbFields as $key => $value) {
|
||||||
$value = Sanitize::html($value);
|
$value = Sanitize::html($value);
|
||||||
settype($value, gettype($this->dbFields[$key]));
|
settype($value, gettype($this->dbFields[$key]));
|
||||||
$this->db[$key] = $value;
|
$this->db[$key] = $value;
|
||||||
@ -247,7 +248,7 @@ class Plugin {
|
|||||||
public function uninstall()
|
public function uninstall()
|
||||||
{
|
{
|
||||||
// Delete database
|
// Delete database
|
||||||
$path = PATH_PLUGINS_DATABASES.$this->directoryName;
|
$path = PATH_PLUGINS_DATABASES . $this->directoryName;
|
||||||
Filesystem::deleteRecursive($path);
|
Filesystem::deleteRecursive($path);
|
||||||
|
|
||||||
// Delete workspace
|
// Delete workspace
|
||||||
@ -266,7 +267,7 @@ class Plugin {
|
|||||||
|
|
||||||
public function workspace()
|
public function workspace()
|
||||||
{
|
{
|
||||||
return PATH_WORKSPACES.$this->directoryName.DS;
|
return PATH_WORKSPACES . $this->directoryName . DS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
@ -284,11 +285,14 @@ class Plugin {
|
|||||||
public function post()
|
public function post()
|
||||||
{
|
{
|
||||||
$args = $_POST;
|
$args = $_POST;
|
||||||
foreach ($this->dbFields as $field=>$value) {
|
foreach ($this->dbFields as $field => $value) {
|
||||||
if (isset($args[$field])) {
|
if (isset($args[$field])) {
|
||||||
$finalValue = Sanitize::html( $args[$field] );
|
$finalValue = Sanitize::html($args[$field]);
|
||||||
if ($finalValue==='false') { $finalValue = false; }
|
if ($finalValue === 'false') {
|
||||||
elseif ($finalValue==='true') { $finalValue = true; }
|
$finalValue = false;
|
||||||
|
} elseif ($finalValue === 'true') {
|
||||||
|
$finalValue = true;
|
||||||
|
}
|
||||||
settype($finalValue, gettype($value));
|
settype($finalValue, gettype($value));
|
||||||
$this->db[$field] = $finalValue;
|
$this->db[$field] = $finalValue;
|
||||||
}
|
}
|
||||||
@ -296,6 +300,11 @@ class Plugin {
|
|||||||
return $this->save();
|
return $this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function type()
|
||||||
|
{
|
||||||
|
return $this->getMetadata('type');
|
||||||
|
}
|
||||||
|
|
||||||
public function setField($field, $value)
|
public function setField($field, $value)
|
||||||
{
|
{
|
||||||
$this->db[$field] = Sanitize::html($value);
|
$this->db[$field] = Sanitize::html($value);
|
||||||
@ -309,7 +318,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.mybludit.com/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;
|
||||||
|
|
||||||
@ -318,10 +327,10 @@ class Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check URI start with the webhook
|
// Check URI start with the webhook
|
||||||
$startString = HTML_PATH_ROOT.$URI;
|
$startString = HTML_PATH_ROOT . $URI;
|
||||||
$URI = $url->uri();
|
$URI = $url->uri();
|
||||||
$length = mb_strlen($startString, CHARSET);
|
$length = mb_strlen($startString, CHARSET);
|
||||||
if (mb_substr($URI, 0, $length)!=$startString) {
|
if (mb_substr($URI, 0, $length) != $startString) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +339,7 @@ class Plugin {
|
|||||||
if ($fixed) {
|
if ($fixed) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($afterURI[0]!='/') {
|
if ($afterURI[0] != '/') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -339,8 +348,7 @@ class Plugin {
|
|||||||
return $afterURI;
|
return $afterURI;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::set(__METHOD__.LOG_SEP.'Webhook requested.');
|
Log::set(__METHOD__ . LOG_SEP . 'Webhook requested.');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
@ -18,7 +17,7 @@ body {
|
|||||||
ICONS
|
ICONS
|
||||||
*/
|
*/
|
||||||
.fa {
|
.fa {
|
||||||
padding-right: 2px;
|
margin-right: .5rem !important;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,8 +26,8 @@ body {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
div.sidebar .nav-item a {
|
div.sidebar .nav-item a {
|
||||||
padding-left:0;
|
padding-left: 0;
|
||||||
padding-right:0;
|
padding-right: 0;
|
||||||
color: #555;
|
color: #555;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
@ -69,6 +68,7 @@ div.sidebar .nav-item h4 {
|
|||||||
|
|
||||||
/* for small devices */
|
/* for small devices */
|
||||||
@media (max-width: 575.98px) {
|
@media (max-width: 575.98px) {
|
||||||
|
|
||||||
#jsmediaManagerButton,
|
#jsmediaManagerButton,
|
||||||
#jscategoryButton,
|
#jscategoryButton,
|
||||||
#jsdescriptionButton {
|
#jsdescriptionButton {
|
||||||
@ -104,7 +104,7 @@ code {
|
|||||||
padding: 3px 5px 2px;
|
padding: 3px 5px 2px;
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
background: #eaeaea;
|
background: #eaeaea;
|
||||||
background: rgba(0,0,0,.07);
|
background: rgba(0, 0, 0, .07);
|
||||||
color: #444;
|
color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,8 +129,8 @@ code {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
body.login {
|
body.login {
|
||||||
background: rgb(255,255,255);
|
background: rgb(255, 255, 255);
|
||||||
background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 53%);
|
background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(250, 250, 250, 1) 53%);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +168,6 @@ body.login {
|
|||||||
|
|
||||||
#hello-message {
|
#hello-message {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
color: #777;
|
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,7 +242,7 @@ body.login {
|
|||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
border: 1px solid #ced4da;
|
border: 1px solid #ced4da;
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
|
transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plugin-form textarea {
|
.plugin-form textarea {
|
||||||
@ -301,16 +300,20 @@ td.child {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jseditorToolbarRight button {
|
#jseditorToolbarRight button {
|
||||||
font-size: 0px !important;
|
font-size: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#jseditorToolbarRight button span {
|
#jseditorToolbarRight button span {
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentTools .btn {
|
.contentTools .btn {
|
||||||
font-size: 0px !important;
|
font-size: 0px !important;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentTools .btn span {
|
.contentTools .btn span {
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
}
|
}
|
||||||
@ -340,7 +343,7 @@ td.child {
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
background-color: rgba(72,72,72,0.7);
|
background-color: rgba(72, 72, 72, 0.7);
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -1,54 +1,57 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Bludit</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='.BLUDIT_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(
|
||||||
'bludit.css',
|
'bludit.css',
|
||||||
'bludit.bootstrap.css'
|
'bludit.bootstrap.css'
|
||||||
), DOMAIN_ADMIN_THEME_CSS);
|
), DOMAIN_ADMIN_THEME_CSS);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
<?php
|
<?php
|
||||||
echo Theme::jquery();
|
echo Theme::jquery();
|
||||||
echo Theme::jsBootstrap();
|
echo Theme::jsBootstrap();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins -->
|
||||||
<?php Theme::plugins('loginHead') ?>
|
<?php Theme::plugins('loginHead') ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="login">
|
<body class="login">
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins -->
|
||||||
<?php Theme::plugins('loginBodyBegin') ?>
|
<?php Theme::plugins('loginBodyBegin') ?>
|
||||||
|
|
||||||
<!-- Alert -->
|
<!-- Alert -->
|
||||||
<?php include('html/alert.php'); ?>
|
<?php include('html/alert.php'); ?>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row justify-content-md-center pt-5">
|
<div class="row justify-content-md-center pt-5">
|
||||||
<div class="col-md-4 pt-5">
|
<div class="col-md-4 mt-5 p-5 shadow-sm bg-white rounded border">
|
||||||
<?php
|
<?php
|
||||||
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
|
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'] . '.php')) {
|
||||||
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
|
include(PATH_ADMIN_VIEWS . $layout['view'] . '.php');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins -->
|
||||||
<?php Theme::plugins('loginBodyEnd') ?>
|
<?php Theme::plugins('loginBodyEnd') ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
<!-- Good message -->
|
<!-- Good message -->
|
||||||
<div>
|
<div>
|
||||||
<h2 id="hello-message" class="pt-0">
|
<h2 id="hello-message" class="pt-0">
|
||||||
<?php
|
<?php
|
||||||
$username = $login->username();
|
$username = $login->username();
|
||||||
$user = new User($username);
|
$user = new User($username);
|
||||||
$name = '';
|
$name = '';
|
||||||
@ -14,26 +14,26 @@
|
|||||||
} elseif ($user->firstName()) {
|
} elseif ($user->firstName()) {
|
||||||
$name = $user->firstName();
|
$name = $user->firstName();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<span class="fa fa-hand-spock-o"></span><span><?php echo $L->g('hello').' '.$name ?></span>
|
<span class="fa fa-hand-spock-o"></span><span><?php echo $L->g('welcome') ?></span>
|
||||||
</h2>
|
</h2>
|
||||||
<script>
|
<script>
|
||||||
$( document ).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#hello-message").fadeOut(2400, function() {
|
$("#hello-message").fadeOut(2400, function() {
|
||||||
var date = new Date()
|
var date = new Date()
|
||||||
var hours = date.getHours()
|
var hours = date.getHours()
|
||||||
if (hours > 6 && hours < 12) {
|
if (hours > 6 && hours < 12) {
|
||||||
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-morning') ?>');
|
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-morning') . ', ' . $name ?>');
|
||||||
} else if (hours > 12 && hours < 18) {
|
} else if (hours > 12 && hours < 18) {
|
||||||
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-afternoon') ?>');
|
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-afternoon') . ', ' . $name ?>');
|
||||||
} else if (hours > 18 && hours < 22) {
|
} else if (hours > 18 && hours < 22) {
|
||||||
$(this).html('<span class="fa fa-moon-o"></span><?php echo $L->g('good-evening') ?>');
|
$(this).html('<span class="fa fa-moon-o"></span><?php echo $L->g('good-evening') . ', ' . $name ?>');
|
||||||
} else {
|
} else {
|
||||||
$(this).html('<span class="fa fa-moon-o"></span><span><?php echo $L->g('good-night') ?></span>');
|
$(this).html('<span class="fa fa-moon-o"></span><span><?php echo $L->g('good-night') . ', ' . $name ?></span>');
|
||||||
}
|
}
|
||||||
}).fadeIn(1000);
|
}).fadeIn(1000);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Quick Links -->
|
<!-- Quick Links -->
|
||||||
@ -42,108 +42,70 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col p-0">
|
<div class="col p-0">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<select id="jsclippy" class="clippy" name="state"></select>
|
<select id="jsclippy" class="clippy" name="state"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
var clippy = $("#jsclippy").select2({
|
var clippy = $("#jsclippy").select2({
|
||||||
placeholder: "<?php $L->p('Start typing to see a list of suggestions') ?>",
|
placeholder: "<?php $L->p('Start typing to see a list of suggestions') ?>",
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
theme: "bootstrap4",
|
theme: "bootstrap4",
|
||||||
minimumInputLength: 2,
|
minimumInputLength: 2,
|
||||||
dropdownParent: "#jsclippyContainer",
|
dropdownParent: "#jsclippyContainer",
|
||||||
language: {
|
language: {
|
||||||
inputTooShort: function () { return ''; }
|
inputTooShort: function() {
|
||||||
},
|
return '';
|
||||||
ajax: {
|
}
|
||||||
url: HTML_PATH_ADMIN_ROOT+"ajax/clippy",
|
},
|
||||||
data: function (params) {
|
ajax: {
|
||||||
var query = { query: params.term }
|
url: HTML_PATH_ADMIN_ROOT + "ajax/clippy",
|
||||||
return query;
|
data: function(params) {
|
||||||
},
|
var query = {
|
||||||
processResults: function (data) {
|
query: params.term
|
||||||
return data;
|
}
|
||||||
}
|
return query;
|
||||||
},
|
},
|
||||||
templateResult: function(data) {
|
processResults: function(data) {
|
||||||
// console.log(data);
|
return data;
|
||||||
var html = '';
|
}
|
||||||
if (data.type=='menu') {
|
},
|
||||||
html += '<a href="'+data.url+'"><div class="search-suggestion">';
|
templateResult: function(data) {
|
||||||
html += '<span class="fa fa-'+data.icon+'"></span>'+data.text+'</div></a>';
|
// console.log(data);
|
||||||
} else {
|
var html = '';
|
||||||
if (typeof data.id === 'undefined') {
|
if (data.type == 'menu') {
|
||||||
return '';
|
html += '<a href="' + data.url + '"><div class="search-suggestion">';
|
||||||
|
html += '<span class="fa fa-' + data.icon + '"></span>' + data.text + '</div></a>';
|
||||||
|
} else {
|
||||||
|
if (typeof data.id === 'undefined') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
html += '<div class="search-suggestion">';
|
||||||
|
html += '<div class="search-suggestion-item">' + data.text + ' <span class="badge badge-pill badge-light">' + data.type + '</span></div>';
|
||||||
|
html += '<div class="search-suggestion-options">';
|
||||||
|
html += '<a target="_blank" href="' + DOMAIN_PAGES + data.id + '"><?php $L->p('view') ?></a>';
|
||||||
|
html += '<a class="ml-2" href="' + DOMAIN_ADMIN + 'edit-content/' + data.id + '"><?php $L->p('edit') ?></a>';
|
||||||
|
html += '</div></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return html;
|
||||||
|
},
|
||||||
|
escapeMarkup: function(markup) {
|
||||||
|
return markup;
|
||||||
}
|
}
|
||||||
html += '<div class="search-suggestion">';
|
}).on("select2:closing", function(e) {
|
||||||
html += '<div class="search-suggestion-item">'+data.text+' <span class="badge badge-pill badge-light">'+data.type+'</span></div>';
|
e.preventDefault();
|
||||||
html += '<div class="search-suggestion-options">';
|
}).on("select2:closed", function(e) {
|
||||||
html += '<a target="_blank" href="'+DOMAIN_PAGES+data.id+'"><?php $L->p('view') ?></a>';
|
clippy.select2("open");
|
||||||
html += '<a class="ml-2" href="'+DOMAIN_ADMIN+'edit-content/'+data.id+'"><?php $L->p('edit') ?></a>';
|
});
|
||||||
html += '</div></div>';
|
clippy.select2("open");
|
||||||
}
|
|
||||||
|
|
||||||
return html;
|
});
|
||||||
},
|
</script>
|
||||||
escapeMarkup: function(markup) {
|
|
||||||
return markup;
|
|
||||||
}
|
|
||||||
}).on("select2:closing", function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
}).on("select2:closed", function(e) {
|
|
||||||
clippy.select2("open");
|
|
||||||
});
|
|
||||||
clippy.select2("open");
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
<div class="container border-top pt-4 mt-4">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<a class="quick-links text-center" target="_blank" href="https://docs.bludit.com">
|
|
||||||
<div class="fa fa-compass quick-links-icons"></div>
|
|
||||||
<div><?php $L->p('Documentation') ?></div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col border-left border-right">
|
|
||||||
<a class="quick-links text-center" target="_blank" href="https://forum.bludit.org">
|
|
||||||
<div class="fa fa-support quick-links-icons"></div>
|
|
||||||
<div><?php $L->p('Forum support') ?></div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<a class="quick-links text-center" target="_blank" href="https://discord.gg/CFaXEdZWds">
|
|
||||||
<div class="fa fa-comments quick-links-icons"></div>
|
|
||||||
<div><?php $L->p('Chat support') ?></div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<a class="quick-links text-center" target="_blank" href="https://themes.bludit.com">
|
|
||||||
<div class="fa fa-desktop quick-links-icons"></div>
|
|
||||||
<div><?php $L->p('Themes') ?></div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col border-left border-right">
|
|
||||||
<a class="quick-links text-center" target="_blank" href="https://plugins.bludit.com">
|
|
||||||
<div class="fa fa-puzzle-piece quick-links-icons"></div>
|
|
||||||
<div><?php $L->p('Plugins') ?></div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<a class="quick-links text-center" target="_blank" href="https://github.com/bludit/bludit">
|
|
||||||
<div class="fa fa-github quick-links-icons"></div>
|
|
||||||
<div><?php $L->p('GitHub') ?></div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php Theme::plugins('dashboard') ?>
|
<?php Theme::plugins('dashboard') ?>
|
||||||
@ -152,23 +114,25 @@
|
|||||||
|
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<ul class="list-group list-group-striped b-0">
|
<ul class="list-group list-group-striped b-0">
|
||||||
<li class="list-group-item pt-0"><h4 class="m-0"><?php $L->p('Notifications') ?></h4></li>
|
<li class="list-group-item pt-0">
|
||||||
<?php
|
<h4 class="m-0"><?php $L->p('Notifications') ?></h4>
|
||||||
$logs = array_slice($syslog->db, 0, NOTIFICATIONS_AMOUNT);
|
</li>
|
||||||
foreach ($logs as $log) {
|
<?php
|
||||||
$phrase = $L->g($log['dictionaryKey']);
|
$logs = array_slice($syslog->db, 0, NOTIFICATIONS_AMOUNT);
|
||||||
echo '<li class="list-group-item">';
|
foreach ($logs as $log) {
|
||||||
echo $phrase;
|
$phrase = $L->g($log['dictionaryKey']);
|
||||||
if (!empty($log['notes'])) {
|
echo '<li class="list-group-item">';
|
||||||
echo ' « <b>'.$log['notes'].'</b> »';
|
echo $phrase;
|
||||||
|
if (!empty($log['notes'])) {
|
||||||
|
echo ' « <b>' . $log['notes'] . '</b> »';
|
||||||
|
}
|
||||||
|
echo '<br><span class="notification-date"><small>';
|
||||||
|
echo Date::format($log['date'], DB_DATE_FORMAT, NOTIFICATIONS_DATE_FORMAT);
|
||||||
|
echo ' [ ' . $log['username'] . ' ]';
|
||||||
|
echo '</small></span>';
|
||||||
|
echo '</li>';
|
||||||
}
|
}
|
||||||
echo '<br><span class="notification-date"><small>';
|
?>
|
||||||
echo Date::format($log['date'], DB_DATE_FORMAT, NOTIFICATIONS_DATE_FORMAT);
|
|
||||||
echo ' [ '.$log['username'] .' ]';
|
|
||||||
echo '</small></span>';
|
|
||||||
echo '</li>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
echo '<h1 class="text-center mb-5 mt-5 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>';
|
||||||
|
|
||||||
echo Bootstrap::formOpen(array());
|
echo Bootstrap::formOpen(array());
|
||||||
|
|
||||||
@ -34,6 +34,5 @@ echo Bootstrap::formOpen(array());
|
|||||||
|
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
echo '<p class="mt-5 text-right">'.$L->g('Powered by Bludit').((defined('BLUDIT_PRO'))?' PRO':'').'</p>'
|
echo '<p class="mt-3 text-right">'.$L->g('Powered by Bludit').((defined('BLUDIT_PRO'))?' PRO':'').'</p>'
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,39 +1,39 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece'));
|
echo Bootstrap::pageTitle(array('title' => $L->g('Plugins'), 'icon' => 'puzzle-piece'));
|
||||||
|
|
||||||
echo Bootstrap::link(array(
|
echo Bootstrap::link(array(
|
||||||
'title'=>$L->g('Change the position of the plugins'),
|
'title' => $L->g('Change the position of the plugins'),
|
||||||
'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position',
|
'href' => HTML_PATH_ADMIN_ROOT . 'plugins-position',
|
||||||
'icon'=>'arrows'
|
'icon' => 'arrows'
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Search plugins')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Search plugins')));
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<input type="text" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
|
<input type="text" class="form-control" id="search" placeholder="<?php $L->p('Search') ?>">
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#search").on("keyup", function() {
|
$("#search").on("keyup", function() {
|
||||||
var textToSearch = $(this).val().toLowerCase();
|
var textToSearch = $(this).val().toLowerCase();
|
||||||
$(".searchItem").each( function() {
|
$(".searchItem").each(function() {
|
||||||
var item = $(this);
|
var item = $(this);
|
||||||
item.hide();
|
item.hide();
|
||||||
item.find(".searchText").each( function() {
|
item.find(".searchText").each(function() {
|
||||||
var element = $(this).text().toLowerCase();
|
var element = $(this).text().toLowerCase();
|
||||||
if (element.indexOf(textToSearch)!=-1) {
|
if (element.indexOf(textToSearch) != -1) {
|
||||||
item.show();
|
item.show();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Enabled plugins')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Enabled plugins')));
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -42,28 +42,34 @@ echo '
|
|||||||
|
|
||||||
// Show installed plugins
|
// Show installed plugins
|
||||||
foreach ($pluginsInstalled as $plugin) {
|
foreach ($pluginsInstalled as $plugin) {
|
||||||
echo '<tr id="'.$plugin->className().'" class="bg-light searchItem">';
|
|
||||||
|
if ($plugin->type() == 'theme') {
|
||||||
|
// Do not display theme's plugins
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<tr id="' . $plugin->className() . '" class="bg-light searchItem">';
|
||||||
|
|
||||||
echo '<td class="align-middle pt-3 pb-3 w-25">
|
echo '<td class="align-middle pt-3 pb-3 w-25">
|
||||||
<div class="searchText">'.$plugin->name().'</div>
|
<div class="searchText">' . $plugin->name() . '</div>
|
||||||
<div class="mt-1">';
|
<div class="mt-1">';
|
||||||
if (method_exists($plugin, 'form')) {
|
if (method_exists($plugin, 'form')) {
|
||||||
echo '<a class="mr-3" href="'.HTML_PATH_ADMIN_ROOT.'configure-plugin/'.$plugin->className().'">'.$L->g('Settings').'</a>';
|
echo '<a class="mr-3" href="' . HTML_PATH_ADMIN_ROOT . 'configure-plugin/' . $plugin->className() . '">' . $L->g('Settings') . '</a>';
|
||||||
}
|
}
|
||||||
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'uninstall-plugin/'.$plugin->className().'">'.$L->g('Deactivate').'</a>';
|
echo '<a href="' . HTML_PATH_ADMIN_ROOT . 'uninstall-plugin/' . $plugin->className() . '">' . $L->g('Deactivate') . '</a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
||||||
echo $plugin->description();
|
echo $plugin->description();
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
||||||
echo '<span>'.$plugin->version().'</span>';
|
echo '<span>' . $plugin->version() . '</span>';
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
||||||
<a target="_blank" href="'.$plugin->website().'">'.$plugin->author().'</a>
|
<a target="_blank" href="' . $plugin->website() . '">' . $plugin->author() . '</a>
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
@ -74,7 +80,7 @@ echo '
|
|||||||
</table>
|
</table>
|
||||||
';
|
';
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Disabled plugins')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Disabled plugins')));
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<table class="table">
|
<table class="table">
|
||||||
@ -84,25 +90,30 @@ echo '
|
|||||||
// Plugins not installed
|
// Plugins not installed
|
||||||
$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled);
|
$pluginsNotInstalled = array_diff_key($plugins['all'], $pluginsInstalled);
|
||||||
foreach ($pluginsNotInstalled as $plugin) {
|
foreach ($pluginsNotInstalled as $plugin) {
|
||||||
echo '<tr id="'.$plugin->className().'" class="searchItem">';
|
|
||||||
|
if ($plugin->type() == 'theme') {
|
||||||
|
// Do not display theme's plugins
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
echo '<tr id="' . $plugin->className() . '" class="searchItem">';
|
||||||
|
|
||||||
echo '<td class="align-middle pt-3 pb-3 w-25">
|
echo '<td class="align-middle pt-3 pb-3 w-25">
|
||||||
<div class="searchText">'.$plugin->name().'</div>
|
<div class="searchText">' . $plugin->name() . '</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<a href="'.HTML_PATH_ADMIN_ROOT.'install-plugin/'.$plugin->className().'">'.$L->g('Activate').'</a>
|
<a href="' . HTML_PATH_ADMIN_ROOT . 'install-plugin/' . $plugin->className() . '">' . $L->g('Activate') . '</a>
|
||||||
</div>
|
</div>
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
echo '<td class="searchText align-middle d-none d-sm-table-cell">';
|
||||||
echo $plugin->description();
|
echo $plugin->description();
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
||||||
echo '<span>'.$plugin->version().'</span>';
|
echo '<span>' . $plugin->version() . '</span>';
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
||||||
<a target="_blank" href="'.$plugin->website().'">'.$plugin->author().'</a>
|
<a target="_blank" href="' . $plugin->website() . '">' . $plugin->author() . '</a>
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
@ -111,4 +122,4 @@ foreach ($pluginsNotInstalled as $plugin) {
|
|||||||
echo '
|
echo '
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
';
|
';
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?php defined('BLUDIT') or die('Bludit 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')); ?>
|
||||||
|
|
||||||
<div class="align-middle">
|
<div class="align-middle">
|
||||||
<div class="float-right mt-1">
|
<div class="float-right mt-1">
|
||||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT . 'dashboard' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||||
</div>
|
</div>
|
||||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Settings'), 'icon'=>'cog')); ?>
|
<?php echo Bootstrap::pageTitle(array('title' => $L->g('Settings'), 'icon' => 'cog')); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- TABS -->
|
<!-- TABS -->
|
||||||
@ -25,103 +25,103 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Token CSRF
|
// Token CSRF
|
||||||
echo Bootstrap::formInputHidden(array(
|
echo Bootstrap::formInputHidden(array(
|
||||||
'name'=>'tokenCSRF',
|
'name' => 'tokenCSRF',
|
||||||
'value'=>$security->getTokenCSRF()
|
'value' => $security->getTokenCSRF()
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- General tab -->
|
<!-- General tab -->
|
||||||
<div class="tab-pane fade show active" id="general" role="tabpanel" aria-labelledby="general-tab">
|
<div class="tab-pane fade show active" id="general" role="tabpanel" aria-labelledby="general-tab">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Site')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Site')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'title',
|
'name' => 'title',
|
||||||
'label'=>$L->g('Site title'),
|
'label' => $L->g('Site title'),
|
||||||
'value'=>$site->title(),
|
'value' => $site->title(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('use-this-field-to-name-your-site')
|
'tip' => $L->g('use-this-field-to-name-your-site')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'slogan',
|
'name' => 'slogan',
|
||||||
'label'=>$L->g('Site slogan'),
|
'label' => $L->g('Site slogan'),
|
||||||
'value'=>$site->slogan(),
|
'value' => $site->slogan(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('use-this-field-to-add-a-catchy-phrase')
|
'tip' => $L->g('use-this-field-to-add-a-catchy-phrase')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'description',
|
'name' => 'description',
|
||||||
'label'=>$L->g('Site description'),
|
'label' => $L->g('Site description'),
|
||||||
'value'=>$site->description(),
|
'value' => $site->description(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('you-can-add-a-site-description-to-provide')
|
'tip' => $L->g('you-can-add-a-site-description-to-provide')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'footer',
|
'name' => 'footer',
|
||||||
'label'=>$L->g('Footer text'),
|
'label' => $L->g('Footer text'),
|
||||||
'value'=>$site->footer(),
|
'value' => $site->footer(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('you-can-add-a-small-text-on-the-bottom')
|
'tip' => $L->g('you-can-add-a-small-text-on-the-bottom')
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Advanced tab -->
|
<!-- Advanced tab -->
|
||||||
<div class="tab-pane fade" id="advanced" role="tabpanel" aria-labelledby="advanced-tab">
|
<div class="tab-pane fade" id="advanced" role="tabpanel" aria-labelledby="advanced-tab">
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Content')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Content')));
|
||||||
|
|
||||||
echo Bootstrap::formSelect(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'itemsPerPage',
|
'name' => 'itemsPerPage',
|
||||||
'label'=>$L->g('Items per page'),
|
'label' => $L->g('Items per page'),
|
||||||
'options'=>array('1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8', '-1'=>$L->g('All content')),
|
'value' => $site->itemsPerPage(),
|
||||||
'selected'=>$site->itemsPerPage(),
|
'class' => '',
|
||||||
'class'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Number of items to show per page')
|
'tip' => $L->g('Number of items to show per page')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formSelect(array(
|
echo Bootstrap::formSelect(array(
|
||||||
'name'=>'orderBy',
|
'name' => 'orderBy',
|
||||||
'label'=>$L->g('Order content by'),
|
'label' => $L->g('Order content by'),
|
||||||
'options'=>array('date'=>$L->g('Date'),'position'=>$L->g('Position')),
|
'options' => array('date' => $L->g('Date'), 'position' => $L->g('Position')),
|
||||||
'selected'=>$site->orderBy(),
|
'selected' => $site->orderBy(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'tip'=>$L->g('order-the-content-by-date-to-build-a-blog')
|
'tip' => $L->g('order-the-content-by-date-to-build-a-blog')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Predefined pages')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Predefined pages')));
|
||||||
|
|
||||||
// Homepage
|
// Homepage
|
||||||
try {
|
try {
|
||||||
$options = array();
|
$options = array();
|
||||||
$homeKey = $site->homepage();
|
$homeKey = $site->homepage();
|
||||||
if (!empty($homeKey)) {
|
if (!empty($homeKey)) {
|
||||||
$home = new Page($homeKey);
|
$home = new Page($homeKey);
|
||||||
$options = array($homeKey=>$home->title());
|
$options = array($homeKey => $home->title());
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
// continue
|
|
||||||
}
|
}
|
||||||
echo Bootstrap::formSelect(array(
|
} catch (Exception $e) {
|
||||||
'name'=>'homepage',
|
// continue
|
||||||
'label'=>$L->g('Homepage'),
|
}
|
||||||
'options'=>$options,
|
echo Bootstrap::formSelect(array(
|
||||||
'selected'=>false,
|
'name' => 'homepage',
|
||||||
'class'=>'',
|
'label' => $L->g('Homepage'),
|
||||||
'tip'=>$L->g('Returning page for the main page')
|
'options' => $options,
|
||||||
));
|
'selected' => false,
|
||||||
|
'class' => '',
|
||||||
|
'tip' => $L->g('Returning page for the main page')
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var homepage = $("#jshomepage").select2({
|
var homepage = $("#jshomepage").select2({
|
||||||
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
|
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
|
||||||
@ -129,12 +129,14 @@
|
|||||||
theme: "bootstrap4",
|
theme: "bootstrap4",
|
||||||
minimumInputLength: 2,
|
minimumInputLength: 2,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
|
url: HTML_PATH_ADMIN_ROOT + "ajax/get-published",
|
||||||
data: function (params) {
|
data: function(params) {
|
||||||
var query = { query: params.term }
|
var query = {
|
||||||
|
query: params.term
|
||||||
|
}
|
||||||
return query;
|
return query;
|
||||||
},
|
},
|
||||||
processResults: function (data) {
|
processResults: function(data) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -143,31 +145,31 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Page not found 404
|
// Page not found 404
|
||||||
try {
|
try {
|
||||||
$options = array();
|
$options = array();
|
||||||
$pageNotFoundKey = $site->pageNotFound();
|
$pageNotFoundKey = $site->pageNotFound();
|
||||||
if (!empty($pageNotFoundKey)) {
|
if (!empty($pageNotFoundKey)) {
|
||||||
$pageNotFound = new Page($pageNotFoundKey);
|
$pageNotFound = new Page($pageNotFoundKey);
|
||||||
$options = array($pageNotFoundKey=>$pageNotFound->title());
|
$options = array($pageNotFoundKey => $pageNotFound->title());
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
|
||||||
// continue
|
|
||||||
}
|
}
|
||||||
echo Bootstrap::formSelect(array(
|
} catch (Exception $e) {
|
||||||
'name'=>'pageNotFound',
|
// continue
|
||||||
'label'=>$L->g('Page not found'),
|
}
|
||||||
'options'=>$options,
|
echo Bootstrap::formSelect(array(
|
||||||
'selected'=>false,
|
'name' => 'pageNotFound',
|
||||||
'class'=>'',
|
'label' => $L->g('Page not found'),
|
||||||
'tip'=>$L->g('Returning page when the page doesnt exist')
|
'options' => $options,
|
||||||
));
|
'selected' => false,
|
||||||
|
'class' => '',
|
||||||
|
'tip' => $L->g('Returning page when the page doesnt exist')
|
||||||
|
));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var homepage = $("#jspageNotFound").select2({
|
var homepage = $("#jspageNotFound").select2({
|
||||||
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
|
placeholder: "<?php $L->p('Start typing to see a list of suggestions.') ?>",
|
||||||
@ -175,12 +177,14 @@
|
|||||||
theme: "bootstrap4",
|
theme: "bootstrap4",
|
||||||
minimumInputLength: 2,
|
minimumInputLength: 2,
|
||||||
ajax: {
|
ajax: {
|
||||||
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
|
url: HTML_PATH_ADMIN_ROOT + "ajax/get-published",
|
||||||
data: function (params) {
|
data: function(params) {
|
||||||
var query = { query: params.term }
|
var query = {
|
||||||
|
query: params.term
|
||||||
|
}
|
||||||
return query;
|
return query;
|
||||||
},
|
},
|
||||||
processResults: function (data) {
|
processResults: function(data) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -189,377 +193,377 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Email account settings')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Email account settings')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'emailFrom',
|
'name' => 'emailFrom',
|
||||||
'label'=>$L->g('Sender email'),
|
'label' => $L->g('Sender email'),
|
||||||
'value'=>$site->emailFrom(),
|
'value' => $site->emailFrom(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Emails will be sent from this address')
|
'tip' => $L->g('Emails will be sent from this address')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Autosave')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Autosave')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'autosaveInterval',
|
'name' => 'autosaveInterval',
|
||||||
'label'=>$L->g('Interval'),
|
'label' => $L->g('Interval'),
|
||||||
'value'=>$site->autosaveInterval(),
|
'value' => $site->autosaveInterval(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Number in minutes for every execution of autosave')
|
'tip' => $L->g('Number in minutes for every execution of autosave')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Site URL')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Site URL')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'url',
|
'name' => 'url',
|
||||||
'label'=>'URL',
|
'label' => 'URL',
|
||||||
'value'=>$site->url(),
|
'value' => $site->url(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('full-url-of-your-site'),
|
'tip' => $L->g('full-url-of-your-site'),
|
||||||
'placeholder'=>'https://'
|
'placeholder' => 'https://'
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Page content')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Page content')));
|
||||||
|
|
||||||
echo Bootstrap::formSelect(array(
|
echo Bootstrap::formSelect(array(
|
||||||
'name'=>'markdownParser',
|
'name' => 'markdownParser',
|
||||||
'label'=>$L->g('Markdown parser'),
|
'label' => $L->g('Markdown parser'),
|
||||||
'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
|
'options' => array('true' => $L->g('Enabled'), 'false' => $L->g('Disabled')),
|
||||||
'selected'=>($site->markdownParser()?'true':'false'),
|
'selected' => ($site->markdownParser() ? 'true' : 'false'),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'tip'=>$L->g('Enable the markdown parser for the content of the page.')
|
'tip' => $L->g('Enable the markdown parser for the content of the page.')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('URL Filters')));
|
echo Bootstrap::formTitle(array('title' => $L->g('URL Filters')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'uriPage',
|
'name' => 'uriPage',
|
||||||
'label'=>$L->g('Pages'),
|
'label' => $L->g('Pages'),
|
||||||
'value'=>$site->uriFilters('page'),
|
'value' => $site->uriFilters('page'),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>DOMAIN_PAGES
|
'tip' => DOMAIN_PAGES
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'uriTag',
|
'name' => 'uriTag',
|
||||||
'label'=>$L->g('Tags'),
|
'label' => $L->g('Tags'),
|
||||||
'value'=>$site->uriFilters('tag'),
|
'value' => $site->uriFilters('tag'),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>DOMAIN_TAGS
|
'tip' => DOMAIN_TAGS
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'uriCategory',
|
'name' => 'uriCategory',
|
||||||
'label'=>$L->g('Category'),
|
'label' => $L->g('Category'),
|
||||||
'value'=>$site->uriFilters('category'),
|
'value' => $site->uriFilters('category'),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>DOMAIN_CATEGORIES
|
'tip' => DOMAIN_CATEGORIES
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'uriBlog',
|
'name' => 'uriBlog',
|
||||||
'label'=>$L->g('Blog'),
|
'label' => $L->g('Blog'),
|
||||||
'value'=>$site->uriFilters('blog'),
|
'value' => $site->uriFilters('blog'),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>DOMAIN.$site->uriFilters('blog'),
|
'tip' => DOMAIN . $site->uriFilters('blog'),
|
||||||
'disabled'=>Text::isEmpty($site->uriFilters('blog'))
|
'disabled' => Text::isEmpty($site->uriFilters('blog'))
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- SEO tab -->
|
<!-- SEO tab -->
|
||||||
<div class="tab-pane fade" id="seo" role="tabpanel" aria-labelledby="seo-tab">
|
<div class="tab-pane fade" id="seo" role="tabpanel" aria-labelledby="seo-tab">
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Extreme friendly URL')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Extreme friendly URL')));
|
||||||
|
|
||||||
echo Bootstrap::formSelect(array(
|
echo Bootstrap::formSelect(array(
|
||||||
'name'=>'extremeFriendly',
|
'name' => 'extremeFriendly',
|
||||||
'label'=>$L->g('Allow Unicode'),
|
'label' => $L->g('Allow Unicode'),
|
||||||
'options'=>array('true'=>$L->g('Enabled'), 'false'=>$L->g('Disabled')),
|
'options' => array('true' => $L->g('Enabled'), 'false' => $L->g('Disabled')),
|
||||||
'selected'=>($site->extremeFriendly()?'true':'false'),
|
'selected' => ($site->extremeFriendly() ? 'true' : 'false'),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'tip'=>$L->g('Allow unicode characters in the URL and some part of the system.')
|
'tip' => $L->g('Allow unicode characters in the URL and some part of the system.')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Title formats')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Title formats')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'titleFormatHomepage',
|
'name' => 'titleFormatHomepage',
|
||||||
'label'=>$L->g('Homepage'),
|
'label' => $L->g('Homepage'),
|
||||||
'value'=>$site->titleFormatHomepage(),
|
'value' => $site->titleFormatHomepage(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Variables allowed').' <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
'tip' => $L->g('Variables allowed') . ' <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
||||||
'placeholder'=>''
|
'placeholder' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'titleFormatPages',
|
'name' => 'titleFormatPages',
|
||||||
'label'=>$L->g('Pages'),
|
'label' => $L->g('Pages'),
|
||||||
'value'=>$site->titleFormatPages(),
|
'value' => $site->titleFormatPages(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Variables allowed').' <code>{{page-title}}</code> <code>{{page-description}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
'tip' => $L->g('Variables allowed') . ' <code>{{page-title}}</code> <code>{{page-description}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
||||||
'placeholder'=>''
|
'placeholder' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'titleFormatCategory',
|
'name' => 'titleFormatCategory',
|
||||||
'label'=>$L->g('Category'),
|
'label' => $L->g('Category'),
|
||||||
'value'=>$site->titleFormatCategory(),
|
'value' => $site->titleFormatCategory(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Variables allowed').' <code>{{category-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
'tip' => $L->g('Variables allowed') . ' <code>{{category-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
||||||
'placeholder'=>''
|
'placeholder' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'titleFormatTag',
|
'name' => 'titleFormatTag',
|
||||||
'label'=>$L->g('Tag'),
|
'label' => $L->g('Tag'),
|
||||||
'value'=>$site->titleFormatTag(),
|
'value' => $site->titleFormatTag(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Variables allowed').' <code>{{tag-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
'tip' => $L->g('Variables allowed') . ' <code>{{tag-name}}</code> <code>{{site-title}}</code> <code>{{site-slogan}}</code> <code>{{site-description}}</code>',
|
||||||
'placeholder'=>''
|
'placeholder' => ''
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Social Network tab -->
|
<!-- Social Network tab -->
|
||||||
<div class="tab-pane fade" id="social" role="tabpanel" aria-labelledby="social-tab">
|
<div class="tab-pane fade" id="social" role="tabpanel" aria-labelledby="social-tab">
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'twitter',
|
'name' => 'twitter',
|
||||||
'label'=>'Twitter',
|
'label' => 'Twitter',
|
||||||
'value'=>$site->twitter(),
|
'value' => $site->twitter(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'facebook',
|
'name' => 'facebook',
|
||||||
'label'=>'Facebook',
|
'label' => 'Facebook',
|
||||||
'value'=>$site->facebook(),
|
'value' => $site->facebook(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'codepen',
|
'name' => 'codepen',
|
||||||
'label'=>'CodePen',
|
'label' => 'CodePen',
|
||||||
'value'=>$site->codepen(),
|
'value' => $site->codepen(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'instagram',
|
'name' => 'instagram',
|
||||||
'label'=>'Instagram',
|
'label' => 'Instagram',
|
||||||
'value'=>$site->instagram(),
|
'value' => $site->instagram(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'gitlab',
|
'name' => 'gitlab',
|
||||||
'label'=>'GitLab',
|
'label' => 'GitLab',
|
||||||
'value'=>$site->gitlab(),
|
'value' => $site->gitlab(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'github',
|
'name' => 'github',
|
||||||
'label'=>'GitHub',
|
'label' => 'GitHub',
|
||||||
'value'=>$site->github(),
|
'value' => $site->github(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'linkedin',
|
'name' => 'linkedin',
|
||||||
'label'=>'LinkedIn',
|
'label' => 'LinkedIn',
|
||||||
'value'=>$site->linkedin(),
|
'value' => $site->linkedin(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'xing',
|
'name' => 'xing',
|
||||||
'label'=>'Xing',
|
'label' => 'Xing',
|
||||||
'value'=>$site->xing(),
|
'value' => $site->xing(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'mastodon',
|
'name' => 'mastodon',
|
||||||
'label'=>'Mastodon',
|
'label' => 'Mastodon',
|
||||||
'value'=>$site->mastodon(),
|
'value' => $site->mastodon(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'dribbble',
|
'name' => 'dribbble',
|
||||||
'label'=>'Dribbble',
|
'label' => 'Dribbble',
|
||||||
'value'=>$site->dribbble(),
|
'value' => $site->dribbble(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'vk',
|
'name' => 'vk',
|
||||||
'label'=>'VK',
|
'label' => 'VK',
|
||||||
'value'=>$site->vk(),
|
'value' => $site->vk(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>''
|
'tip' => ''
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Images tab -->
|
<!-- Images tab -->
|
||||||
<div class="tab-pane fade" id="images" role="tabpanel" aria-labelledby="images-tab">
|
<div class="tab-pane fade" id="images" role="tabpanel" aria-labelledby="images-tab">
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Thumbnails')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Thumbnails')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'thumbnailWidth',
|
'name' => 'thumbnailWidth',
|
||||||
'label'=>$L->g('Width'),
|
'label' => $L->g('Width'),
|
||||||
'value'=>$site->thumbnailWidth(),
|
'value' => $site->thumbnailWidth(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Thumbnail width in pixels')
|
'tip' => $L->g('Thumbnail width in pixels')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'thumbnailHeight',
|
'name' => 'thumbnailHeight',
|
||||||
'label'=>$L->g('Height'),
|
'label' => $L->g('Height'),
|
||||||
'value'=>$site->thumbnailHeight(),
|
'value' => $site->thumbnailHeight(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Thumbnail height in pixels')
|
'tip' => $L->g('Thumbnail height in pixels')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'thumbnailQuality',
|
'name' => 'thumbnailQuality',
|
||||||
'label'=>$L->g('Quality'),
|
'label' => $L->g('Quality'),
|
||||||
'value'=>$site->thumbnailQuality(),
|
'value' => $site->thumbnailQuality(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Thumbnail quality in percentage')
|
'tip' => $L->g('Thumbnail quality in percentage')
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Timezone and language tab -->
|
<!-- Timezone and language tab -->
|
||||||
<div class="tab-pane fade" id="language" role="tabpanel" aria-labelledby="language-tab">
|
<div class="tab-pane fade" id="language" role="tabpanel" aria-labelledby="language-tab">
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Language and timezone')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Language and timezone')));
|
||||||
|
|
||||||
echo Bootstrap::formSelect(array(
|
echo Bootstrap::formSelect(array(
|
||||||
'name'=>'language',
|
'name' => 'language',
|
||||||
'label'=>$L->g('Language'),
|
'label' => $L->g('Language'),
|
||||||
'options'=>$L->getLanguageList(),
|
'options' => $L->getLanguageList(),
|
||||||
'selected'=>$site->language(),
|
'selected' => $site->language(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'tip'=>$L->g('select-your-sites-language')
|
'tip' => $L->g('select-your-sites-language')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formSelect(array(
|
echo Bootstrap::formSelect(array(
|
||||||
'name'=>'timezone',
|
'name' => 'timezone',
|
||||||
'label'=>$L->g('Timezone'),
|
'label' => $L->g('Timezone'),
|
||||||
'options'=>Date::timezoneList(),
|
'options' => Date::timezoneList(),
|
||||||
'selected'=>$site->timezone(),
|
'selected' => $site->timezone(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'tip'=>$L->g('select-a-timezone-for-a-correct')
|
'tip' => $L->g('select-a-timezone-for-a-correct')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'locale',
|
'name' => 'locale',
|
||||||
'label'=>$L->g('Locale'),
|
'label' => $L->g('Locale'),
|
||||||
'value'=>$site->locale(),
|
'value' => $site->locale(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('with-the-locales-you-can-set-the-regional-user-interface')
|
'tip' => $L->g('with-the-locales-you-can-set-the-regional-user-interface')
|
||||||
));
|
));
|
||||||
|
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Date and time formats')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Date and time formats')));
|
||||||
|
|
||||||
echo Bootstrap::formInputText(array(
|
echo Bootstrap::formInputText(array(
|
||||||
'name'=>'dateFormat',
|
'name' => 'dateFormat',
|
||||||
'label'=>$L->g('Date format'),
|
'label' => $L->g('Date format'),
|
||||||
'value'=>$site->dateFormat(),
|
'value' => $site->dateFormat(),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('Current format').': '.Date::current($site->dateFormat())
|
'tip' => $L->g('Current format') . ': ' . Date::current($site->dateFormat())
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Custom fields -->
|
<!-- Custom fields -->
|
||||||
<div class="tab-pane fade" id="custom-fields" role="tabpanel" aria-labelledby="custom-fields-tab">
|
<div class="tab-pane fade" id="custom-fields" role="tabpanel" aria-labelledby="custom-fields-tab">
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Custom fields')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Custom fields')));
|
||||||
|
|
||||||
echo Bootstrap::formTextarea(array(
|
echo Bootstrap::formTextarea(array(
|
||||||
'name'=>'customFields',
|
'name' => 'customFields',
|
||||||
'label'=>'JSON Format',
|
'label' => 'JSON Format',
|
||||||
'value'=>json_encode($site->customFields(), JSON_PRETTY_PRINT),
|
'value' => json_encode($site->customFields(), JSON_PRETTY_PRINT),
|
||||||
'class'=>'',
|
'class' => '',
|
||||||
'placeholder'=>'',
|
'placeholder' => '',
|
||||||
'tip'=>$L->g('define-custom-fields-for-the-content'),
|
'tip' => $L->g('define-custom-fields-for-the-content'),
|
||||||
'rows'=>15
|
'rows' => 15
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Site logo tab -->
|
<!-- Site logo tab -->
|
||||||
<div class="tab-pane fade" id="logo" role="tabpanel" aria-labelledby="logo-tab">
|
<div class="tab-pane fade" id="logo" role="tabpanel" aria-labelledby="logo-tab">
|
||||||
<?php
|
<?php
|
||||||
echo Bootstrap::formTitle(array('title'=>$L->g('Site logo')));
|
echo Bootstrap::formTitle(array('title' => $L->g('Site logo')));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4 col-sm-12 p-0 pr-2">
|
<div class="col-lg-4 col-sm-12 p-0 pr-2">
|
||||||
<div class="custom-file">
|
<div class="custom-file">
|
||||||
<input id="jssiteLogoInputFile" class="custom-file-input" type="file" name="inputFile">
|
<input id="jssiteLogoInputFile" class="custom-file-input" type="file" name="inputFile">
|
||||||
<label for="jssiteLogoInputFile" class="custom-file-label"><?php $L->p('Upload image'); ?></label>
|
<label for="jssiteLogoInputFile" class="custom-file-label"><?php $L->p('Upload image'); ?></label>
|
||||||
</div>
|
|
||||||
<button id="jsbuttonRemoveLogo" type="button" class="btn btn-primary w-100 mt-4 mb-4"><i class="fa fa-trash"></i><?php $L->p('Remove logo') ?></button>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-8 col-sm-12 p-0 text-center">
|
|
||||||
<img id="jssiteLogoPreview" class="img-fluid img-thumbnail" alt="Site logo preview" src="<?php echo ($site->logo()?DOMAIN_UPLOADS.$site->logo(false).'?version='.time():HTML_PATH_CORE_IMG.'default.svg') ?>" />
|
|
||||||
</div>
|
</div>
|
||||||
|
<button id="jsbuttonRemoveLogo" type="button" class="btn btn-primary w-100 mt-4 mb-4"><i class="fa fa-trash"></i><?php $L->p('Remove logo') ?></button>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-8 col-sm-12 p-0 text-center">
|
||||||
|
<img id="jssiteLogoPreview" class="img-fluid img-thumbnail" alt="Site logo preview" src="<?php echo ($site->logo() ? DOMAIN_UPLOADS . $site->logo(false) . '?version=' . time() : HTML_PATH_CORE_IMG . 'default.svg') ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
</div>
|
||||||
|
<script>
|
||||||
$("#jsbuttonRemoveLogo").on("click", function() {
|
$("#jsbuttonRemoveLogo").on("click", function() {
|
||||||
bluditAjax.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' ?>");
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#jssiteLogoInputFile").on("change", function() {
|
$("#jssiteLogoInputFile").on("change", function() {
|
||||||
@ -567,22 +571,22 @@
|
|||||||
formData.append('tokenCSRF', tokenCSRF);
|
formData.append('tokenCSRF', tokenCSRF);
|
||||||
formData.append('inputFile', $(this)[0].files[0]);
|
formData.append('inputFile', $(this)[0].files[0]);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: HTML_PATH_ADMIN_ROOT+"ajax/logo-upload",
|
url: HTML_PATH_ADMIN_ROOT + "ajax/logo-upload",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
data: formData,
|
data: formData,
|
||||||
cache: false,
|
cache: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
processData: false
|
processData: false
|
||||||
}).done(function(data) {
|
}).done(function(data) {
|
||||||
if (data.status==0) {
|
if (data.status == 0) {
|
||||||
$("#jssiteLogoPreview").attr('src',data.absoluteURL+"?time="+Math.random());
|
$("#jssiteLogoPreview").attr('src', data.absoluteURL + "?time=" + Math.random());
|
||||||
} else {
|
} else {
|
||||||
showAlert(data.message);
|
showAlert(data.message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php echo Bootstrap::formClose(); ?>
|
<?php echo Bootstrap::formClose(); ?>
|
||||||
|
|
||||||
|
@ -1,53 +1,57 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Themes'), 'icon'=>'desktop'));
|
echo Bootstrap::pageTitle(array('title' => $L->g('Themes'), 'icon' => 'desktop'));
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<table class="table mt-3">
|
<table class="table mt-3">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="border-bottom-0 w-25" scope="col">'.$L->g('Name').'</th>
|
<th class="border-bottom-0 w-25" scope="col">' . $L->g('Name') . '</th>
|
||||||
<th class="border-bottom-0 d-none d-sm-table-cell" scope="col">'.$L->g('Description').'</th>
|
<th class="border-bottom-0 d-none d-sm-table-cell" scope="col">' . $L->g('Description') . '</th>
|
||||||
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Version').'</th>
|
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">' . $L->g('Version') . '</th>
|
||||||
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">'.$L->g('Author').'</th>
|
<th class="text-center border-bottom-0 d-none d-lg-table-cell" scope="col">' . $L->g('Author') . '</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
';
|
';
|
||||||
|
|
||||||
foreach ($themes as $theme) {
|
foreach ($themes as $theme) {
|
||||||
echo '
|
echo '
|
||||||
<tr '.($theme['dirname']==$site->theme()?'class="bg-light"':'').'>
|
<tr ' . ($theme['dirname'] == $site->theme() ? 'class="bg-light"' : '') . '>
|
||||||
<td class="align-middle pt-3 pb-3">
|
<td class="align-middle pt-3 pb-3">
|
||||||
<div>'.$theme['name'].'</div>
|
<div>'.$theme['name'].($theme['dirname']==$site->theme()?'<span class="badge badge-primary ml-2">'.$L->g('Active').'</span>':'').'</div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
';
|
';
|
||||||
|
|
||||||
if ($theme['dirname']!=$site->theme()) {
|
if ($theme['dirname'] != $site->theme()) {
|
||||||
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'install-theme/'.$theme['dirname'].'">'.$L->g('Activate').'</a>';
|
echo '<a href="' . HTML_PATH_ADMIN_ROOT . 'install-theme/' . $theme['dirname'] . '">' . $L->g('Activate') . '</a>';
|
||||||
}
|
} else {
|
||||||
|
if (isset($theme['plugin'])) {
|
||||||
|
echo '<a href="' . HTML_PATH_ADMIN_ROOT . 'configure-plugin/' . $theme['plugin'] . '">' . $L->g('Settings') . '</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
';
|
';
|
||||||
|
|
||||||
echo '<td class="align-middle d-none d-sm-table-cell">';
|
echo '<td class="align-middle d-none d-sm-table-cell">';
|
||||||
echo $theme['description'];
|
echo $theme['description'];
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">';
|
||||||
echo '<span>'.$theme['version'].'</span>';
|
echo '<span>' . $theme['version'] . '</span>';
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
|
|
||||||
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
echo '<td class="text-center align-middle d-none d-lg-table-cell">
|
||||||
<a target="_blank" href="'.$theme['website'].'">'.$theme['author'].'</a>
|
<a target="_blank" href="' . $theme['website'] . '">' . $theme['author'] . '</a>
|
||||||
</td>';
|
</td>';
|
||||||
|
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
';
|
';
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
// Bludit version
|
// Bludit version
|
||||||
define('BLUDIT_VERSION', '3.14.1');
|
define('BLUDIT_VERSION', '3.15.0');
|
||||||
define('BLUDIT_CODENAME', 'Out Of Time');
|
define('BLUDIT_CODENAME', 'Out Of Time');
|
||||||
define('BLUDIT_RELEASE_DATE', '2022-08-07');
|
define('BLUDIT_RELEASE_DATE', '2023-07-15');
|
||||||
define('BLUDIT_BUILD', '20220807');
|
define('BLUDIT_BUILD', '20220807');
|
||||||
|
|
||||||
// Change to TRUE for debugging
|
// Change to TRUE for debugging
|
||||||
@ -15,7 +15,7 @@ ini_set("display_errors", 0);
|
|||||||
|
|
||||||
// Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed.
|
// Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed.
|
||||||
// It's strongly recommended to keep display_startup_errors off, except for debugging.
|
// It's strongly recommended to keep display_startup_errors off, except for debugging.
|
||||||
ini_set('display_startup_errors',0);
|
ini_set('display_startup_errors', 0);
|
||||||
|
|
||||||
// If disabled, error message will be solely plain text instead HTML code.
|
// If disabled, error message will be solely plain text instead HTML code.
|
||||||
ini_set("html_errors", 0);
|
ini_set("html_errors", 0);
|
||||||
@ -31,47 +31,47 @@ if (DEBUG_MODE) {
|
|||||||
|
|
||||||
// PHP paths
|
// PHP paths
|
||||||
// PATH_ROOT and PATH_BOOT are defined in index.php
|
// PATH_ROOT and PATH_BOOT are defined in index.php
|
||||||
define('PATH_LANGUAGES', PATH_ROOT.'bl-languages'.DS);
|
define('PATH_LANGUAGES', PATH_ROOT . 'bl-languages' . DS);
|
||||||
define('PATH_THEMES', PATH_ROOT.'bl-themes'.DS);
|
define('PATH_THEMES', PATH_ROOT . 'bl-themes' . DS);
|
||||||
define('PATH_PLUGINS', PATH_ROOT.'bl-plugins'.DS);
|
define('PATH_PLUGINS', PATH_ROOT . 'bl-plugins' . DS);
|
||||||
define('PATH_KERNEL', PATH_ROOT.'bl-kernel'.DS);
|
define('PATH_KERNEL', PATH_ROOT . 'bl-kernel' . DS);
|
||||||
define('PATH_CONTENT', PATH_ROOT.'bl-content'.DS);
|
define('PATH_CONTENT', PATH_ROOT . 'bl-content' . DS);
|
||||||
|
|
||||||
define('PATH_ABSTRACT', PATH_KERNEL.'abstract'.DS);
|
define('PATH_ABSTRACT', PATH_KERNEL . 'abstract' . DS);
|
||||||
define('PATH_RULES', PATH_KERNEL.'boot'.DS.'rules'.DS);
|
define('PATH_RULES', PATH_KERNEL . 'boot' . DS . 'rules' . DS);
|
||||||
define('PATH_HELPERS', PATH_KERNEL.'helpers'.DS);
|
define('PATH_HELPERS', PATH_KERNEL . 'helpers' . DS);
|
||||||
define('PATH_AJAX', PATH_KERNEL.'ajax'.DS);
|
define('PATH_AJAX', PATH_KERNEL . 'ajax' . DS);
|
||||||
define('PATH_CORE_JS', PATH_KERNEL.'js'.DS);
|
define('PATH_CORE_JS', PATH_KERNEL . 'js' . DS);
|
||||||
|
|
||||||
define('PATH_PAGES', PATH_CONTENT.'pages'.DS);
|
define('PATH_PAGES', PATH_CONTENT . 'pages' . DS);
|
||||||
define('PATH_DATABASES', PATH_CONTENT.'databases'.DS);
|
define('PATH_DATABASES', PATH_CONTENT . 'databases' . DS);
|
||||||
define('PATH_PLUGINS_DATABASES', PATH_CONTENT.'databases'.DS.'plugins'.DS);
|
define('PATH_PLUGINS_DATABASES', PATH_CONTENT . 'databases' . DS . 'plugins' . DS);
|
||||||
define('PATH_TMP', PATH_CONTENT.'tmp'.DS);
|
define('PATH_TMP', PATH_CONTENT . 'tmp' . DS);
|
||||||
define('PATH_UPLOADS', PATH_CONTENT.'uploads'.DS);
|
define('PATH_UPLOADS', PATH_CONTENT . 'uploads' . DS);
|
||||||
define('PATH_WORKSPACES', PATH_CONTENT.'workspaces'.DS);
|
define('PATH_WORKSPACES', PATH_CONTENT . 'workspaces' . DS);
|
||||||
|
|
||||||
define('PATH_UPLOADS_PAGES', PATH_UPLOADS.'pages'.DS);
|
define('PATH_UPLOADS_PAGES', PATH_UPLOADS . 'pages' . DS);
|
||||||
define('PATH_UPLOADS_PROFILES', PATH_UPLOADS.'profiles'.DS);
|
define('PATH_UPLOADS_PROFILES', PATH_UPLOADS . 'profiles' . DS);
|
||||||
define('PATH_UPLOADS_THUMBNAILS', PATH_UPLOADS.'thumbnails'.DS);
|
define('PATH_UPLOADS_THUMBNAILS', PATH_UPLOADS . 'thumbnails' . DS);
|
||||||
|
|
||||||
define('PATH_ADMIN', PATH_KERNEL.'admin'.DS);
|
define('PATH_ADMIN', PATH_KERNEL . 'admin' . DS);
|
||||||
define('PATH_ADMIN_THEMES', PATH_ADMIN.'themes'.DS);
|
define('PATH_ADMIN_THEMES', PATH_ADMIN . 'themes' . DS);
|
||||||
define('PATH_ADMIN_CONTROLLERS', PATH_ADMIN.'controllers'.DS);
|
define('PATH_ADMIN_CONTROLLERS', PATH_ADMIN . 'controllers' . DS);
|
||||||
define('PATH_ADMIN_VIEWS', PATH_ADMIN.'views'.DS);
|
define('PATH_ADMIN_VIEWS', PATH_ADMIN . 'views' . DS);
|
||||||
|
|
||||||
define('DEBUG_FILE', PATH_CONTENT.'debug.txt');
|
define('DEBUG_FILE', PATH_CONTENT . 'debug.txt');
|
||||||
|
|
||||||
// PAGES DATABASE
|
// PAGES DATABASE
|
||||||
define('DB_PAGES', PATH_DATABASES.'pages.php');
|
define('DB_PAGES', PATH_DATABASES . 'pages.php');
|
||||||
define('DB_SITE', PATH_DATABASES.'site.php');
|
define('DB_SITE', PATH_DATABASES . 'site.php');
|
||||||
define('DB_CATEGORIES', PATH_DATABASES.'categories.php');
|
define('DB_CATEGORIES', PATH_DATABASES . 'categories.php');
|
||||||
define('DB_TAGS', PATH_DATABASES.'tags.php');
|
define('DB_TAGS', PATH_DATABASES . 'tags.php');
|
||||||
define('DB_SYSLOG', PATH_DATABASES.'syslog.php');
|
define('DB_SYSLOG', PATH_DATABASES . 'syslog.php');
|
||||||
define('DB_USERS', PATH_DATABASES.'users.php');
|
define('DB_USERS', PATH_DATABASES . 'users.php');
|
||||||
define('DB_SECURITY', PATH_DATABASES.'security.php');
|
define('DB_SECURITY', PATH_DATABASES . 'security.php');
|
||||||
|
|
||||||
// User environment variables
|
// User environment variables
|
||||||
include(PATH_KERNEL.'boot'.DS.'variables.php');
|
include(PATH_KERNEL . 'boot' . DS . 'variables.php');
|
||||||
|
|
||||||
// Set internal character encoding
|
// Set internal character encoding
|
||||||
mb_internal_encoding(CHARSET);
|
mb_internal_encoding(CHARSET);
|
||||||
@ -80,50 +80,50 @@ mb_internal_encoding(CHARSET);
|
|||||||
mb_http_output(CHARSET);
|
mb_http_output(CHARSET);
|
||||||
|
|
||||||
// Inclde Abstract Classes
|
// Inclde Abstract Classes
|
||||||
include(PATH_ABSTRACT.'dbjson.class.php');
|
include(PATH_ABSTRACT . 'dbjson.class.php');
|
||||||
include(PATH_ABSTRACT.'dblist.class.php');
|
include(PATH_ABSTRACT . 'dblist.class.php');
|
||||||
include(PATH_ABSTRACT.'plugin.class.php');
|
include(PATH_ABSTRACT . 'plugin.class.php');
|
||||||
|
|
||||||
// Inclde Classes
|
// Inclde Classes
|
||||||
include(PATH_KERNEL.'pages.class.php');
|
include(PATH_KERNEL . 'pages.class.php');
|
||||||
include(PATH_KERNEL.'users.class.php');
|
include(PATH_KERNEL . 'users.class.php');
|
||||||
include(PATH_KERNEL.'tags.class.php');
|
include(PATH_KERNEL . 'tags.class.php');
|
||||||
include(PATH_KERNEL.'language.class.php');
|
include(PATH_KERNEL . 'language.class.php');
|
||||||
include(PATH_KERNEL.'site.class.php');
|
include(PATH_KERNEL . 'site.class.php');
|
||||||
include(PATH_KERNEL.'categories.class.php');
|
include(PATH_KERNEL . 'categories.class.php');
|
||||||
include(PATH_KERNEL.'syslog.class.php');
|
include(PATH_KERNEL . 'syslog.class.php');
|
||||||
include(PATH_KERNEL.'pagex.class.php');
|
include(PATH_KERNEL . 'pagex.class.php');
|
||||||
include(PATH_KERNEL.'category.class.php');
|
include(PATH_KERNEL . 'category.class.php');
|
||||||
include(PATH_KERNEL.'tag.class.php');
|
include(PATH_KERNEL . 'tag.class.php');
|
||||||
include(PATH_KERNEL.'user.class.php');
|
include(PATH_KERNEL . 'user.class.php');
|
||||||
include(PATH_KERNEL.'url.class.php');
|
include(PATH_KERNEL . 'url.class.php');
|
||||||
include(PATH_KERNEL.'login.class.php');
|
include(PATH_KERNEL . 'login.class.php');
|
||||||
include(PATH_KERNEL.'parsedown.class.php');
|
include(PATH_KERNEL . 'parsedown.class.php');
|
||||||
include(PATH_KERNEL.'security.class.php');
|
include(PATH_KERNEL . 'security.class.php');
|
||||||
|
|
||||||
// Include functions
|
// Include functions
|
||||||
include(PATH_KERNEL.'functions.php');
|
include(PATH_KERNEL . 'functions.php');
|
||||||
|
|
||||||
// Include Helpers Classes
|
// Include Helpers Classes
|
||||||
include(PATH_HELPERS.'text.class.php');
|
include(PATH_HELPERS . 'text.class.php');
|
||||||
include(PATH_HELPERS.'log.class.php');
|
include(PATH_HELPERS . 'log.class.php');
|
||||||
include(PATH_HELPERS.'date.class.php');
|
include(PATH_HELPERS . 'date.class.php');
|
||||||
include(PATH_HELPERS.'theme.class.php');
|
include(PATH_HELPERS . 'theme.class.php');
|
||||||
include(PATH_HELPERS.'session.class.php');
|
include(PATH_HELPERS . 'session.class.php');
|
||||||
include(PATH_HELPERS.'redirect.class.php');
|
include(PATH_HELPERS . 'redirect.class.php');
|
||||||
include(PATH_HELPERS.'sanitize.class.php');
|
include(PATH_HELPERS . 'sanitize.class.php');
|
||||||
include(PATH_HELPERS.'valid.class.php');
|
include(PATH_HELPERS . 'valid.class.php');
|
||||||
include(PATH_HELPERS.'email.class.php');
|
include(PATH_HELPERS . 'email.class.php');
|
||||||
include(PATH_HELPERS.'filesystem.class.php');
|
include(PATH_HELPERS . 'filesystem.class.php');
|
||||||
include(PATH_HELPERS.'alert.class.php');
|
include(PATH_HELPERS . 'alert.class.php');
|
||||||
include(PATH_HELPERS.'paginator.class.php');
|
include(PATH_HELPERS . 'paginator.class.php');
|
||||||
include(PATH_HELPERS.'image.class.php');
|
include(PATH_HELPERS . 'image.class.php');
|
||||||
include(PATH_HELPERS.'tcp.class.php');
|
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')) {
|
if (file_exists(PATH_KERNEL . 'bludit.pro.php')) {
|
||||||
include(PATH_KERNEL.'bludit.pro.php');
|
include(PATH_KERNEL . 'bludit.pro.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Objects
|
// Objects
|
||||||
@ -148,43 +148,43 @@ if (!empty($_SERVER['DOCUMENT_ROOT']) && !empty($_SERVER['SCRIPT_NAME']) && empt
|
|||||||
$base = str_replace($_SERVER['DOCUMENT_ROOT'], '', $_SERVER['SCRIPT_NAME']);
|
$base = str_replace($_SERVER['DOCUMENT_ROOT'], '', $_SERVER['SCRIPT_NAME']);
|
||||||
$base = dirname($base);
|
$base = dirname($base);
|
||||||
} elseif (empty($base)) {
|
} elseif (empty($base)) {
|
||||||
$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
|
$base = empty($_SERVER['SCRIPT_NAME']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
|
||||||
$base = dirname($base);
|
$base = dirname($base);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($_SERVER['REQUEST_URI'], $base)!==0) {
|
if (strpos($_SERVER['REQUEST_URI'], $base) !== 0) {
|
||||||
$base = '/';
|
$base = '/';
|
||||||
} elseif ($base!=DS) {
|
} elseif ($base != DS) {
|
||||||
$base = trim($base, '/');
|
$base = trim($base, '/');
|
||||||
$base = '/'.$base.'/';
|
$base = '/' . $base . '/';
|
||||||
} else {
|
} else {
|
||||||
// Workaround for Windows Web Servers
|
// Workaround for Windows Web Servers
|
||||||
$base = '/';
|
$base = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
define('HTML_PATH_ROOT', $base);
|
define('HTML_PATH_ROOT', $base);
|
||||||
define('HTML_PATH_THEMES', HTML_PATH_ROOT.'bl-themes/');
|
define('HTML_PATH_THEMES', HTML_PATH_ROOT . 'bl-themes/');
|
||||||
define('HTML_PATH_THEME', HTML_PATH_THEMES.$site->theme().'/');
|
define('HTML_PATH_THEME', HTML_PATH_THEMES . $site->theme() . '/');
|
||||||
define('HTML_PATH_THEME_CSS', HTML_PATH_THEME.'css/');
|
define('HTML_PATH_THEME_CSS', HTML_PATH_THEME . 'css/');
|
||||||
define('HTML_PATH_THEME_JS', HTML_PATH_THEME.'js/');
|
define('HTML_PATH_THEME_JS', HTML_PATH_THEME . 'js/');
|
||||||
define('HTML_PATH_THEME_IMG', HTML_PATH_THEME.'img/');
|
define('HTML_PATH_THEME_IMG', HTML_PATH_THEME . 'img/');
|
||||||
define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.ADMIN_URI_FILTER.'/');
|
define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT . ADMIN_URI_FILTER . '/');
|
||||||
define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT.'bl-kernel/admin/themes/'.$site->adminTheme().'/');
|
define('HTML_PATH_ADMIN_THEME', HTML_PATH_ROOT . 'bl-kernel/admin/themes/' . $site->adminTheme() . '/');
|
||||||
define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME.'js/');
|
define('HTML_PATH_ADMIN_THEME_JS', HTML_PATH_ADMIN_THEME . 'js/');
|
||||||
define('HTML_PATH_ADMIN_THEME_CSS', HTML_PATH_ADMIN_THEME.'css/');
|
define('HTML_PATH_ADMIN_THEME_CSS', HTML_PATH_ADMIN_THEME . 'css/');
|
||||||
define('HTML_PATH_CORE_JS', HTML_PATH_ROOT.'bl-kernel/js/');
|
define('HTML_PATH_CORE_JS', HTML_PATH_ROOT . 'bl-kernel/js/');
|
||||||
define('HTML_PATH_CORE_CSS', HTML_PATH_ROOT.'bl-kernel/css/');
|
define('HTML_PATH_CORE_CSS', HTML_PATH_ROOT . 'bl-kernel/css/');
|
||||||
define('HTML_PATH_CORE_IMG', HTML_PATH_ROOT.'bl-kernel/img/');
|
define('HTML_PATH_CORE_IMG', HTML_PATH_ROOT . 'bl-kernel/img/');
|
||||||
define('HTML_PATH_CONTENT', HTML_PATH_ROOT.'bl-content/');
|
define('HTML_PATH_CONTENT', HTML_PATH_ROOT . 'bl-content/');
|
||||||
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'bl-content/uploads/');
|
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT . 'bl-content/uploads/');
|
||||||
define('HTML_PATH_UPLOADS_PAGES', HTML_PATH_UPLOADS.'pages/');
|
define('HTML_PATH_UPLOADS_PAGES', HTML_PATH_UPLOADS . 'pages/');
|
||||||
define('HTML_PATH_UPLOADS_PROFILES', HTML_PATH_UPLOADS.'profiles/');
|
define('HTML_PATH_UPLOADS_PROFILES', HTML_PATH_UPLOADS . 'profiles/');
|
||||||
define('HTML_PATH_UPLOADS_THUMBNAILS', HTML_PATH_UPLOADS.'thumbnails/');
|
define('HTML_PATH_UPLOADS_THUMBNAILS', HTML_PATH_UPLOADS . 'thumbnails/');
|
||||||
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'bl-plugins/');
|
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT . 'bl-plugins/');
|
||||||
|
|
||||||
// --- Objects with dependency ---
|
// --- Objects with dependency ---
|
||||||
$language = new Language( $site->language() );
|
$language = new Language($site->language());
|
||||||
$url->checkFilters( $site->uriFilters() );
|
$url->checkFilters($site->uriFilters());
|
||||||
|
|
||||||
// --- CONSTANTS with dependency ---
|
// --- CONSTANTS with dependency ---
|
||||||
|
|
||||||
@ -217,38 +217,38 @@ define('MARKDOWN_PARSER', $site->markdownParser());
|
|||||||
|
|
||||||
// --- PHP paths with dependency ---
|
// --- PHP paths with dependency ---
|
||||||
// This paths are absolutes for the OS
|
// This paths are absolutes for the OS
|
||||||
define('THEME_DIR', PATH_ROOT.'bl-themes'.DS.$site->theme().DS);
|
define('THEME_DIR', PATH_ROOT . 'bl-themes' . DS . $site->theme() . DS);
|
||||||
define('THEME_DIR_PHP', THEME_DIR.'php'.DS);
|
define('THEME_DIR_PHP', THEME_DIR . 'php' . DS);
|
||||||
define('THEME_DIR_CSS', THEME_DIR.'css'.DS);
|
define('THEME_DIR_CSS', THEME_DIR . 'css' . DS);
|
||||||
define('THEME_DIR_JS', THEME_DIR.'js'.DS);
|
define('THEME_DIR_JS', THEME_DIR . 'js' . DS);
|
||||||
define('THEME_DIR_IMG', THEME_DIR.'img'.DS);
|
define('THEME_DIR_IMG', THEME_DIR . 'img' . DS);
|
||||||
define('THEME_DIR_LANG', THEME_DIR.'languages'.DS);
|
define('THEME_DIR_LANG', THEME_DIR . 'languages' . DS);
|
||||||
|
|
||||||
// --- Absolute paths with domain ---
|
// --- Absolute paths with domain ---
|
||||||
// This paths are absolutes for the user / web browsing.
|
// This paths are absolutes for the user / web browsing.
|
||||||
define('DOMAIN', $site->domain());
|
define('DOMAIN', $site->domain());
|
||||||
define('DOMAIN_BASE', DOMAIN.HTML_PATH_ROOT);
|
define('DOMAIN_BASE', DOMAIN . HTML_PATH_ROOT);
|
||||||
define('DOMAIN_CORE_JS', DOMAIN.HTML_PATH_CORE_JS);
|
define('DOMAIN_CORE_JS', DOMAIN . HTML_PATH_CORE_JS);
|
||||||
define('DOMAIN_CORE_CSS', DOMAIN.HTML_PATH_CORE_CSS);
|
define('DOMAIN_CORE_CSS', DOMAIN . HTML_PATH_CORE_CSS);
|
||||||
define('DOMAIN_THEME', DOMAIN.HTML_PATH_THEME);
|
define('DOMAIN_THEME', DOMAIN . HTML_PATH_THEME);
|
||||||
define('DOMAIN_THEME_CSS', DOMAIN.HTML_PATH_THEME_CSS);
|
define('DOMAIN_THEME_CSS', DOMAIN . HTML_PATH_THEME_CSS);
|
||||||
define('DOMAIN_THEME_JS', DOMAIN.HTML_PATH_THEME_JS);
|
define('DOMAIN_THEME_JS', DOMAIN . HTML_PATH_THEME_JS);
|
||||||
define('DOMAIN_THEME_IMG', DOMAIN.HTML_PATH_THEME_IMG);
|
define('DOMAIN_THEME_IMG', DOMAIN . HTML_PATH_THEME_IMG);
|
||||||
define('DOMAIN_ADMIN_THEME', DOMAIN.HTML_PATH_ADMIN_THEME);
|
define('DOMAIN_ADMIN_THEME', DOMAIN . HTML_PATH_ADMIN_THEME);
|
||||||
define('DOMAIN_ADMIN_THEME_CSS', DOMAIN.HTML_PATH_ADMIN_THEME_CSS);
|
define('DOMAIN_ADMIN_THEME_CSS', DOMAIN . HTML_PATH_ADMIN_THEME_CSS);
|
||||||
define('DOMAIN_ADMIN_THEME_JS', DOMAIN.HTML_PATH_ADMIN_THEME_JS);
|
define('DOMAIN_ADMIN_THEME_JS', DOMAIN . HTML_PATH_ADMIN_THEME_JS);
|
||||||
define('DOMAIN_UPLOADS', DOMAIN.HTML_PATH_UPLOADS);
|
define('DOMAIN_UPLOADS', DOMAIN . HTML_PATH_UPLOADS);
|
||||||
define('DOMAIN_UPLOADS_PAGES', DOMAIN.HTML_PATH_UPLOADS_PAGES);
|
define('DOMAIN_UPLOADS_PAGES', DOMAIN . HTML_PATH_UPLOADS_PAGES);
|
||||||
define('DOMAIN_UPLOADS_PROFILES', DOMAIN.HTML_PATH_UPLOADS_PROFILES);
|
define('DOMAIN_UPLOADS_PROFILES', DOMAIN . HTML_PATH_UPLOADS_PROFILES);
|
||||||
define('DOMAIN_UPLOADS_THUMBNAILS', DOMAIN.HTML_PATH_UPLOADS_THUMBNAILS);
|
define('DOMAIN_UPLOADS_THUMBNAILS', DOMAIN . HTML_PATH_UPLOADS_THUMBNAILS);
|
||||||
define('DOMAIN_PLUGINS', DOMAIN.HTML_PATH_PLUGINS);
|
define('DOMAIN_PLUGINS', DOMAIN . HTML_PATH_PLUGINS);
|
||||||
define('DOMAIN_CONTENT', DOMAIN.HTML_PATH_CONTENT);
|
define('DOMAIN_CONTENT', DOMAIN . HTML_PATH_CONTENT);
|
||||||
|
|
||||||
define('DOMAIN_ADMIN', DOMAIN_BASE.ADMIN_URI_FILTER.'/');
|
define('DOMAIN_ADMIN', DOMAIN_BASE . ADMIN_URI_FILTER . '/');
|
||||||
|
|
||||||
define('DOMAIN_TAGS', Text::addSlashes(DOMAIN_BASE.TAG_URI_FILTER, false, true));
|
define('DOMAIN_TAGS', Text::addSlashes(DOMAIN_BASE . TAG_URI_FILTER, false, true));
|
||||||
define('DOMAIN_CATEGORIES', Text::addSlashes(DOMAIN_BASE.CATEGORY_URI_FILTER, false, true));
|
define('DOMAIN_CATEGORIES', Text::addSlashes(DOMAIN_BASE . CATEGORY_URI_FILTER, false, true));
|
||||||
define('DOMAIN_PAGES', Text::addSlashes(DOMAIN_BASE.PAGE_URI_FILTER, false, true));
|
define('DOMAIN_PAGES', Text::addSlashes(DOMAIN_BASE . PAGE_URI_FILTER, false, true));
|
||||||
|
|
||||||
$ADMIN_CONTROLLER = '';
|
$ADMIN_CONTROLLER = '';
|
||||||
$ADMIN_VIEW = '';
|
$ADMIN_VIEW = '';
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Variables
|
// Variables
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
$themePlugin = getPlugin($site->theme()); // Returns plugin object or False
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Functions
|
// Functions
|
||||||
@ -15,20 +16,18 @@ function buildThemes()
|
|||||||
$themes = array();
|
$themes = array();
|
||||||
$themesPaths = Filesystem::listDirectories(PATH_THEMES);
|
$themesPaths = Filesystem::listDirectories(PATH_THEMES);
|
||||||
|
|
||||||
foreach($themesPaths as $themePath)
|
foreach ($themesPaths as $themePath) {
|
||||||
{
|
|
||||||
// Check if the theme is translated.
|
// Check if the theme is translated.
|
||||||
$languageFilename = $themePath.DS.'languages'.DS.$site->language().'.json';
|
$languageFilename = $themePath . DS . 'languages' . DS . $site->language() . '.json';
|
||||||
if( !Sanitize::pathFile($languageFilename) ) {
|
if (!Sanitize::pathFile($languageFilename)) {
|
||||||
$languageFilename = $themePath.DS.'languages'.DS.DEFAULT_LANGUAGE_FILE;
|
$languageFilename = $themePath . DS . 'languages' . DS . DEFAULT_LANGUAGE_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Sanitize::pathFile($languageFilename) )
|
if (Sanitize::pathFile($languageFilename)) {
|
||||||
{
|
|
||||||
$database = file_get_contents($languageFilename);
|
$database = file_get_contents($languageFilename);
|
||||||
$database = json_decode($database, true);
|
$database = json_decode($database, true);
|
||||||
if(empty($database)) {
|
if (empty($database)) {
|
||||||
Log::set('99.themes.php'.LOG_SEP.'Language file error on theme '.$themePath);
|
Log::set('99.themes.php' . LOG_SEP . 'Language file error on theme ' . $themePath);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,20 +36,19 @@ function buildThemes()
|
|||||||
$database['dirname'] = basename($themePath);
|
$database['dirname'] = basename($themePath);
|
||||||
|
|
||||||
// --- Metadata ---
|
// --- Metadata ---
|
||||||
$filenameMetadata = $themePath.DS.'metadata.json';
|
$filenameMetadata = $themePath . DS . 'metadata.json';
|
||||||
|
|
||||||
if( Sanitize::pathFile($filenameMetadata) )
|
if (Sanitize::pathFile($filenameMetadata)) {
|
||||||
{
|
|
||||||
$metadataString = file_get_contents($filenameMetadata);
|
$metadataString = file_get_contents($filenameMetadata);
|
||||||
$metadata = json_decode($metadataString, true);
|
$metadata = json_decode($metadataString, true);
|
||||||
|
|
||||||
$database['compatible'] = false;
|
$database['compatible'] = false;
|
||||||
if( !empty($metadata['compatible']) ) {
|
if (!empty($metadata['compatible'])) {
|
||||||
$bluditRoot = explode('.', BLUDIT_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]==$bluditRoot[0] && $root[1]==$bluditRoot[1] ) {
|
if ($root[0] == $bluditRoot[0] && $root[1] == $bluditRoot[1]) {
|
||||||
$database['compatible'] = true;
|
$database['compatible'] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -70,13 +68,12 @@ function buildThemes()
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// Load the language file
|
// Load the language file
|
||||||
$languageFilename = THEME_DIR.'languages'.DS.$site->language().'.json';
|
$languageFilename = THEME_DIR . 'languages' . DS . $site->language() . '.json';
|
||||||
if( !Sanitize::pathFile($languageFilename) ) {
|
if (!Sanitize::pathFile($languageFilename)) {
|
||||||
$languageFilename = THEME_DIR.'languages'.DS.DEFAULT_LANGUAGE_FILE;
|
$languageFilename = THEME_DIR . 'languages' . DS . DEFAULT_LANGUAGE_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Sanitize::pathFile($languageFilename) )
|
if (Sanitize::pathFile($languageFilename)) {
|
||||||
{
|
|
||||||
$database = file_get_contents($languageFilename);
|
$database = file_get_contents($languageFilename);
|
||||||
$database = json_decode($database, true);
|
$database = json_decode($database, true);
|
||||||
|
|
||||||
@ -84,7 +81,7 @@ if( Sanitize::pathFile($languageFilename) )
|
|||||||
unset($database['theme-data']);
|
unset($database['theme-data']);
|
||||||
|
|
||||||
// Load words from the theme language
|
// Load words from the theme language
|
||||||
if(!empty($database)) {
|
if (!empty($database)) {
|
||||||
$L->add($database);
|
$L->add($database);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1345
bl-kernel/css/bootstrap-icons/bootstrap-icons.css
vendored
Normal file
1345
bl-kernel/css/bootstrap-icons/bootstrap-icons.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1327
bl-kernel/css/bootstrap-icons/bootstrap-icons.json
Normal file
1327
bl-kernel/css/bootstrap-icons/bootstrap-icons.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bl-kernel/css/bootstrap-icons/fonts/bootstrap-icons.woff
Normal file
BIN
bl-kernel/css/bootstrap-icons/fonts/bootstrap-icons.woff
Normal file
Binary file not shown.
BIN
bl-kernel/css/bootstrap-icons/fonts/bootstrap-icons.woff2
Normal file
BIN
bl-kernel/css/bootstrap-icons/fonts/bootstrap-icons.woff2
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -209,14 +209,14 @@ class Filesystem {
|
|||||||
return $zip->close();
|
return $zip->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| Returns the next filename if the filename already exist otherwise returns the original filename
|
| Returns the next filename if the filename already exist otherwise returns the original filename
|
||||||
|
|
|
|
||||||
| @path string Path
|
| @path string Path
|
||||||
| @filename string Filename
|
| @filename string Filename
|
||||||
|
|
|
|
||||||
| @return string
|
| @return string
|
||||||
*/
|
*/
|
||||||
public static function nextFilename($filename, $path=PATH_UPLOADS) {
|
public static function nextFilename($filename, $path=PATH_UPLOADS) {
|
||||||
// Clean filename and get extension
|
// Clean filename and get extension
|
||||||
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
|
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||||
@ -238,30 +238,30 @@ class Filesystem {
|
|||||||
return $tmpName;
|
return $tmpName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| Returns the filename
|
| Returns the filename
|
||||||
| Example:
|
| Example:
|
||||||
| @file /home/diego/dog.jpg
|
| @file /home/diego/dog.jpg
|
||||||
| @return dog.jpg
|
| @return dog.jpg
|
||||||
|
|
|
|
||||||
| @file string Full path of the file
|
| @file string Full path of the file
|
||||||
|
|
|
|
||||||
| @return string
|
| @return string
|
||||||
*/
|
*/
|
||||||
public static function filename($file) {
|
public static function filename($file) {
|
||||||
return basename($file);
|
return basename($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| Returns the file extension
|
| Returns the file extension
|
||||||
| Example:
|
| Example:
|
||||||
| @file /home/diego/dog.jpg
|
| @file /home/diego/dog.jpg
|
||||||
| @return jpg
|
| @return jpg
|
||||||
|
|
|
|
||||||
| @file string Full path of the file
|
| @file string Full path of the file
|
||||||
|
|
|
|
||||||
| @return string
|
| @return string
|
||||||
*/
|
*/
|
||||||
public static function extension($file) {
|
public static function extension($file) {
|
||||||
return pathinfo($file, PATHINFO_EXTENSION);
|
return pathinfo($file, PATHINFO_EXTENSION);
|
||||||
}
|
}
|
||||||
@ -298,15 +298,15 @@ class Filesystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
| Returns the mime type of the file
|
| Returns the mime type of the file
|
||||||
| Example:
|
| Example:
|
||||||
| @file /home/diego/dog.jpg
|
| @file /home/diego/dog.jpg
|
||||||
| @return image/jpeg
|
| @return image/jpeg
|
||||||
|
|
|
|
||||||
| @file [string] Full path of the file
|
| @file [string] Full path of the file
|
||||||
|
|
|
|
||||||
| @return [string|bool] Mime type as string or FALSE if not possible to get the mime type
|
| @return [string|bool] Mime type as string or FALSE if not possible to get the mime type
|
||||||
*/
|
*/
|
||||||
public static function mimeType($file) {
|
public static function mimeType($file) {
|
||||||
if (function_exists('mime_content_type')) {
|
if (function_exists('mime_content_type')) {
|
||||||
return mime_content_type($file);
|
return mime_content_type($file);
|
||||||
@ -322,4 +322,12 @@ class Filesystem {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function symlink($from, $to) {
|
||||||
|
if (function_exists('symlink')) {
|
||||||
|
return symlink($from, $to);
|
||||||
|
} else {
|
||||||
|
return copy($from, $to);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -262,6 +262,12 @@ class Theme {
|
|||||||
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='.BLUDIT_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;
|
||||||
|
}
|
||||||
|
|
||||||
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='.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='.BLUDIT_VERSION.'">'.PHP_EOL;
|
||||||
@ -274,5 +280,3 @@ class Theme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
4
bl-kernel/js/jquery.min.js
vendored
4
bl-kernel/js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
@ -158,7 +158,7 @@ class Pages extends dbJSON {
|
|||||||
|
|
||||||
// Create symlink for images directory
|
// Create symlink for images directory
|
||||||
if (Filesystem::mkdir(PATH_UPLOADS_PAGES.$row['uuid'])) {
|
if (Filesystem::mkdir(PATH_UPLOADS_PAGES.$row['uuid'])) {
|
||||||
symlink(PATH_UPLOADS_PAGES.$row['uuid'], PATH_UPLOADS_PAGES.$key);
|
Filesystem::symlink(PATH_UPLOADS_PAGES.$row['uuid'], PATH_UPLOADS_PAGES.$key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $key;
|
return $key;
|
||||||
@ -254,7 +254,7 @@ class Pages extends dbJSON {
|
|||||||
|
|
||||||
// Regenerate the symlink to a proper directory
|
// Regenerate the symlink to a proper directory
|
||||||
unlink(PATH_UPLOADS_PAGES.$key);
|
unlink(PATH_UPLOADS_PAGES.$key);
|
||||||
symlink(PATH_UPLOADS_PAGES.$row['uuid'], PATH_UPLOADS_PAGES.$newKey);
|
Filesystem::symlink(PATH_UPLOADS_PAGES.$row['uuid'], PATH_UPLOADS_PAGES.$newKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the content was passed via arguments replace the content
|
// If the content was passed via arguments replace the content
|
||||||
|
@ -1,54 +1,55 @@
|
|||||||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
class Site extends dbJSON {
|
class Site extends dbJSON
|
||||||
|
{
|
||||||
public $dbFields = array(
|
public $dbFields = array(
|
||||||
'title'=> 'I am Guybrush Threepwood, mighty developer',
|
'title' => 'I am Guybrush Threepwood, mighty developer',
|
||||||
'slogan'=> '',
|
'slogan' => '',
|
||||||
'description'=> '',
|
'description' => '',
|
||||||
'footer'=> 'I wanna be a pirate!',
|
'footer' => 'I wanna be a pirate!',
|
||||||
'itemsPerPage'=> 6,
|
'itemsPerPage' => 6,
|
||||||
'language'=> 'en',
|
'language' => 'en',
|
||||||
'locale'=> 'en, en_US, en_AU, en_CA, en_GB, en_IE, en_NZ',
|
'locale' => 'en, en_US, en_AU, en_CA, en_GB, en_IE, en_NZ',
|
||||||
'timezone'=> 'America/Argentina/Buenos_Aires',
|
'timezone' => 'America/Argentina/Buenos_Aires',
|
||||||
'theme'=> 'alternative',
|
'theme' => 'alternative',
|
||||||
'adminTheme'=> 'booty',
|
'adminTheme' => 'booty',
|
||||||
'homepage'=> '',
|
'homepage' => '',
|
||||||
'pageNotFound'=> '',
|
'pageNotFound' => '',
|
||||||
'uriPage'=> '/',
|
'uriPage' => '/',
|
||||||
'uriTag'=> '/tag/',
|
'uriTag' => '/tag/',
|
||||||
'uriCategory'=> '/category/',
|
'uriCategory' => '/category/',
|
||||||
'uriBlog'=> '/blog/',
|
'uriBlog' => '/blog/',
|
||||||
'url'=> '',
|
'url' => '',
|
||||||
'emailFrom'=> '',
|
'emailFrom' => '',
|
||||||
'dateFormat'=> 'F j, Y',
|
'dateFormat' => 'F j, Y',
|
||||||
'timeFormat'=> 'g:i a',
|
'timeFormat' => 'g:i a',
|
||||||
'currentBuild'=> 0,
|
'currentBuild' => 0,
|
||||||
'twitter'=> '',
|
'twitter' => '',
|
||||||
'facebook'=> '',
|
'facebook' => '',
|
||||||
'codepen'=> '',
|
'codepen' => '',
|
||||||
'instagram'=> '',
|
'instagram' => '',
|
||||||
'github'=> '',
|
'github' => '',
|
||||||
'gitlab'=> '',
|
'gitlab' => '',
|
||||||
'linkedin'=> '',
|
'linkedin' => '',
|
||||||
'xing'=> '',
|
'xing' => '',
|
||||||
'mastodon'=> '',
|
'mastodon' => '',
|
||||||
'dribbble'=> '',
|
'dribbble' => '',
|
||||||
'vk'=> '',
|
'vk' => '',
|
||||||
'orderBy'=> 'date', // date or position
|
'orderBy' => 'date', // date or position
|
||||||
'extremeFriendly'=> true,
|
'extremeFriendly' => true,
|
||||||
'autosaveInterval'=> 2, // minutes
|
'autosaveInterval' => 2, // minutes
|
||||||
'titleFormatHomepage'=> '{{site-slogan}} | {{site-title}}',
|
'titleFormatHomepage' => '{{site-slogan}} | {{site-title}}',
|
||||||
'titleFormatPages'=> '{{page-title}} | {{site-title}}',
|
'titleFormatPages' => '{{page-title}} | {{site-title}}',
|
||||||
'titleFormatCategory'=> '{{category-name}} | {{site-title}}',
|
'titleFormatCategory' => '{{category-name}} | {{site-title}}',
|
||||||
'titleFormatTag'=> '{{tag-name}} | {{site-title}}',
|
'titleFormatTag' => '{{tag-name}} | {{site-title}}',
|
||||||
'imageRestrict'=> true,
|
'imageRestrict' => true,
|
||||||
'imageRelativeToAbsolute'=> false,
|
'imageRelativeToAbsolute' => false,
|
||||||
'thumbnailWidth'=> 400, // px
|
'thumbnailWidth' => 400, // px
|
||||||
'thumbnailHeight'=> 400, // px
|
'thumbnailHeight' => 400, // px
|
||||||
'thumbnailQuality'=> 100,
|
'thumbnailQuality' => 100,
|
||||||
'logo'=> '',
|
'logo' => '',
|
||||||
'markdownParser'=> true,
|
'markdownParser' => true,
|
||||||
'customFields'=> '{}'
|
'customFields' => '{}'
|
||||||
);
|
);
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
@ -56,10 +57,10 @@ class Site extends dbJSON {
|
|||||||
parent::__construct(DB_SITE);
|
parent::__construct(DB_SITE);
|
||||||
|
|
||||||
// Set timezone
|
// Set timezone
|
||||||
$this->setTimezone( $this->timezone() );
|
$this->setTimezone($this->timezone());
|
||||||
|
|
||||||
// Set locale
|
// Set locale
|
||||||
$this->setLocale( $this->locale() );
|
$this->setLocale($this->locale());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns an array with site configuration.
|
// Returns an array with site configuration.
|
||||||
@ -71,11 +72,14 @@ class Site extends dbJSON {
|
|||||||
public function set($args)
|
public function set($args)
|
||||||
{
|
{
|
||||||
// Check values on args or set default values
|
// Check values on args or set default values
|
||||||
foreach ($this->dbFields as $field=>$value) {
|
foreach ($this->dbFields as $field => $value) {
|
||||||
if (isset($args[$field])) {
|
if (isset($args[$field])) {
|
||||||
$finalValue = Sanitize::html($args[$field]);
|
$finalValue = Sanitize::html($args[$field]);
|
||||||
if ($finalValue==='false') { $finalValue = false; }
|
if ($finalValue === 'false') {
|
||||||
elseif ($finalValue==='true') { $finalValue = true; }
|
$finalValue = false;
|
||||||
|
} elseif ($finalValue === 'true') {
|
||||||
|
$finalValue = true;
|
||||||
|
}
|
||||||
settype($finalValue, gettype($value));
|
settype($finalValue, gettype($value));
|
||||||
$this->db[$field] = $finalValue;
|
$this->db[$field] = $finalValue;
|
||||||
}
|
}
|
||||||
@ -85,9 +89,9 @@ class Site extends dbJSON {
|
|||||||
|
|
||||||
// Returns an array with the URL filters
|
// Returns an array with the URL filters
|
||||||
// Also, you can get the a particular filter
|
// Also, you can get the a particular filter
|
||||||
public function uriFilters($filter='')
|
public function uriFilters($filter = '')
|
||||||
{
|
{
|
||||||
$filters['admin'] = '/'.ADMIN_URI_FILTER.'/';
|
$filters['admin'] = '/' . ADMIN_URI_FILTER . '/';
|
||||||
$filters['page'] = $this->getField('uriPage');
|
$filters['page'] = $this->getField('uriPage');
|
||||||
$filters['tag'] = $this->getField('uriTag');
|
$filters['tag'] = $this->getField('uriTag');
|
||||||
$filters['category'] = $this->getField('uriCategory');
|
$filters['category'] = $this->getField('uriCategory');
|
||||||
@ -110,13 +114,13 @@ class Site extends dbJSON {
|
|||||||
// DEPRECATED in v3.0, use Theme::rssUrl()
|
// DEPRECATED in v3.0, use Theme::rssUrl()
|
||||||
public function rss()
|
public function rss()
|
||||||
{
|
{
|
||||||
return DOMAIN_BASE.'rss.xml';
|
return DOMAIN_BASE . 'rss.xml';
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEPRECATED in v3.0, use Theme::sitemapUrl()
|
// DEPRECATED in v3.0, use Theme::sitemapUrl()
|
||||||
public function sitemap()
|
public function sitemap()
|
||||||
{
|
{
|
||||||
return DOMAIN_BASE.'sitemap.xml';
|
return DOMAIN_BASE . 'sitemap.xml';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function thumbnailWidth()
|
public function thumbnailWidth()
|
||||||
@ -292,11 +296,11 @@ class Site extends dbJSON {
|
|||||||
|
|
||||||
// Returns the absolute URL of the site logo
|
// Returns the absolute URL of the site logo
|
||||||
// If you set $absolute=false returns only the filename
|
// If you set $absolute=false returns only the filename
|
||||||
public function logo($absolute=true)
|
public function logo($absolute = true)
|
||||||
{
|
{
|
||||||
$logo = $this->getField('logo');
|
$logo = $this->getField('logo');
|
||||||
if ($absolute && $logo) {
|
if ($absolute && $logo) {
|
||||||
return DOMAIN_UPLOADS.$logo;
|
return DOMAIN_UPLOADS . $logo;
|
||||||
}
|
}
|
||||||
return $logo;
|
return $logo;
|
||||||
}
|
}
|
||||||
@ -313,25 +317,24 @@ class Site extends dbJSON {
|
|||||||
public function domain()
|
public function domain()
|
||||||
{
|
{
|
||||||
// If the URL field is not set, try detect the domain.
|
// If the URL field is not set, try detect the domain.
|
||||||
if(Text::isEmpty( $this->url() )) {
|
if (Text::isEmpty($this->url())) {
|
||||||
if(!empty($_SERVER['HTTPS'])) {
|
if (!empty($_SERVER['HTTPS'])) {
|
||||||
$protocol = 'https://';
|
$protocol = 'https://';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$protocol = 'http://';
|
$protocol = 'http://';
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain = trim($_SERVER['HTTP_HOST'], '/');
|
$domain = trim($_SERVER['HTTP_HOST'], '/');
|
||||||
return $protocol.$domain;
|
return $protocol . $domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the domain from the field url (Settings->Advanced)
|
// Parse the domain from the field url (Settings->Advanced)
|
||||||
$parse = parse_url($this->url());
|
$parse = parse_url($this->url());
|
||||||
$domain = rtrim($parse['host'], '/');
|
$domain = rtrim($parse['host'], '/');
|
||||||
$port = !empty($parse['port']) ? ':'.$parse['port'] : '';
|
$port = !empty($parse['port']) ? ':' . $parse['port'] : '';
|
||||||
$scheme = !empty($parse['scheme']) ? $parse['scheme'].'://' : 'http://';
|
$scheme = !empty($parse['scheme']) ? $parse['scheme'] . '://' : 'http://';
|
||||||
|
|
||||||
return $scheme.$domain.$port;
|
return $scheme . $domain . $port;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the timezone.
|
// Returns the timezone.
|
||||||
@ -340,17 +343,17 @@ class Site extends dbJSON {
|
|||||||
return $this->getField('timezone');
|
return $this->getField('timezone');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function urlPath()
|
public function urlPath()
|
||||||
{
|
{
|
||||||
$url = $this->getField('url');
|
$url = $this->getField('url');
|
||||||
return parse_url($url, PHP_URL_PATH);
|
return parse_url($url, PHP_URL_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isHTTPS()
|
public function isHTTPS()
|
||||||
{
|
{
|
||||||
$url = $this->getField('url');
|
$url = $this->getField('url');
|
||||||
return parse_url($url, PHP_URL_SCHEME) === 'https';
|
return parse_url($url, PHP_URL_SCHEME) === 'https';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the current build / version of Bludit.
|
// Returns the current build / version of Bludit.
|
||||||
public function currentBuild()
|
public function currentBuild()
|
||||||
@ -361,7 +364,11 @@ class Site extends dbJSON {
|
|||||||
// Returns the amount of pages per page
|
// Returns the amount of pages per page
|
||||||
public function itemsPerPage()
|
public function itemsPerPage()
|
||||||
{
|
{
|
||||||
return $this->getField('itemsPerPage');
|
$value = $this->getField('itemsPerPage');
|
||||||
|
if (($value > 0) or ($value == -1)) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the current language.
|
// Returns the current language.
|
||||||
@ -407,10 +414,9 @@ class Site extends dbJSON {
|
|||||||
$localeList = explode(',', $locale);
|
$localeList = explode(',', $locale);
|
||||||
foreach ($localeList as $locale) {
|
foreach ($localeList as $locale) {
|
||||||
$locale = trim($locale);
|
$locale = trim($locale);
|
||||||
if (setlocale(LC_ALL, $locale.'.UTF-8')!==false) {
|
if (setlocale(LC_ALL, $locale . '.UTF-8') !== false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
} elseif (setlocale(LC_ALL, $locale) !== false) {
|
||||||
elseif (setlocale(LC_ALL, $locale)!==false) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -431,5 +437,4 @@ class Site extends dbJSON {
|
|||||||
$customFields = Sanitize::htmlDecode($this->getField('customFields'));
|
$customFields = Sanitize::htmlDecode($this->getField('customFields'));
|
||||||
return json_decode($customFields, true);
|
return json_decode($customFields, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
1345
bl-kernel/vendors/bootstrap-icons/bootstrap-icons.css
vendored
Normal file
1345
bl-kernel/vendors/bootstrap-icons/bootstrap-icons.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1327
bl-kernel/vendors/bootstrap-icons/bootstrap-icons.json
vendored
Normal file
1327
bl-kernel/vendors/bootstrap-icons/bootstrap-icons.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bl-kernel/vendors/bootstrap-icons/fonts/bootstrap-icons.woff
vendored
Normal file
BIN
bl-kernel/vendors/bootstrap-icons/fonts/bootstrap-icons.woff
vendored
Normal file
Binary file not shown.
BIN
bl-kernel/vendors/bootstrap-icons/fonts/bootstrap-icons.woff2
vendored
Normal file
BIN
bl-kernel/vendors/bootstrap-icons/fonts/bootstrap-icons.woff2
vendored
Normal file
Binary file not shown.
@ -183,7 +183,7 @@
|
|||||||
"you-can-change-this-field-when-save-the-current-changes": "You can change this field when you save the current changes.",
|
"you-can-change-this-field-when-save-the-current-changes": "You can change this field when you save the current changes.",
|
||||||
"items-per-page": "Items per page",
|
"items-per-page": "Items per page",
|
||||||
"invite-a-friend-to-collaborate-on-your-site": "Invite a friend to collaborate on your site",
|
"invite-a-friend-to-collaborate-on-your-site": "Invite a friend to collaborate on your site",
|
||||||
"number-of-items-to-show-per-page": "Number of items to show per page.",
|
"number-of-items-to-show-per-page": "Number of items to show per page, -1 means all items.",
|
||||||
"website-or-blog": "Website or Blog",
|
"website-or-blog": "Website or Blog",
|
||||||
"order-content-by": "Order content by",
|
"order-content-by": "Order content by",
|
||||||
"edit-or-delete-content-from-your-site": "Edit or delete content from your site",
|
"edit-or-delete-content-from-your-site": "Edit or delete content from your site",
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
14
bl-plugins/alternative/languages/de_AT.json
Normal file
14
bl-plugins/alternative/languages/de_AT.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Theme Popeye",
|
||||||
|
"description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.",
|
||||||
|
"relative": "Relativ",
|
||||||
|
"absolute": "Absolut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.",
|
||||||
|
"show-tags": "Schlagwörter zeigen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge."
|
||||||
|
}
|
14
bl-plugins/alternative/languages/de_CH.json
Normal file
14
bl-plugins/alternative/languages/de_CH.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Theme Popeye",
|
||||||
|
"description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.",
|
||||||
|
"relative": "Relativ",
|
||||||
|
"absolute": "Absolut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.",
|
||||||
|
"show-tags": "Schlagwörter zeigen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge."
|
||||||
|
}
|
14
bl-plugins/alternative/languages/de_DE.json
Normal file
14
bl-plugins/alternative/languages/de_DE.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Theme Popeye",
|
||||||
|
"description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.",
|
||||||
|
"relative": "Relativ",
|
||||||
|
"absolute": "Absolut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.",
|
||||||
|
"show-tags": "Schlagwörter zeigen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge."
|
||||||
|
}
|
13
bl-plugins/alternative/languages/en.json
Normal file
13
bl-plugins/alternative/languages/en.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"plugin-data": {
|
||||||
|
"name": "Alternative Theme",
|
||||||
|
"description": "This plugin provides configuration for the Alternative theme."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Enable or disable dark mode.",
|
||||||
|
"enable-or-disable-google-fonts": "Enable or disable Google fonts.",
|
||||||
|
"relative": "Relative",
|
||||||
|
"absolute": "Absolute",
|
||||||
|
"change-the-date-format-for-the-main-page": "Change the date format for the main page.",
|
||||||
|
"show-tags": "Show tags",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Show tags on the main page for each article."
|
||||||
|
}
|
14
bl-plugins/alternative/languages/ja_JP.json
Normal file
14
bl-plugins/alternative/languages/ja_JP.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye Theme",
|
||||||
|
"description": "Popeyeテーマの設定を行うプラグインです。"
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "ダークモードを有効または無効にします。",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fontsの利用を有効または無効にします。",
|
||||||
|
"relative": "相対的",
|
||||||
|
"absolute": "絶対的",
|
||||||
|
"change-the-date-format-for-the-main-page": "メインページの日付表示形式を変更します。",
|
||||||
|
"show-tags": "タグの表示",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "メインページの各記事にタグを表示します。"
|
||||||
|
}
|
14
bl-plugins/alternative/languages/nl_NL.json
Normal file
14
bl-plugins/alternative/languages/nl_NL.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye Thema",
|
||||||
|
"description": "Met deze plugin kan het thema Popeye geconfigureerd worden."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Donkere modus in-/uitschakelen.",
|
||||||
|
"enable-or-disable-google-fonts": "Lettertypes van Google in-/uitschakelen.",
|
||||||
|
"relative": "Relatief",
|
||||||
|
"absolute": "Absoluut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Het datumformaat voor de hoofdpagina aanpassen.",
|
||||||
|
"show-tags": "Tags tonen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Op de hoofdpagina voor ieder artikel de tags tonen."
|
||||||
|
}
|
11
bl-plugins/alternative/metadata.json
Normal file
11
bl-plugins/alternative/metadata.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"author": "Bludit",
|
||||||
|
"email": "",
|
||||||
|
"website": "https://plugins.bludit.com",
|
||||||
|
"version": "3.15.0",
|
||||||
|
"releaseDate": "2023-07-10",
|
||||||
|
"license": "MIT",
|
||||||
|
"compatible": "3.15.0",
|
||||||
|
"notes": "",
|
||||||
|
"type": "theme"
|
||||||
|
}
|
65
bl-plugins/alternative/plugin.php
Normal file
65
bl-plugins/alternative/plugin.php
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class alternative extends Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->dbFields = array(
|
||||||
|
'googleFonts' => false,
|
||||||
|
'showPostInformation' => false,
|
||||||
|
'dateFormat' => 'relative'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function form()
|
||||||
|
{
|
||||||
|
global $L;
|
||||||
|
|
||||||
|
$html = '';
|
||||||
|
|
||||||
|
$html .= '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="googleFonts">' . $L->get('Google Fonts') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="googleFonts" name="googleFonts">';
|
||||||
|
$html .= '<option value="false" ' . ($this->getValue('googleFonts') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
|
$html .= '<option value="true" ' . ($this->getValue('googleFonts') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '<div class="form-text">' . $L->get('Enable or disable Google fonts.') . '</div>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="showPostInformation">' . $L->get('Show Post Information') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="showPostInformation" name="showPostInformation">';
|
||||||
|
$html .= '<option value="false" ' . ($this->getValue('showPostInformation') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
|
$html .= '<option value="true" ' . ($this->getValue('showPostInformation') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="dateFormat">' . $L->get('Date format') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="dateFormat" name="dateFormat">';
|
||||||
|
$html .= '<option value="noshow" ' . ($this->getValue('dateFormat') == 'noshow' ? 'selected' : '') . '>' . $L->get('No show') . '</option>';
|
||||||
|
$html .= '<option value="relative" ' . ($this->getValue('dateFormat') == 'relative' ? 'selected' : '') . '>' . $L->get('Relative') . '</option>';
|
||||||
|
$html .= '<option value="absolute" ' . ($this->getValue('dateFormat') == 'absolute' ? 'selected' : '') . '>' . $L->get('Absolute') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '<div class="form-text">' . $L->get('Change the date format for the main page.') . '</div>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showPostInformation()
|
||||||
|
{
|
||||||
|
return $this->getValue('showPostInformation');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function googleFonts()
|
||||||
|
{
|
||||||
|
return $this->getValue('googleFonts');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dateFormat()
|
||||||
|
{
|
||||||
|
return $this->getValue('dateFormat');
|
||||||
|
}
|
||||||
|
}
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
900
bl-plugins/easymde/css/easymde.min.css
vendored
900
bl-plugins/easymde/css/easymde.min.css
vendored
File diff suppressed because one or more lines are too long
4
bl-plugins/easymde/js/easymde.min.js
vendored
4
bl-plugins/easymde/js/easymde.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2,9 +2,9 @@
|
|||||||
"author": "EasyMDE",
|
"author": "EasyMDE",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://easymde.tk",
|
"website": "https://easymde.tk",
|
||||||
"version": "2.12.0",
|
"version": "2.18.0",
|
||||||
"releaseDate": "2020-09-29",
|
"releaseDate": "2022-09-20",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
14
bl-plugins/popeye/languages/de_AT.json
Normal file
14
bl-plugins/popeye/languages/de_AT.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Theme Popeye",
|
||||||
|
"description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.",
|
||||||
|
"relative": "Relativ",
|
||||||
|
"absolute": "Absolut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.",
|
||||||
|
"show-tags": "Schlagwörter zeigen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge."
|
||||||
|
}
|
14
bl-plugins/popeye/languages/de_CH.json
Normal file
14
bl-plugins/popeye/languages/de_CH.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Theme Popeye",
|
||||||
|
"description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.",
|
||||||
|
"relative": "Relativ",
|
||||||
|
"absolute": "Absolut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.",
|
||||||
|
"show-tags": "Schlagwörter zeigen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge."
|
||||||
|
}
|
14
bl-plugins/popeye/languages/de_DE.json
Normal file
14
bl-plugins/popeye/languages/de_DE.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Theme Popeye",
|
||||||
|
"description": "Das Plugin erlaubt verschiedene Einstellungen für das Theme Popeye."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Dunkelmodus aktivieren oder deaktivieren.",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fonts aktivieren oder deaktivieren.",
|
||||||
|
"relative": "Relativ",
|
||||||
|
"absolute": "Absolut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Einstellung des Datumsformats auf der Haupt- oder Blogseite.",
|
||||||
|
"show-tags": "Schlagwörter zeigen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Zeigt auf der Haupt- oder Blogseite die Schlagwörter der Beiträge."
|
||||||
|
}
|
13
bl-plugins/popeye/languages/en.json
Normal file
13
bl-plugins/popeye/languages/en.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"plugin-data": {
|
||||||
|
"name": "Popeye Theme",
|
||||||
|
"description": "This plugin provides configuration for the Popeye theme."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Enable or disable dark mode.",
|
||||||
|
"enable-or-disable-google-fonts": "Enable or disable Google fonts.",
|
||||||
|
"relative": "Relative",
|
||||||
|
"absolute": "Absolute",
|
||||||
|
"change-the-date-format-for-the-main-page": "Change the date format for the main page.",
|
||||||
|
"show-tags": "Show tags",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Show tags on the main page for each article."
|
||||||
|
}
|
14
bl-plugins/popeye/languages/ja_JP.json
Normal file
14
bl-plugins/popeye/languages/ja_JP.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye Theme",
|
||||||
|
"description": "Popeyeテーマの設定を行うプラグインです。"
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "ダークモードを有効または無効にします。",
|
||||||
|
"enable-or-disable-google-fonts": "Google Fontsの利用を有効または無効にします。",
|
||||||
|
"relative": "相対的",
|
||||||
|
"absolute": "絶対的",
|
||||||
|
"change-the-date-format-for-the-main-page": "メインページの日付表示形式を変更します。",
|
||||||
|
"show-tags": "タグの表示",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "メインページの各記事にタグを表示します。"
|
||||||
|
}
|
14
bl-plugins/popeye/languages/nl_NL.json
Normal file
14
bl-plugins/popeye/languages/nl_NL.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye Thema",
|
||||||
|
"description": "Met deze plugin kan het thema Popeye geconfigureerd worden."
|
||||||
|
},
|
||||||
|
"enable-or-disable-dark-mode": "Donkere modus in-/uitschakelen.",
|
||||||
|
"enable-or-disable-google-fonts": "Lettertypes van Google in-/uitschakelen.",
|
||||||
|
"relative": "Relatief",
|
||||||
|
"absolute": "Absoluut",
|
||||||
|
"change-the-date-format-for-the-main-page": "Het datumformaat voor de hoofdpagina aanpassen.",
|
||||||
|
"show-tags": "Tags tonen",
|
||||||
|
"show-tags-in-the-main-page-for-each-article": "Op de hoofdpagina voor ieder artikel de tags tonen."
|
||||||
|
}
|
11
bl-plugins/popeye/metadata.json
Normal file
11
bl-plugins/popeye/metadata.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"author": "Bludit",
|
||||||
|
"email": "",
|
||||||
|
"website": "https://plugins.bludit.com",
|
||||||
|
"version": "3.15.0",
|
||||||
|
"releaseDate": "2023-07-10",
|
||||||
|
"license": "MIT",
|
||||||
|
"compatible": "3.15.0",
|
||||||
|
"notes": "",
|
||||||
|
"type": "theme"
|
||||||
|
}
|
78
bl-plugins/popeye/plugin.php
Normal file
78
bl-plugins/popeye/plugin.php
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class popeye extends Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
$this->dbFields = array(
|
||||||
|
'googleFonts' => true,
|
||||||
|
'darkMode' => true,
|
||||||
|
'dateFormat' => 'relative',
|
||||||
|
'showTags' => true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function form()
|
||||||
|
{
|
||||||
|
global $L;
|
||||||
|
|
||||||
|
$html = '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="darkMode">' . $L->get('Dark Mode') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="darkMode" name="darkMode">';
|
||||||
|
$html .= '<option value="true" ' . ($this->getValue('darkMode') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
|
$html .= '<option value="false" ' . ($this->getValue('darkMode') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '<div class="form-text">' . $L->get('Enable or disable dark mode.') . '</div>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="googleFonts">' . $L->get('Google Fonts') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="googleFonts" name="googleFonts">';
|
||||||
|
$html .= '<option value="true" ' . ($this->getValue('googleFonts') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
|
$html .= '<option value="false" ' . ($this->getValue('googleFonts') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '<div class="form-text">' . $L->get('Enable or disable Google fonts.') . '</div>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="dateFormat">' . $L->get('Date format') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="dateFormat" name="dateFormat">';
|
||||||
|
$html .= '<option value="relative" ' . ($this->getValue('dateFormat') == 'relative' ? 'selected' : '') . '>' . $L->get('Relative') . '</option>';
|
||||||
|
$html .= '<option value="absolute" ' . ($this->getValue('dateFormat') == 'absolute' ? 'selected' : '') . '>' . $L->get('Absolute') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '<div class="form-text">' . $L->get('Change the date format for the main page.') . '</div>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
$html .= '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="showTags">' . $L->get('Show tags') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="showTags" name="showTags">';
|
||||||
|
$html .= '<option value="true" ' . ($this->getValue('showTags') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
|
$html .= '<option value="false" ' . ($this->getValue('showTags') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '<div class="form-text">' . $L->get('Show tags in the main page for each article.') . '</div>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function darkMode()
|
||||||
|
{
|
||||||
|
return $this->getValue('darkMode');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function googleFonts()
|
||||||
|
{
|
||||||
|
return $this->getValue('googleFonts');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dateFormat()
|
||||||
|
{
|
||||||
|
return $this->getValue('dateFormat');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showTags()
|
||||||
|
{
|
||||||
|
return $this->getValue('showTags');
|
||||||
|
}
|
||||||
|
}
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com/plugin/remote-content",
|
"website": "https://plugins.bludit.com/plugin/remote-content",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://plugins.bludit.com",
|
"website": "https://plugins.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class pluginVersion extends Plugin {
|
class pluginVersion extends Plugin
|
||||||
|
{
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->dbFields = array(
|
$this->dbFields = array(
|
||||||
'showCurrentVersion'=>true,
|
'showCurrentVersion' => true,
|
||||||
'newVersionAlert'=>true
|
'newVersionAlert' => true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,23 +15,19 @@ class pluginVersion extends Plugin {
|
|||||||
{
|
{
|
||||||
global $L;
|
global $L;
|
||||||
|
|
||||||
$html = '<div class="alert alert-primary" role="alert">';
|
$html = '<div>';
|
||||||
$html .= $this->description();
|
$html .= '<label>' . $L->get('Show current version in the sidebar') . '</label>';
|
||||||
$html .= '</div>';
|
|
||||||
|
|
||||||
$html .= '<div>';
|
|
||||||
$html .= '<label>'.$L->get('Show current version in the sidebar').'</label>';
|
|
||||||
$html .= '<select name="showCurrentVersion">';
|
$html .= '<select name="showCurrentVersion">';
|
||||||
$html .= '<option value="true" '.($this->getValue('showCurrentVersion')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
$html .= '<option value="true" ' . ($this->getValue('showCurrentVersion') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
$html .= '<option value="false" '.($this->getValue('showCurrentVersion')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
$html .= '<option value="false" ' . ($this->getValue('showCurrentVersion') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
$html .= '</select>';
|
$html .= '</select>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
$html .= '<div>';
|
$html .= '<div>';
|
||||||
$html .= '<label>'.$L->get('Show alert when there is a new version in the sidebar').'</label>';
|
$html .= '<label>' . $L->get('Show alert when there is a new version in the sidebar') . '</label>';
|
||||||
$html .= '<select name="newVersionAlert">';
|
$html .= '<select name="newVersionAlert">';
|
||||||
$html .= '<option value="true" '.($this->getValue('newVersionAlert')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
$html .= '<option value="true" ' . ($this->getValue('newVersionAlert') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
$html .= '<option value="false" '.($this->getValue('newVersionAlert')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
$html .= '<option value="false" ' . ($this->getValue('newVersionAlert') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
$html .= '</select>';
|
$html .= '</select>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
|
|
||||||
@ -42,10 +39,10 @@ class pluginVersion extends Plugin {
|
|||||||
global $L;
|
global $L;
|
||||||
$html = '';
|
$html = '';
|
||||||
if ($this->getValue('showCurrentVersion')) {
|
if ($this->getValue('showCurrentVersion')) {
|
||||||
$html = '<a class="current-version" class="nav-link" href="'.HTML_PATH_ADMIN_ROOT.'about'.'"><span class="fa fa-info"></span> '.$L->get('Version').' '.(defined('BLUDIT_PRO')?'<span class="fa fa-heart" style="color: #ffc107"></span>':'').'<span class="badge badge-warning badge-pill">'.BLUDIT_VERSION.'</span></a>';
|
$html = '<a id="current-version" class="nav-link" href="' . HTML_PATH_ADMIN_ROOT . 'about' . '">' . $L->get('Version') . ' ' . (defined('BLUDIT_PRO') ? '<span class="bi-heart" style="color: #ffc107"></span>' : '') . '<span class="badge bg-warning rounded-pill">' . BLUDIT_VERSION . '</span></a>';
|
||||||
}
|
}
|
||||||
if ($this->getValue('newVersionAlert')) {
|
if ($this->getValue('newVersionAlert')) {
|
||||||
$html .= '<a class="new-version" style="display: none;" target="_blank" href="https://www.bludit.com"><span class="fa fa-bell" style="color: red"></span> '.$L->get('New version available').'</a>';
|
$html .= '<a id="new-version" style="display: none;" target="_blank" href="https://www.bludit.com">' . $L->get('New version available') . ' <span class="bi-bell" style="color: red"></span></a>';
|
||||||
}
|
}
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
1
bl-plugins/visits-stats/css/chart.min.css
vendored
Normal file
1
bl-plugins/visits-stats/css/chart.min.css
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}
|
7
bl-plugins/visits-stats/js/chart.bundle.min.js
vendored
Normal file
7
bl-plugins/visits-stats/js/chart.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
bl-plugins/visits-stats/languages/de_AT.json
Normal file
11
bl-plugins/visits-stats/languages/de_AT.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Statistik",
|
||||||
|
"description": "Zeigt die Anzahl der Seitenaufrufe und der Besucher im Dashboard."
|
||||||
|
},
|
||||||
|
"visits": "Seitenaufrufe",
|
||||||
|
"visitors": "Besucher",
|
||||||
|
"unique-visitors": "Eindeutige Besucher",
|
||||||
|
"exclude-administrators-users" : "Benutzer mit der Rolle 'Administrator' ausschliessen"
|
||||||
|
}
|
11
bl-plugins/visits-stats/languages/de_CH.json
Normal file
11
bl-plugins/visits-stats/languages/de_CH.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Statistik",
|
||||||
|
"description": "Zeigt die Anzahl der Seitenaufrufe und der Besucher im Dashboard."
|
||||||
|
},
|
||||||
|
"visits": "Seitenaufrufe",
|
||||||
|
"visitors": "Besucher",
|
||||||
|
"unique-visitors": "Eindeutige Besucher",
|
||||||
|
"exclude-administrators-users" : "Benutzer mit der Rolle 'Administrator' ausschliessen"
|
||||||
|
}
|
11
bl-plugins/visits-stats/languages/de_DE.json
Normal file
11
bl-plugins/visits-stats/languages/de_DE.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Statistik",
|
||||||
|
"description": "Zeigt die Anzahl der Seitenaufrufe und der Besucher im Dashboard."
|
||||||
|
},
|
||||||
|
"visits": "Seitenaufrufe",
|
||||||
|
"visitors": "Besucher",
|
||||||
|
"unique-visitors": "Eindeutige Besucher",
|
||||||
|
"exclude-administrators-users" : "Benutzer mit der Rolle 'Administrator' ausschliessen"
|
||||||
|
}
|
11
bl-plugins/visits-stats/languages/en.json
Normal file
11
bl-plugins/visits-stats/languages/en.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Visits Stats",
|
||||||
|
"description": "Shows the number of visits and unique visitors in the dashboard."
|
||||||
|
},
|
||||||
|
"visits": "Visits",
|
||||||
|
"visitors": "Visitors",
|
||||||
|
"unique-visitors": "Unique visitors",
|
||||||
|
"exclude-administrators-users" : "Exclude users with role 'Administrator'"
|
||||||
|
}
|
11
bl-plugins/visits-stats/languages/ja_JP.json
Normal file
11
bl-plugins/visits-stats/languages/ja_JP.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Visits Stats",
|
||||||
|
"description": "ダッシュボードに訪問者数とユニーク訪問者数を表示します。"
|
||||||
|
},
|
||||||
|
"visits": "訪問者",
|
||||||
|
"visitors": "訪問者数",
|
||||||
|
"unique-visitors": "ユニーク訪問者数",
|
||||||
|
"exclude-administrators-users" : "管理者グループのユーザーを除外する"
|
||||||
|
}
|
11
bl-plugins/visits-stats/languages/nl_NL.json
Normal file
11
bl-plugins/visits-stats/languages/nl_NL.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"plugin-data":
|
||||||
|
{
|
||||||
|
"name": "Bezoekersstatistieken",
|
||||||
|
"description": "Toont het aantal bezoeken en unieke bezoekers in het dashboard."
|
||||||
|
},
|
||||||
|
"visits": "Bezoeken",
|
||||||
|
"visitors": "Bezoekers",
|
||||||
|
"unique-visitors": "Unieke bezoekers",
|
||||||
|
"exclude-administrators-users" : "Gebruikers met de rol 'Beheerder' uitsluiten"
|
||||||
|
}
|
10
bl-plugins/visits-stats/metadata.json
Normal file
10
bl-plugins/visits-stats/metadata.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"author": "Bludit",
|
||||||
|
"email": "",
|
||||||
|
"website": "https://plugins.bludit.com",
|
||||||
|
"version": "3.15.0",
|
||||||
|
"releaseDate": "2023-07-15",
|
||||||
|
"license": "MIT",
|
||||||
|
"compatible": "3.15.0",
|
||||||
|
"notes": ""
|
||||||
|
}
|
187
bl-plugins/visits-stats/plugin.php
Normal file
187
bl-plugins/visits-stats/plugin.php
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class pluginVisitsStats extends Plugin
|
||||||
|
{
|
||||||
|
|
||||||
|
private $loadOnViews = array(
|
||||||
|
'dashboard' // Load this plugin only in the Dashboard
|
||||||
|
);
|
||||||
|
|
||||||
|
public function init()
|
||||||
|
{
|
||||||
|
global $L;
|
||||||
|
$this->dbFields = array(
|
||||||
|
'label' => $L->g('Visits'),
|
||||||
|
'excludeAdmins' => false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function adminHead()
|
||||||
|
{
|
||||||
|
if (!in_array($GLOBALS['ADMIN_VIEW'], $this->loadOnViews)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$html = $this->includeCSS('chart.min.css');
|
||||||
|
$html .= $this->includeJS('chart.bundle.min.js');
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dashboard()
|
||||||
|
{
|
||||||
|
global $L;
|
||||||
|
$label = $this->getValue('label');
|
||||||
|
|
||||||
|
$currentDate = Date::current('Y-m-d');
|
||||||
|
$visitsToday = $this->visits($currentDate);
|
||||||
|
$uniqueVisitors = $this->uniqueVisitors($currentDate);
|
||||||
|
|
||||||
|
$numberOfDays = 6;
|
||||||
|
for ($i = $numberOfDays; $i >= 0; $i--) {
|
||||||
|
$dateWithOffset = Date::currentOffset('Y-m-d', '-' . $i . ' day');
|
||||||
|
$visits[$i] = $this->visits($dateWithOffset);
|
||||||
|
$unique[$i] = $this->uniqueVisitors($dateWithOffset);
|
||||||
|
$days[$i] = Date::format($dateWithOffset, 'Y-m-d', 'D');
|
||||||
|
}
|
||||||
|
|
||||||
|
$labels = "'" . implode("','", $days) . "'";
|
||||||
|
$seriesVisits = implode(',', $visits);
|
||||||
|
$seriesVisitors = implode(',', $unique);
|
||||||
|
|
||||||
|
$labelVisits = $L->g('Visits');
|
||||||
|
$labelVisitors = $L->g('Visitors');
|
||||||
|
|
||||||
|
return <<<EOF
|
||||||
|
<div class="pluginVisitsStats mt-4 mb-4 pb-4 border-bottom">
|
||||||
|
<h3 class="m-0 p-0"><i class="bi bi-bar-chart"></i>$label</h3>
|
||||||
|
<canvas id="visits-stats"></canvas>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var ctx = document.getElementById('visits-stats');
|
||||||
|
new Chart(ctx, {
|
||||||
|
type: 'bar',
|
||||||
|
data: {
|
||||||
|
labels: [$labels],
|
||||||
|
datasets: [{
|
||||||
|
backgroundColor: 'rgb(13,110,253)',
|
||||||
|
borderColor: 'rgb(13,110,253)',
|
||||||
|
label: '$labelVisitors',
|
||||||
|
data: [$seriesVisitors]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
backgroundColor: 'rgb(255, 193, 3)',
|
||||||
|
borderColor: 'rgb(255, 193, 3)',
|
||||||
|
label: '$labelVisits',
|
||||||
|
data: [$seriesVisits]
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
scales: {
|
||||||
|
yAxes: [{
|
||||||
|
ticks: {
|
||||||
|
beginAtZero: true,
|
||||||
|
stepSize: 1
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
EOF;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Plugin form for settings
|
||||||
|
public function form()
|
||||||
|
{
|
||||||
|
global $L;
|
||||||
|
|
||||||
|
$html = '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="label">' . $L->get('Label') . '</label>';
|
||||||
|
$html .= '<input class="form-control" id="label" name="label" type="text" value="' . $this->getValue('label') . '">';
|
||||||
|
$html .= '<div class="form-text">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';
|
||||||
|
$html .= '</div>';
|
||||||
|
|
||||||
|
if (defined('BLUDIT_PRO')) {
|
||||||
|
$html .= '<div class="mb-3">';
|
||||||
|
$html .= '<label class="form-label" for="excludeAdmins">' . $L->get('Exclude administrators users') . '</label>';
|
||||||
|
$html .= '<select class="form-select" id="excludeAdmins" name="excludeAdmins">';
|
||||||
|
$html .= '<option value="true" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||||
|
$html .= '<option value="false" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||||
|
$html .= '</select>';
|
||||||
|
$html .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $html;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function siteBodyEnd()
|
||||||
|
{
|
||||||
|
$this->addVisitor();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete old logs
|
||||||
|
public function deleteOldLogs()
|
||||||
|
{
|
||||||
|
$logs = Filesystem::listFiles($this->workspace(), '*', 'log', true);
|
||||||
|
// Keep only 7 days of logs
|
||||||
|
$remove = array_slice($logs, 7);
|
||||||
|
foreach ($remove as $log) {
|
||||||
|
Filesystem::rmfile($log);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the number of visits by date
|
||||||
|
public function visits($date)
|
||||||
|
{
|
||||||
|
$file = $this->workspace() . $date . '.log';
|
||||||
|
$handle = @fopen($file, 'rb');
|
||||||
|
if ($handle === false) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The amount of visits are the number of lines on the file
|
||||||
|
$lines = 0;
|
||||||
|
while (!feof($handle)) {
|
||||||
|
$lines += substr_count(fread($handle, 8192), PHP_EOL);
|
||||||
|
}
|
||||||
|
@fclose($handle);
|
||||||
|
return $lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the number of unique visitors by date
|
||||||
|
public function uniqueVisitors($date)
|
||||||
|
{
|
||||||
|
$file = $this->workspace() . $date . '.log';
|
||||||
|
$lines = @file($file);
|
||||||
|
if (empty($lines)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$tmp = array();
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
$data = json_decode($line);
|
||||||
|
$hashIP = $data[0];
|
||||||
|
$tmp[$hashIP] = true;
|
||||||
|
}
|
||||||
|
return count($tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add a line to the current log
|
||||||
|
// The line is a json array with the hash IP of the visitor and the time
|
||||||
|
public function addVisitor()
|
||||||
|
{
|
||||||
|
if (Cookie::get('BLUDIT-KEY') && defined('BLUDIT_PRO') && $this->getValue('excludeAdmins')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$currentTime = Date::current('Y-m-d H:i:s');
|
||||||
|
$ip = TCP::getIP();
|
||||||
|
$hashIP = md5($ip);
|
||||||
|
|
||||||
|
$line = json_encode(array($hashIP, $currentTime));
|
||||||
|
$currentDate = Date::current('Y-m-d');
|
||||||
|
$logFile = $this->workspace() . $currentDate . '.log';
|
||||||
|
|
||||||
|
return file_put_contents($logFile, $line . PHP_EOL, FILE_APPEND | LOCK_EX) !== false;
|
||||||
|
}
|
||||||
|
}
|
@ -18,7 +18,8 @@ img {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre, code {
|
pre,
|
||||||
|
code {
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
@ -56,7 +57,8 @@ tr {
|
|||||||
border-color: inherit;
|
border-color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
th,
|
||||||
|
td {
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,10 +68,14 @@ h2.title {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
margin: 0 0 20px 20px;
|
margin: 0 0 20px 20px;
|
||||||
border-left: 5px solid #eee;
|
border-left: 5px solid #eee;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bi {
|
||||||
|
margin-right: .5rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -111,7 +117,8 @@ header.welcome {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Home - Page */
|
/* Home - Page */
|
||||||
section.home-page:nth-child(even) { /* Alternate the background color */
|
section.home-page:nth-child(even) {
|
||||||
|
/* Alternate the background color */
|
||||||
background: #FAFAFA;
|
background: #FAFAFA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,15 +134,17 @@ section.home-page:nth-child(even) { /* Alternate the background color */
|
|||||||
|
|
||||||
/* VIDEO EMBED RESPONSIVE */
|
/* VIDEO EMBED RESPONSIVE */
|
||||||
.video-embed {
|
.video-embed {
|
||||||
overflow:hidden;
|
overflow: hidden;
|
||||||
padding-bottom: 56.25%; /* 16:9 */
|
padding-bottom: 56.25%;
|
||||||
position:relative;
|
/* 16:9 */
|
||||||
height:0;
|
position: relative;
|
||||||
|
height: 0;
|
||||||
}
|
}
|
||||||
.video-embed iframe{
|
|
||||||
left:0;
|
.video-embed iframe {
|
||||||
top:0;
|
left: 0;
|
||||||
height:100%;
|
top: 0;
|
||||||
width:100%;
|
height: 100%;
|
||||||
position:absolute;
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?php echo Theme::lang() ?>">
|
<html lang="<?php echo Theme::lang() ?>">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<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">
|
||||||
@ -17,34 +18,47 @@
|
|||||||
<!-- Include CSS Bootstrap file from Bludit Core -->
|
<!-- Include CSS Bootstrap file from Bludit Core -->
|
||||||
<?php echo Theme::cssBootstrap(); ?>
|
<?php echo Theme::cssBootstrap(); ?>
|
||||||
|
|
||||||
|
<!-- Include CSS Bootstrap ICONS file from Bludit Core -->
|
||||||
|
<?php echo Theme::cssBootstrapIcons(); ?>
|
||||||
|
|
||||||
<!-- Include CSS Styles from this theme -->
|
<!-- Include CSS Styles from this theme -->
|
||||||
<?php echo Theme::css('css/style.css'); ?>
|
<?php echo Theme::css('css/style.css'); ?>
|
||||||
|
|
||||||
|
<?php if ($themePlugin->googleFonts()) : ?>
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:sans,bold">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: "Open Sans", sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site head -->
|
<!-- Load Bludit Plugins: Site head -->
|
||||||
<?php Theme::plugins('siteHead'); ?>
|
<?php Theme::plugins('siteHead'); ?>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Site Body Begin -->
|
<!-- Load Bludit Plugins: Site Body Begin -->
|
||||||
<?php Theme::plugins('siteBodyBegin'); ?>
|
<?php Theme::plugins('siteBodyBegin'); ?>
|
||||||
|
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<?php include(THEME_DIR_PHP.'navbar.php'); ?>
|
<?php include(THEME_DIR_PHP . 'navbar.php'); ?>
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<?php
|
<?php
|
||||||
// $WHERE_AM_I variable detect where the user is browsing
|
// $WHERE_AM_I variable detect where the user is browsing
|
||||||
// If the user is watching a particular page the variable takes the value "page"
|
// If the user is watching a particular page the variable takes the value "page"
|
||||||
// If the user is watching the frontpage the variable takes the value "home"
|
// If the user is watching the frontpage the variable takes the value "home"
|
||||||
if ($WHERE_AM_I == 'page') {
|
if ($WHERE_AM_I == 'page') {
|
||||||
include(THEME_DIR_PHP.'page.php');
|
include(THEME_DIR_PHP . 'page.php');
|
||||||
} else {
|
} else {
|
||||||
include(THEME_DIR_PHP.'home.php');
|
include(THEME_DIR_PHP . 'home.php');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<?php include(THEME_DIR_PHP.'footer.php'); ?>
|
<?php include(THEME_DIR_PHP . 'footer.php'); ?>
|
||||||
|
|
||||||
<!-- Include Jquery file from Bludit Core -->
|
<!-- Include Jquery file from Bludit Core -->
|
||||||
<?php echo Theme::jquery(); ?>
|
<?php echo Theme::jquery(); ?>
|
||||||
@ -56,4 +70,5 @@
|
|||||||
<?php Theme::plugins('siteBodyEnd'); ?>
|
<?php Theme::plugins('siteBodyEnd'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
|
||||||
|
</html>
|
||||||
|
5
bl-themes/alternative/init.php
Normal file
5
bl-themes/alternative/init.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
|
if ($themePlugin == false) {
|
||||||
|
exit("To ensure proper functionality, the theme requires the Alternative plugin. Activate the plugin through the admin panel.");
|
||||||
|
}
|
@ -2,9 +2,10 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://themes.bludit.com",
|
"website": "https://themes.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-10",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15",
|
||||||
"notes": ""
|
"notes": "",
|
||||||
}
|
"plugin": "alternative"
|
||||||
|
}
|
||||||
|
@ -5,102 +5,108 @@
|
|||||||
<h1><?php echo $site->slogan(); ?></h1>
|
<h1><?php echo $site->slogan(); ?></h1>
|
||||||
|
|
||||||
<!-- Site description -->
|
<!-- Site description -->
|
||||||
<?php if ($site->description()): ?>
|
<?php if ($site->description()) : ?>
|
||||||
<p class="lead"><?php echo $site->description(); ?></p>
|
<p class="lead"><?php echo $site->description(); ?></p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Custom search form if the plugin "search" is enabled -->
|
<!-- Custom search form if the plugin "search" is enabled -->
|
||||||
<?php if (pluginActivated('pluginSearch')): ?>
|
<?php if (pluginActivated('pluginSearch')) : ?>
|
||||||
<div class="form-inline d-block">
|
<div class="form-inline d-block">
|
||||||
<input id="search-input" class="form-control mr-sm-2" type="search" placeholder="<?php $language->p('Search') ?>" aria-label="Search">
|
<input id="search-input" class="form-control mr-sm-2" type="search" placeholder="<?php $language->p('Search') ?>" aria-label="Search">
|
||||||
<button class="btn btn-outline-primary my-2 my-sm-0" type="button" onClick="searchNow()"><?php $language->p('Search') ?></button>
|
<button class="btn btn-outline-primary my-2 my-sm-0" type="button" onClick="searchNow()"><?php $language->p('Search') ?></button>
|
||||||
<script>
|
<script>
|
||||||
function searchNow() {
|
function searchNow() {
|
||||||
var searchURL = "<?php echo Theme::siteUrl(); ?>search/";
|
var searchURL = "<?php echo Theme::siteUrl(); ?>search/";
|
||||||
window.open(searchURL + document.getElementById("search-input").value, "_self");
|
window.open(searchURL + document.getElementById("search-input").value, "_self");
|
||||||
}
|
|
||||||
document.getElementById("search-input").onkeypress = function(e) {
|
|
||||||
if (!e) e = window.event;
|
|
||||||
var keyCode = e.keyCode || e.which;
|
|
||||||
if (keyCode == '13') {
|
|
||||||
searchNow();
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
document.getElementById("search-input").onkeypress = function(e) {
|
||||||
</script>
|
if (!e) e = window.event;
|
||||||
</div>
|
var keyCode = e.keyCode || e.which;
|
||||||
|
if (keyCode == '13') {
|
||||||
|
searchNow();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<?php if (empty($content)): ?>
|
<?php if (empty($content)) : ?>
|
||||||
<div class="text-center p-4">
|
<div class="text-center p-4">
|
||||||
<?php $language->p('No pages found') ?>
|
<?php $language->p('No pages found') ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Print all the content -->
|
<!-- Print all the content -->
|
||||||
<?php foreach ($content as $page): ?>
|
<?php foreach ($content as $page) : ?>
|
||||||
<section class="home-page">
|
<section class="home-page">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8 mx-auto">
|
<div class="col-lg-8 mx-auto">
|
||||||
<!-- Load Bludit Plugins: Page Begin -->
|
<!-- Load Bludit Plugins: Page Begin -->
|
||||||
<?php Theme::plugins('pageBegin'); ?>
|
<?php Theme::plugins('pageBegin'); ?>
|
||||||
|
|
||||||
<!-- Page title -->
|
<!-- Page title -->
|
||||||
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
|
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
|
||||||
<h2 class="title"><?php echo $page->title(); ?></h2>
|
<h2 class="title"><?php echo $page->title(); ?></h2>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Page description -->
|
<!-- Page description -->
|
||||||
<?php if ($page->description()): ?>
|
<?php if ($page->description()) : ?>
|
||||||
<p class="page-description"><?php echo $page->description(); ?></p>
|
<p class="page-description"><?php echo $page->description(); ?></p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Page content until the pagebreak -->
|
<!-- Page content until the pagebreak -->
|
||||||
<div>
|
<div>
|
||||||
<?php echo $page->contentBreak(); ?>
|
<?php echo $page->contentBreak(); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Shows "read more" button if necessary -->
|
||||||
|
<?php if ($page->readMore()) : ?>
|
||||||
|
<div class="text-right pt-3">
|
||||||
|
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $L->get('Read more'); ?></a>
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if ($themePlugin->dateFormat() == 'relative') : ?>
|
||||||
|
<small class="color-blue"><?php echo $page->relativeTime() ?></small>
|
||||||
|
<?php elseif ($themePlugin->dateFormat() == 'absolute') : ?>
|
||||||
|
<small class="color-blue"><?php echo $page->date() ?></small>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
|
<?php Theme::plugins('pageEnd'); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Shows "read more" button if necessary -->
|
|
||||||
<?php if ($page->readMore()): ?>
|
|
||||||
<div class="text-right pt-3">
|
|
||||||
<a class="btn btn-primary btn-sm" href="<?php echo $page->permalink(); ?>" role="button"><?php echo $L->get('Read more'); ?></a>
|
|
||||||
</div>
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
|
||||||
<?php Theme::plugins('pageEnd'); ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<!-- Pagination -->
|
<!-- Pagination -->
|
||||||
<?php if (Paginator::numberOfPages()>1): ?>
|
<?php if (Paginator::numberOfPages() > 1) : ?>
|
||||||
<nav class="paginator">
|
<nav class="paginator">
|
||||||
<ul class="pagination flex-wrap justify-content-center">
|
<ul class="pagination flex-wrap justify-content-center">
|
||||||
|
|
||||||
<!-- Previous button -->
|
<!-- Previous button -->
|
||||||
<?php if (Paginator::showPrev()): ?>
|
<?php if (Paginator::showPrev()) : ?>
|
||||||
<li class="page-item mr-2">
|
<li class="page-item mr-2">
|
||||||
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php echo $L->get('Previous'); ?></a>
|
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php echo $L->get('Previous'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- Home button -->
|
<!-- Home button -->
|
||||||
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
|
<li class="page-item <?php if (Paginator::currentPage() == 1) echo 'disabled' ?>">
|
||||||
<a class="page-link" href="<?php echo Theme::siteUrl() ?>"><?php echo $L->get('Home'); ?></a>
|
<a class="page-link" href="<?php echo Theme::siteUrl() ?>"><?php echo $L->get('Home'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Next button -->
|
<!-- Next button -->
|
||||||
<?php if (Paginator::showNext()): ?>
|
<?php if (Paginator::showNext()) : ?>
|
||||||
<li class="page-item ml-2">
|
<li class="page-item ml-2">
|
||||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> ►</a>
|
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> ►</a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
@ -8,21 +8,34 @@
|
|||||||
<!-- Page title -->
|
<!-- Page title -->
|
||||||
<h1 class="title"><?php echo $page->title(); ?></h1>
|
<h1 class="title"><?php echo $page->title(); ?></h1>
|
||||||
|
|
||||||
|
<?php if (!$page->isStatic() && !$url->notFound() && $themePlugin->showPostInformation()) : ?>
|
||||||
|
<div class="form-text mb-2">
|
||||||
|
<!-- Page creation time -->
|
||||||
|
<span class="pr-3"><i class="bi bi-calendar"></i><?php echo $page->date() ?></span>
|
||||||
|
|
||||||
|
<!-- Page reading time -->
|
||||||
|
<span class="pr-3"><i class="bi bi-clock"></i><?php echo $page->readingTime() . ' ' . $L->get('minutes') . ' ' . $L->g('read') ?></span>
|
||||||
|
|
||||||
|
<!-- Page author -->
|
||||||
|
<span><i class="bi bi-person"></i><?php echo $page->user('nickname') ?></span>
|
||||||
|
</div>
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Page description -->
|
<!-- Page description -->
|
||||||
<?php if ($page->description()): ?>
|
<?php if ($page->description()) : ?>
|
||||||
<p class="page-description"><?php echo $page->description(); ?></p>
|
<p class="page-description"><?php echo $page->description(); ?></p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Page cover image -->
|
<!-- Page cover image -->
|
||||||
<?php if ($page->coverImage()): ?>
|
<?php if ($page->coverImage()) : ?>
|
||||||
<div class="page-cover-image py-6 mb-4" style="background-image: url('<?php echo $page->coverImage(); ?>');">
|
<div class="page-cover-image py-6 mb-4" style="background-image: url('<?php echo $page->coverImage(); ?>');">
|
||||||
<div style="height: 300px;"></div>
|
<div style="height: 300px;"></div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<!-- Page content -->
|
<!-- Page content -->
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<?php echo $page->content(); ?>
|
<?php echo $page->content(); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
|
@ -19,7 +19,8 @@ img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pre, code {
|
pre,
|
||||||
|
code {
|
||||||
background: #f8f8f8;
|
background: #f8f8f8;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
@ -57,7 +58,8 @@ tr {
|
|||||||
border-color: inherit;
|
border-color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
th, td {
|
th,
|
||||||
|
td {
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,10 +69,10 @@ h2.title {
|
|||||||
}
|
}
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
margin: 0 0 20px 20px;
|
margin: 0 0 20px 20px;
|
||||||
border-left: 5px solid #eee;
|
border-left: 5px solid #eee;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Navbar */
|
/* Navbar */
|
||||||
@ -113,3 +115,7 @@ footer {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0 0 0 10px;
|
padding: 0 0 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bi {
|
||||||
|
margin-right: .5rem !important;
|
||||||
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"author": "Bludit",
|
"author": "Bludit",
|
||||||
"email": "",
|
"email": "",
|
||||||
"website": "https://themes.bludit.com",
|
"website": "https://themes.bludit.com",
|
||||||
"version": "3.14.1",
|
"version": "3.15.0",
|
||||||
"releaseDate": "2022-08-07",
|
"releaseDate": "2023-07-15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"compatible": "3.14.1",
|
"compatible": "3.15.0",
|
||||||
"notes": ""
|
"notes": ""
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
<!-- Include Bootstrap CSS file bootstrap.css -->
|
<!-- Include Bootstrap CSS file bootstrap.css -->
|
||||||
<?php echo Theme::cssBootstrap(); ?>
|
<?php echo Theme::cssBootstrap(); ?>
|
||||||
|
|
||||||
|
<!-- Include CSS Bootstrap ICONS file from Bludit Core -->
|
||||||
|
<?php echo Theme::cssBootstrapIcons(); ?>
|
||||||
|
|
||||||
<!-- Include CSS Styles from this theme -->
|
<!-- Include CSS Styles from this theme -->
|
||||||
<?php echo Theme::css('css/style.css'); ?>
|
<?php echo Theme::css('css/style.css'); ?>
|
||||||
|
|
||||||
|
@ -1,71 +1,74 @@
|
|||||||
<?php if (empty($content)): ?>
|
<?php if (empty($content)) : ?>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<?php $language->p('No pages found') ?>
|
<?php $language->p('No pages found') ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<?php foreach ($content as $page): ?>
|
<?php foreach ($content as $page) : ?>
|
||||||
<!-- Post -->
|
<!-- Post -->
|
||||||
<div class="card my-5 border-0">
|
<div class="card my-5 border-0">
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page Begin -->
|
<!-- Load Bludit Plugins: Page Begin -->
|
||||||
<?php Theme::plugins('pageBegin'); ?>
|
<?php Theme::plugins('pageBegin'); ?>
|
||||||
|
|
||||||
<!-- Cover image -->
|
<!-- Cover image -->
|
||||||
<?php if ($page->coverImage()): ?>
|
<?php if ($page->coverImage()) : ?>
|
||||||
<img class="card-img-top mb-3 rounded-0" alt="Cover Image" src="<?php echo $page->coverImage(); ?>"/>
|
<img class="card-img-top mb-3 rounded-0" alt="Cover Image" src="<?php echo $page->coverImage(); ?>" />
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
|
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
|
||||||
<h2 class="title"><?php echo $page->title(); ?></h2>
|
<h2 class="title"><?php echo $page->title(); ?></h2>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Creation date -->
|
<!-- Creation date -->
|
||||||
<h6 class="card-subtitle mb-3 text-muted"><?php echo $page->date(); ?> - <?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?></h6>
|
<h6 class="card-subtitle mt-1 mb-4 text-muted">
|
||||||
|
<i class="bi bi-calendar"></i><?php echo $page->date(); ?>
|
||||||
|
<i class="ml-3 bi bi-clock-history"></i><?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?>
|
||||||
|
</h6>
|
||||||
|
|
||||||
<!-- Breaked content -->
|
<!-- Breaked content -->
|
||||||
<?php echo $page->contentBreak(); ?>
|
<?php echo $page->contentBreak(); ?>
|
||||||
|
|
||||||
<!-- "Read more" button -->
|
<!-- "Read more" button -->
|
||||||
<?php if ($page->readMore()): ?>
|
<?php if ($page->readMore()) : ?>
|
||||||
<a href="<?php echo $page->permalink(); ?>"><?php echo $L->get('Read more'); ?></a>
|
<a href="<?php echo $page->permalink(); ?>"><?php echo $L->get('Read more'); ?></a>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Load Bludit Plugins: Page End -->
|
<!-- Load Bludit Plugins: Page End -->
|
||||||
<?php Theme::plugins('pageEnd'); ?>
|
<?php Theme::plugins('pageEnd'); ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|
||||||
<!-- Pagination -->
|
<!-- Pagination -->
|
||||||
<?php if (Paginator::numberOfPages()>1): ?>
|
<?php if (Paginator::numberOfPages() > 1) : ?>
|
||||||
<nav class="paginator">
|
<nav class="paginator">
|
||||||
<ul class="pagination flex-wrap">
|
<ul class="pagination flex-wrap">
|
||||||
|
|
||||||
<!-- Previous button -->
|
<!-- Previous button -->
|
||||||
<?php if (Paginator::showPrev()): ?>
|
<?php if (Paginator::showPrev()) : ?>
|
||||||
<li class="page-item mr-2">
|
<li class="page-item mr-2">
|
||||||
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php echo $L->get('Previous'); ?></a>
|
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>" tabindex="-1">◀ <?php echo $L->get('Previous'); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- Home button -->
|
<!-- Home button -->
|
||||||
<li class="page-item <?php if (Paginator::currentPage()==1) echo 'disabled' ?>">
|
<li class="page-item <?php if (Paginator::currentPage() == 1) echo 'disabled' ?>">
|
||||||
<a class="page-link" href="<?php echo Theme::siteUrl() ?>">Home</a>
|
<a class="page-link" href="<?php echo Theme::siteUrl() ?>">Home</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- Next button -->
|
<!-- Next button -->
|
||||||
<?php if (Paginator::showNext()): ?>
|
<?php if (Paginator::showNext()) : ?>
|
||||||
<li class="page-item ml-2">
|
<li class="page-item ml-2">
|
||||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> ►</a>
|
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?> ►</a>
|
||||||
</li>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
113
bl-themes/popeye/css/01-style.css
Executable file
113
bl-themes/popeye/css/01-style.css
Executable file
@ -0,0 +1,113 @@
|
|||||||
|
|
||||||
|
/* COMMON */
|
||||||
|
a {
|
||||||
|
color: #495057;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #0a58ca;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre, code {
|
||||||
|
color: #f8f8f8;
|
||||||
|
background-color: #495057;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 0.5em;
|
||||||
|
line-height: 1.4em;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
overflow-x: scroll;
|
||||||
|
padding: 1.6rem 2.2rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: 5px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* BOOTSTRAP */
|
||||||
|
.list-group-item {
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bi {
|
||||||
|
margin-right: .5rem!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:focus,
|
||||||
|
.form-control:focus,
|
||||||
|
.form-select:focus {
|
||||||
|
outline: none !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* PAGE */
|
||||||
|
section.page {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page .description {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page a {
|
||||||
|
color: #0a58ca;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page p {
|
||||||
|
margin-bottom: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page h1.page-title {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page h3 {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page h4 {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page h5 {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.page h2,
|
||||||
|
section.page h3,
|
||||||
|
section.page h4,
|
||||||
|
section.page h5 {
|
||||||
|
margin: 2rem 0 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* VIDEO EMBED RESPONSIVE */
|
||||||
|
.video-embed {
|
||||||
|
overflow:hidden;
|
||||||
|
padding-bottom: 56.25%; /* 16:9 */
|
||||||
|
position:relative;
|
||||||
|
height:0;
|
||||||
|
}
|
||||||
|
.video-embed iframe{
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
height:100%;
|
||||||
|
width:100%;
|
||||||
|
position:absolute;
|
||||||
|
}
|
20
bl-themes/popeye/css/02-helpers.css
Normal file
20
bl-themes/popeye/css/02-helpers.css
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* HELPERs */
|
||||||
|
.color-blue {
|
||||||
|
color: #0a58ca;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-light {
|
||||||
|
color: #495057;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bold {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.italic {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-gray {
|
||||||
|
background-color: #ececec;
|
||||||
|
}
|
50
bl-themes/popeye/css/99-darkmode.css
Normal file
50
bl-themes/popeye/css/99-darkmode.css
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
body {
|
||||||
|
background-color: #1C1C1E !important;
|
||||||
|
color: #b3b3b3 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #b3b3b3 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #e2e2e2 !important
|
||||||
|
}
|
||||||
|
|
||||||
|
a.badge:hover {
|
||||||
|
color: #999 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-text {
|
||||||
|
color: #989899 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-light {
|
||||||
|
background-color: #000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-blue {
|
||||||
|
color: #688bbd !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-primary {
|
||||||
|
color: #688bbd !important;
|
||||||
|
border-color: #688bbd !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-primary:hover {
|
||||||
|
background-color: #1C1C1E !important;
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-link {
|
||||||
|
color: #688bbd !important;
|
||||||
|
border-color: #688bbd !important;
|
||||||
|
background-color: #1C1C1E !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
background-color: #1C1C1E !important;
|
||||||
|
border-color: #302F33 !important;
|
||||||
|
color: #b3b3b3 !important;
|
||||||
|
}
|
BIN
bl-themes/popeye/img/favicon.png
Normal file
BIN
bl-themes/popeye/img/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
BIN
bl-themes/popeye/img/popeye.png
Normal file
BIN
bl-themes/popeye/img/popeye.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
87
bl-themes/popeye/index.php
Executable file
87
bl-themes/popeye/index.php
Executable file
@ -0,0 +1,87 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="<?php echo Theme::lang() ?>">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="generator" content="Bludit">
|
||||||
|
|
||||||
|
<!-- Generate <title>...</title> -->
|
||||||
|
<?php echo Theme::metaTagTitle(); ?>
|
||||||
|
|
||||||
|
<!-- Generate <meta name="description" content="..."> -->
|
||||||
|
<?php echo Theme::metaTagDescription(); ?>
|
||||||
|
|
||||||
|
<!-- Generate <link rel="icon" href="..."> -->
|
||||||
|
<?php echo Theme::favicon('img/favicon.png'); ?>
|
||||||
|
|
||||||
|
<!-- Include CSS Bootstrap file from Bludit Core -->
|
||||||
|
<?php echo Theme::cssBootstrap(); ?>
|
||||||
|
|
||||||
|
<!-- Include CSS Bootstrap ICONS file from Bludit Core -->
|
||||||
|
<?php echo Theme::cssBootstrapIcons(); ?>
|
||||||
|
|
||||||
|
<!-- Include CSS Styles -->
|
||||||
|
<?php
|
||||||
|
echo Theme::css(array(
|
||||||
|
'css/01-style.css',
|
||||||
|
'css/02-helpers.css'
|
||||||
|
));
|
||||||
|
|
||||||
|
# Apply the following CSS only for Dark Mode
|
||||||
|
if ($themePlugin->darkMode()) {
|
||||||
|
echo Theme::css(
|
||||||
|
'css/99-darkmode.css'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php if ($themePlugin->googleFonts()) : ?>
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:sans,bold">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: "Open Sans", sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<!-- Execute Bludit plugins for the hook "Site head" -->
|
||||||
|
<?php Theme::plugins('siteHead'); ?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Execute Bludit plugins for the hook "Site body begin" -->
|
||||||
|
<?php Theme::plugins('siteBodyBegin'); ?>
|
||||||
|
|
||||||
|
<!-- Navbar -->
|
||||||
|
<?php include(THEME_DIR_PHP . 'navbar.php'); ?>
|
||||||
|
|
||||||
|
<!-- Content -->
|
||||||
|
<?php
|
||||||
|
// $WHERE_AM_I variable provides where the user is browsing
|
||||||
|
// If the user is watching a particular page the variable takes the value "page"
|
||||||
|
// If the user is watching the frontpage the variable takes the value "home"
|
||||||
|
// If the user is watching a particular category the variable takes the value "category"
|
||||||
|
if ($WHERE_AM_I == 'page') {
|
||||||
|
include(THEME_DIR_PHP . 'page.php');
|
||||||
|
} else {
|
||||||
|
include(THEME_DIR_PHP . 'home.php');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<?php include(THEME_DIR_PHP . 'footer.php'); ?>
|
||||||
|
|
||||||
|
<!-- Include Jquery file from Bludit Core -->
|
||||||
|
<?php echo Theme::jquery(); ?>
|
||||||
|
|
||||||
|
<!-- Include javascript Bootstrap file from Bludit Core -->
|
||||||
|
<?php echo Theme::jsBootstrap(); ?>
|
||||||
|
|
||||||
|
<!-- Execute Bludit plugins for the hook "Site body end" -->
|
||||||
|
<?php Theme::plugins('siteBodyEnd'); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
5
bl-themes/popeye/init.php
Normal file
5
bl-themes/popeye/init.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||||
|
|
||||||
|
if ($themePlugin == false) {
|
||||||
|
exit("To ensure proper functionality, the theme requires the Popeye plugin. Activate the plugin through the admin panel.");
|
||||||
|
}
|
10
bl-themes/popeye/languages/de_AT.json
Normal file
10
bl-themes/popeye/languages/de_AT.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"theme-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"related-pages": "Verwandte Seiten",
|
||||||
|
"minutes": "Minuten",
|
||||||
|
"read": "Lesezeit"
|
||||||
|
}
|
10
bl-themes/popeye/languages/de_CH.json
Normal file
10
bl-themes/popeye/languages/de_CH.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"theme-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"related-pages": "Verwandte Seiten",
|
||||||
|
"minutes": "Minuten",
|
||||||
|
"read": "Lesezeit"
|
||||||
|
}
|
10
bl-themes/popeye/languages/de_DE.json
Normal file
10
bl-themes/popeye/languages/de_DE.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"theme-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"related-pages": "Verwandte Seiten",
|
||||||
|
"minutes": "Minuten",
|
||||||
|
"read": "Lesezeit"
|
||||||
|
}
|
10
bl-themes/popeye/languages/en.json
Normal file
10
bl-themes/popeye/languages/en.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"theme-data":
|
||||||
|
{
|
||||||
|
"name": "Popeye",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"related-pages": "Related pages",
|
||||||
|
"minutes": "minutes",
|
||||||
|
"read": "read"
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user