diff --git a/bl-kernel/admin/views/content.php b/bl-kernel/admin/views/content.php
index 468b2e91..c0188489 100644
--- a/bl-kernel/admin/views/content.php
+++ b/bl-kernel/admin/views/content.php
@@ -182,17 +182,17 @@ function table($type) {
- -
+
-
- -
+
-
- -
+
-
- -
+
-
diff --git a/bl-kernel/archives.class.php b/bl-kernel/archives.class.php
index 7fe60172..426b11ca 100644
--- a/bl-kernel/archives.class.php
+++ b/bl-kernel/archives.class.php
@@ -35,7 +35,7 @@ class Archives extends dbList {
if (isset($archiveIndex[$month])) {
array_push($archiveIndex[$month]['list'], $pageKey);
} else {
- $archiveIndex[$month]['name'] = $month;
+ $archiveIndex[$month]['name'] = Date::prettyArchiveDate($month);
$archiveIndex[$month]['list'] = array($pageKey);
}
}
diff --git a/bl-plugins/archive/languages/en.json b/bl-plugins/archive/languages/en.json
new file mode 100644
index 00000000..445df383
--- /dev/null
+++ b/bl-plugins/archive/languages/en.json
@@ -0,0 +1,7 @@
+{
+ "plugin-data":
+ {
+ "name": "Archives list",
+ "description": "Shows all archives on the sidebar."
+ }
+}
diff --git a/bl-plugins/archive/languages/fr_FR.json b/bl-plugins/archive/languages/fr_FR.json
new file mode 100644
index 00000000..ab51e88f
--- /dev/null
+++ b/bl-plugins/archive/languages/fr_FR.json
@@ -0,0 +1,9 @@
+{
+ "plugin-data":
+ {
+ "name": "Liste des archives",
+ "description": "Affiche tous les archives sur la barre latérale."
+ },
+ "monthly": "Mensuel",
+ "show-archives-by-months":"Afficher les archives par mois"
+}
diff --git a/bl-plugins/archive/metadata.json b/bl-plugins/archive/metadata.json
new file mode 100644
index 00000000..883c0bf5
--- /dev/null
+++ b/bl-plugins/archive/metadata.json
@@ -0,0 +1,11 @@
+{
+ "author": "Koblog",
+ "email": "",
+ "website": "https://plugins.koblog.com",
+ "version": "kb_0.0.1",
+ "releaseDate": "2025-01-25",
+ "license": "MIT",
+ "compatible": "kb_0.0.1",
+ "notes": "",
+ "type": "widget"
+}
diff --git a/bl-plugins/archive/plugin.php b/bl-plugins/archive/plugin.php
new file mode 100644
index 00000000..c8c43055
--- /dev/null
+++ b/bl-plugins/archive/plugin.php
@@ -0,0 +1,69 @@
+dbFields = array(
+ 'label' => 'Archives',
+ 'monthly' => false,
+ );
+ }
+
+ public function form()
+ {
+ global $L;
+
+ $html = '';
+ $html .= '';
+ $html .= '';
+ $html .= '' . $L->get('This title is almost always used in the sidebar of the site') . '';
+ $html .= '
';
+
+ echo Bootstrap::formCheckbox(array(
+ 'name' => 'monthly',
+ 'label' => $L->g('Monthly'),
+ 'labelForCheckbox' => $L->g('Show archives by months.'),
+ 'placeholder' => '',
+ 'checked' => $this->getValue('monthly'),
+ 'tip' => ""
+ ));
+
+ return $html;
+ }
+
+ public function siteSidebar()
+ {
+ global $L;
+ global $archives;
+ global $url;
+
+ $filter = $url->filters('archive');
+
+ $html = '';
+ $html .= '
' . $this->getValue('label') . '
';
+ $html .= '
';
+ $html .= '
';
+
+ // By default the database of tags are alphanumeric sorted
+ foreach ($archives->db as $key => $fields) {
+ if (
+ ($this->getValue('monthly') && strlen($key) != 4)
+ || (!$this->getValue('monthly') && strlen($key) == 4)
+ ) {
+ $html .= '- ';
+ $html .= '';
+ $html .= $fields['name'];
+ $html .= '';
+ $html .= '
';
+ }
+ }
+
+ $html .= '
';
+ $html .= '
';
+ $html .= '
';
+
+ return $html;
+ }
+}