-
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"hide-categories-without-content": "Skjul kategorier uden indhold",
|
||||
"plugin-data": {
|
||||
"description": "Viser alle kategorier på sidepanelet.",
|
||||
"name": "Categories"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Kategorien",
|
||||
"description": "Zeigt alle Kategorien in der Seitenleiste (bei Themes mit einer Seitenleiste)."
|
||||
},
|
||||
"hide-categories-without-content": "Kategorien ohne Inhalte ausblenden"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Kategorien",
|
||||
"description": "Zeigt alle Kategorien in der Seitenleiste (bei Themes mit einer Seitenleiste)."
|
||||
},
|
||||
"hide-categories-without-content": "Kategorien ohne Inhalte ausblenden"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Categories",
|
||||
"description": "Shows all categories on the sidebar."
|
||||
},
|
||||
"hide-categories-without-content": "Hide Categories without content"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Categorías",
|
||||
"description": "Muestra todas las categorías en la barra lateral."
|
||||
},
|
||||
"hide-categories-without-content": "Ocultar categorías sin contenido"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "مجموعه ها",
|
||||
"description": "نمایش تمام مجموعه ها در نوارکناری."
|
||||
},
|
||||
"hide-categories-without-content": "پنهان کردن مجموعه های خالی از محتوا"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Catégories",
|
||||
"description": "Affiche toutes les catégories sur la barre latérale."
|
||||
},
|
||||
"hide-categories-without-content": "Masquer les catégories sans contenu."
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Categorie",
|
||||
"description": "Visualizza tutte le categorie nella barra laterale."
|
||||
},
|
||||
"hide-categories-without-content": "Nascondi categorie senza contenuto"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Categories",
|
||||
"description": "サイドバーにすべてのカテゴリを表示します。"
|
||||
},
|
||||
"hide-categories-without-content": "コンテンツのないカテゴリを非表示にする"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Categorieën",
|
||||
"description": "Toont alle categorieën in de zijbalk."
|
||||
},
|
||||
"hide-categories-without-content": "Categorieën zonder inhoud verbergen"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Категории",
|
||||
"description": "Показывает все категории на боковой панели."
|
||||
},
|
||||
"hide-categories-without-content": "Скрывать пустые категории"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Kategoriler",
|
||||
"description": "Tüm kategorileri kenar çubuğunda göster."
|
||||
},
|
||||
"hide-categories-without-content": "İçeriksiz kategorileri gizle"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Категорії",
|
||||
"description": "Показує всі категорії на бічній панелі."
|
||||
},
|
||||
"hide-categories-without-content": "Сховати категорії без вмісту"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "3.22.0",
|
||||
"releaseDate": "2026-05-10",
|
||||
"license": "MIT",
|
||||
"compatible": "3.22",
|
||||
"notes": ""
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
class pluginCategories extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
// Fields and default values for the database of this plugin
|
||||
$this->dbFields = array(
|
||||
'label' => 'Categories',
|
||||
'hideCero' => true
|
||||
);
|
||||
}
|
||||
|
||||
// Method called on the settings of the plugin on the admin area
|
||||
public function form()
|
||||
{
|
||||
global $L;
|
||||
|
||||
$html = '<div class="alert alert-primary" role="alert">';
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Label') . '</label>';
|
||||
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
|
||||
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>' . $L->get('Hide Categories without content') . '</label>';
|
||||
$html .= '<select name="hideCero">';
|
||||
$html .= '<option value="true" ' . ($this->getValue('hideCero') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||
$html .= '<option value="false" ' . ($this->getValue('hideCero') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
// Method called on the sidebar of the website
|
||||
public function siteSidebar()
|
||||
{
|
||||
global $L;
|
||||
global $categories;
|
||||
|
||||
// HTML for sidebar
|
||||
$html = '<div class="plugin plugin-categories">';
|
||||
$html .= '<h2 class="plugin-label">' . $this->getValue('label') . '</h2>';
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<ul>';
|
||||
|
||||
// By default, the database of categories is alphanumeric sorted
|
||||
foreach ($categories->db as $key => $fields) {
|
||||
$count = count($fields['list']);
|
||||
if (!$this->getValue('hideCero') || $count > 0) {
|
||||
$html .= '<li>';
|
||||
$html .= '<a href="' . DOMAIN_CATEGORIES . $key . '">';
|
||||
$html .= $fields['name'];
|
||||
$html .= ' (' . count($fields['list']) . ')';
|
||||
$html .= '</a>';
|
||||
$html .= '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '</ul>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user