-
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"description": "Vis antallet af besøgende, eller antallet af unikke besøgende, i sidepanelet på dit websted.",
|
||||
"name": "Hit Counter"
|
||||
},
|
||||
"show-unique-visitors": "Vis unikke besøgende"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Hit Counter",
|
||||
"description": "Anzeige der Anzahl der Seitenaufrufe oder der Besuche der Website in der Seitenleiste."
|
||||
},
|
||||
"show-unique-visitors": "Anzahl der Besuche"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Hit Counter",
|
||||
"description": "Anzeige der Anzahl der Seitenaufrufe oder der Besuche der Website in der Seitenleiste."
|
||||
},
|
||||
"show-unique-visitors": "Anzahl der Besuche"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Hit Counter",
|
||||
"description": "Show the number of visits or unique visitors in the sidebar of your site."
|
||||
},
|
||||
"show-unique-visitors": "Show unique visitors"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Contador de visitas",
|
||||
"description": "Muestra el número de visitas o visitantes únicos en la barra lateral de su sitio."
|
||||
},
|
||||
"show-unique-visitors": "Mostrar visitantes únicos"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "شمارشگر بازدیدها",
|
||||
"description": "تعداد بازدیدکنندگان یا بازدیدکنندگان منحصر به فرد در نوار کناری سایت خود را نمایش دهید."
|
||||
},
|
||||
"show-unique-visitors": "نمایش بازدیدکنندگان منحصر به فرد"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Compteur de visites",
|
||||
"description": "Affichez le nombre de visites ou de visiteurs uniques dans la barre latérale de votre site."
|
||||
},
|
||||
"show-unique-visitors": "Afficher les visiteurs uniques"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Contatore visite",
|
||||
"description": "Mostra il numero di visite o di visitatori unici nella barra laterale del tuo sito."
|
||||
},
|
||||
"show-unique-visitors": "Mostra visitatori unici"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Hit Counter",
|
||||
"description": "サイドバーに訪問回数やユニークビジター数を表示します。"
|
||||
},
|
||||
"show-unique-visitors": "ユニークビジターを表示する"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Hit Counter",
|
||||
"description": "Toont het aantal bezoeken of unieke bezoekers in de zijbalk."
|
||||
},
|
||||
"show-unique-visitors": "Unieke bezoekers weergeven"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data": {
|
||||
"name": "Счётчик посещений",
|
||||
"description": "Показывает количество посещений или уникальных посетителей на боковой панели вашего сайта."
|
||||
},
|
||||
"show-unique-visitors": "Показать уникальных посетителей"
|
||||
}
|
||||
@@ -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,75 @@
|
||||
<?php
|
||||
|
||||
class pluginHitCounter extends Plugin
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'label' => 'Hit Counter',
|
||||
'showUniqueVisitors' => false
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
global $L;
|
||||
|
||||
// Check if the plugin Visits Stats is activated
|
||||
if (!pluginActivated('pluginVisitsStats')) {
|
||||
$html = '<div class="alert alert-warning" role="alert">';
|
||||
$html .= $L->get('This plugin depends on the following plugins.');
|
||||
$html .= '<ul class="m-0"><li>Visits Stats</li></ul>';
|
||||
$html .= '</div>';
|
||||
|
||||
$this->formButtons = false;
|
||||
return $html;
|
||||
}
|
||||
|
||||
$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('Show unique visitors') . '</label>';
|
||||
$html .= '<select name="showUniqueVisitors">';
|
||||
$html .= '<option value="true" ' . ($this->getValue('showUniqueVisitors') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';
|
||||
$html .= '<option value="false" ' . ($this->getValue('showUniqueVisitors') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteSidebar()
|
||||
{
|
||||
$counter = 0;
|
||||
|
||||
if (pluginActivated('pluginVisitsStats')) {
|
||||
global $plugins;
|
||||
$visitsStats = $plugins['all']['pluginVisitsStats'];
|
||||
$currentDate = Date::current('Y-m-d');
|
||||
|
||||
if ($this->getValue('showUniqueVisitors')) {
|
||||
$counter = $visitsStats->uniqueVisitors($currentDate);
|
||||
} else {
|
||||
$counter = $visitsStats->visits($currentDate);
|
||||
}
|
||||
}
|
||||
|
||||
$html = '<div class="plugin plugin-hit-counter">';
|
||||
$html .= '<h2 class="plugin-label">' . $this->getValue('label') . '</h2>';
|
||||
$html .= '<div class="plugin-content">';
|
||||
$html .= '<div class="counter">' . $counter . '</div>';
|
||||
$html .= '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user