Media browser: recursive scan entire content/ tree, /-media/ URL prefix, editor change detection fix
- handleMediaList() now scans content/ recursively for all media files
- URLs use /-media/ prefix mapping directly to content/ (no special cases)
- index.php: added /-media/ route, kept /-assets/ for backward compat
- editor-toolbar.js: fixed editor.on('change') placement (was inside switchMode)
- content-edit.php and content-new.php: back-btn unsaved-changes detection
- Removed unused __editorCleanup global
This commit is contained in:
@@ -24,11 +24,6 @@ class HTMLBlock
|
||||
$currentLang = $this->api ? $this->api->getCurrentLanguage() : 'nl';
|
||||
|
||||
$content = '
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">' . $this->config['title'] . '</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="mb-2"><strong>Huidige pagina:</strong> ' . htmlspecialchars($currentPage) . '</p>
|
||||
<p class="mb-2"><strong>Taal:</strong> ' . strtoupper($currentLang) . '</p>
|
||||
<p class="mb-3"><strong>Homepage:</strong> ' . ($isHomepage ? 'Ja' : 'Nee') . '</p>';
|
||||
|
||||
@@ -31,6 +31,7 @@ class MQTTTracker
|
||||
$configFile = __DIR__ . '/config.json';
|
||||
$this->config = [
|
||||
'enabled' => true,
|
||||
'viewable' => false,
|
||||
'broker_host' => 'localhost',
|
||||
'broker_port' => 1883,
|
||||
'client_id' => 'codepress_cms',
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"enabled": true,
|
||||
"broker_host": "mqtt.prive.noorlander.info",
|
||||
"broker_port": 1883,
|
||||
"viewable": false,
|
||||
"broker_host": "mqtt.lan.noorlander.info",
|
||||
"broker_port": "1883",
|
||||
"client_id": "codepress_cms",
|
||||
"username": "",
|
||||
"password": "",
|
||||
@@ -10,6 +11,6 @@
|
||||
"track_pages": true,
|
||||
"track_performance": true,
|
||||
"track_user_flows": true,
|
||||
"session_timeout": 1800,
|
||||
"geoip_database_path": "/plugins/MQTTTracker/GeoLite2-Country.mmdb"
|
||||
}
|
||||
"session_timeout": "1800",
|
||||
"geoip_database_path": "\/plugins\/MQTTTracker\/GeoLite2-Country.mmdb"
|
||||
}
|
||||
3
plugins/test/README.md
Normal file
3
plugins/test/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# test
|
||||
|
||||
Dit is een test plugin
|
||||
3
plugins/test/config.json
Normal file
3
plugins/test/config.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"enabled": true
|
||||
}
|
||||
35
plugins/test/test.php
Normal file
35
plugins/test/test.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
class test
|
||||
{
|
||||
private ?CMSAPI $api = null;
|
||||
private array $config;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->config = [
|
||||
'title' => 'Dit is een test plugin',
|
||||
'viewable' => true,
|
||||
];
|
||||
}
|
||||
|
||||
public function setAPI(CMSAPI $api): void
|
||||
{
|
||||
$this->api = $api;
|
||||
}
|
||||
|
||||
public function getSidebarContent(): string
|
||||
{
|
||||
return 'Hallo';
|
||||
}
|
||||
|
||||
public function getConfig(): array
|
||||
{
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
public function setConfig(array $config): void
|
||||
{
|
||||
$this->config = array_merge($this->config, $config);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user