Commit SimpleStats and HitCounter changes to my master
Current version Simple Stats (data collection, Dashboard and separate Hit Counter) Issues: • Count goes up on each page refresh • Collection fixed at 7 days needing code change to alter Functionality: • Only collects daily results (fixed 7 days) • Hit counter only shows current days hit rate. Enhanced version Simple Stats (data collection, Dashboard and separate Hit Counter) Fixed: • A session for each page is started preventing constant page refreshing artificially increasing count • Collection Periods are all parametrised and configurable in settings Functionality: • Enhanced – Daily stats retention now has variable data retention(able to independently turn off) • New – Weekly stats captured for x weeks (able to independently turn off) • New – Monthly stats captured for x months (able to independently turn off) • New – Page session with configurable timeout • New – Running total of all page hits captured • All existing Languages expanded for all changes plus some added • Dashboard - Can change the displayed chart type within plugin settings • New – Dashboard now also shows total page count • Total Page count can be set via combination of admin settings and visiting page to trigger. • Enhanced - Hit Counter: sidebar independently displays all current collection data as configured in settings Not done yet • Display all charts within Tab Navigation without having to change settings • Individual rolling page count
This commit is contained in:
parent
06b6767fc5
commit
65894e59b8
@ -1,8 +1,22 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Hit Counter",
|
||||
"description": "Anzeige der Anzahl der Seitenaufrufe oder der Besuche der Website in der Seitenleiste."
|
||||
"name": "Zähler schlagen",
|
||||
"description": "Abhängig von einfachen Statistiken - Zeigt die Anzahl der Seitenzugriffe oder eindeutigen Besucher pro Tag in der Seitenleiste an."
|
||||
},
|
||||
"show-unique-visitors": "Anzahl der Besuche"
|
||||
|
||||
"plugin-depends-on-warning": "Dieses Plugin hängt von den folgenden Plugins ab.",
|
||||
"sidebar-label": "Seitenleiste Etikette",
|
||||
"sidebar-label-tip": "Dieser Titel wird fast immer in der Seitenleiste der Site verwendet.",
|
||||
|
||||
"show-running-total-lable": "Gesamtlaufzeit",
|
||||
"show-daily-value-label": "Seite Schlagen Heute",
|
||||
"show-daily-unique-value-label": "Heutige Besucher",
|
||||
"show-weekly-value-label": "Seitenaufrufe Diese Woche",
|
||||
"show-weekly-unique-value-label": "Diese Wochen Besucher",
|
||||
"show-monthly-value-label": "Seitenzugriffe diesen Monat",
|
||||
"show-monthly-unique-value-label": "Besucher dieses Monats",
|
||||
|
||||
"Enabled": "aktiviert",
|
||||
"Disabled": "Deaktiviert"
|
||||
}
|
||||
|
@ -1,8 +1,22 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Hit Counter",
|
||||
"description": "Anzeige der Anzahl der Seitenaufrufe oder der Besuche der Website in der Seitenleiste."
|
||||
"name": "Zähler schlagen",
|
||||
"description": "Abhängig von einfachen Statistiken - Zeigt die Anzahl der Seitenzugriffe oder eindeutigen Besucher pro Tag in der Seitenleiste an."
|
||||
},
|
||||
"show-unique-visitors": "Anzahl der Besuche"
|
||||
|
||||
"plugin-depends-on-warning": "Dieses Plugin hängt von den folgenden Plugins ab.",
|
||||
"sidebar-label": "Seitenleiste Etikette",
|
||||
"sidebar-label-tip": "Dieser Titel wird fast immer in der Seitenleiste der Site verwendet.",
|
||||
|
||||
"show-running-total-lable": "Gesamtlaufzeit",
|
||||
"show-daily-value-label": "Seite Schlagen Heute",
|
||||
"show-daily-unique-value-label": "Heutige Besucher",
|
||||
"show-weekly-value-label": "Seitenaufrufe Diese Woche",
|
||||
"show-weekly-unique-value-label": "Diese Wochen Besucher",
|
||||
"show-monthly-value-label": "Seitenzugriffe diesen Monat",
|
||||
"show-monthly-unique-value-label": "Besucher dieses Monats",
|
||||
|
||||
"Enabled": "aktiviert",
|
||||
"Disabled": "Deaktiviert"
|
||||
}
|
||||
|
@ -2,6 +2,21 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Hit Counter",
|
||||
"description": "Show the number of visits or unique visitors in the sidebar of your site."
|
||||
}
|
||||
"description": "Depends on SimpletStats - Shows the number of Page Hits or Unique Visitors per day in the sidebar."
|
||||
},
|
||||
|
||||
"plugin-depends-on-warning": "This plugin depends on the following plugins.",
|
||||
"sidebar-label": "Sidebar Label",
|
||||
"sidebar-label-tip": "This title is almost always used in the sidebar of the site.",
|
||||
|
||||
"show-running-total-lable": "Running Total:",
|
||||
"show-daily-value-label": "Page Hits Today:",
|
||||
"show-daily-unique-value-label": "Todays Vistors:",
|
||||
"show-weekly-value-label": "Page Hits This Week:",
|
||||
"show-weekly-unique-value-label": "This Weeks Vistors:",
|
||||
"show-monthly-value-label": "Page Hits This Month:",
|
||||
"show-monthly-unique-value-label": "This Months Visitors:",
|
||||
|
||||
"Enabled": "Enabled",
|
||||
"Disabled": "Disabled"
|
||||
}
|
@ -2,6 +2,21 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Contador de visitas",
|
||||
"description": "Muestra el número de visitas o visitantes únicos en la barra lateral de su sitio."
|
||||
}
|
||||
}
|
||||
"description": "Depende de las estadísticas de Simplet: muestra el número de visitas a la página o visitantes únicos por día en la barra lateral."
|
||||
},
|
||||
|
||||
"plugin-depends-on-warning": "Este complemento depende de los siguientes complementos.",
|
||||
"sidebar-label": "Etiqueta de la barra lateral",
|
||||
"sidebar-label-tip": "Este título casi siempre se usa en la barra lateral del sitio.",
|
||||
|
||||
"show-running-total-lable": "Total Corriente",
|
||||
"show-daily-value-label": "Página golpeó hoy",
|
||||
"show-daily-unique-value-label": "Visitantes de hoy",
|
||||
"show-weekly-value-label": "La página llega esta semana",
|
||||
"show-weekly-unique-value-label": "Esta semana los visitantes",
|
||||
"show-monthly-value-label": "La página llega este mes",
|
||||
"show-monthly-unique-value-label": "Los visitantes de este mes.",
|
||||
|
||||
"Enabled": "Habilitado",
|
||||
"Disabled": "Discapacitado"
|
||||
}
|
||||
|
@ -3,5 +3,20 @@
|
||||
{
|
||||
"name": "شمارشگر بازدیدها",
|
||||
"description": "تعداد بازدیدکنندگان یا بازدیدکنندگان منحصر به فرد در نوار کناری سایت خود را نمایش دهید."
|
||||
}
|
||||
},
|
||||
|
||||
"plugin-depends-on-warning": "شمارشگر بازدیدها وابسته است - تعداد بازدید های صفحه یا بازدید کنندگان منحصر به فرد در هر روز را در نوار کناری نشان می دهد.",
|
||||
"sidebar-label": "برچسب چسب",
|
||||
"sidebar-label-tip": "این عنوان تقریبا همیشه در نوار کناری سایت استفاده می شود.",
|
||||
|
||||
"show-running-total-lable": "در حال اجرا مجموع",
|
||||
"show-daily-value-label": "صفحه بازدید امروز",
|
||||
"show-daily-unique-value-label": "امروزه ویستورها",
|
||||
"show-weekly-value-label": "این صفحه بازدید این هفته است",
|
||||
"show-weekly-unique-value-label": "این ویستورهای هفته",
|
||||
"show-monthly-value-label": "بازدید این ماه در صفحه",
|
||||
"show-monthly-unique-value-label": "این ماهها بازدیدکنندگان",
|
||||
|
||||
"Enabled": "فعال شده است",
|
||||
"Disabled": "معلول"
|
||||
}
|
||||
|
@ -1,7 +1,22 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Hit Counter",
|
||||
"description": "Toont het aantal bezoeken of unieke bezoekers in de zijbalk."
|
||||
}
|
||||
}
|
||||
"name": "Hit teller",
|
||||
"description": "Afhankelijk van Simplet-statistieken: geeft het aantal paginaramingen of unieke bezoekers per dag in de zijbalk weer."
|
||||
},
|
||||
|
||||
"plugin-depends-on-warning": "Deze plug-in is afhankelijk van de volgende plug-ins.",
|
||||
"sidebar-label": "Zijbalklabel",
|
||||
"sidebar-label-tip": "Deze titel wordt bijna altijd gebruikt in de zijbalk van de site.",
|
||||
|
||||
"show-running-total-lable": "Lopend totaal",
|
||||
"show-daily-value-label": "Pagina hit vandaag",
|
||||
"show-daily-unique-value-label": "De vistors van vandaag",
|
||||
"show-weekly-value-label": "Pagina hits deze week",
|
||||
"show-weekly-unique-value-label": "Deze weken bezoeken",
|
||||
"show-monthly-value-label": "Pagina hits deze maand",
|
||||
"show-monthly-unique-value-label": "De bezoekers van deze maand",
|
||||
|
||||
"Enabled": "Ingeschakeld",
|
||||
"Disabled": "invalide"
|
||||
}
|
||||
|
@ -2,6 +2,21 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Счётчик посещений",
|
||||
"description": "Показывает количество посещений или уникальных посетителей на боковой панели вашего сайта."
|
||||
}
|
||||
}
|
||||
"description": "Зависит от простой статистики - показывает количество посещений страниц или уникальных посетителей в день на боковой панели."
|
||||
},
|
||||
|
||||
"plugin-depends-on-warning": "Плагин-зависит-на-предупредительного-WASD",
|
||||
"sidebar-label": "Боковая метка",
|
||||
"sidebar-label-tip": "Этот заголовок почти всегда используется на боковой панели сайта.",
|
||||
|
||||
"show-running-total-lable": "Промежуточный итог",
|
||||
"show-daily-value-label": "Страница посещает сегодня",
|
||||
"show-daily-unique-value-label": "Сегодняшние Висторы",
|
||||
"show-weekly-value-label": "Страница попадет на этой неделе",
|
||||
"show-weekly-unique-value-label": "Это недели висторы",
|
||||
"show-monthly-value-label": "Число просмотров страницы в этом месяце",
|
||||
"show-monthly-unique-value-label": "Посетители этого месяца",
|
||||
|
||||
"Enabled": "Включено",
|
||||
"Disabled": "инвалид"
|
||||
}
|
||||
|
@ -5,8 +5,14 @@ class pluginHitCounter extends Plugin {
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'label'=>'Hit Counter',
|
||||
'showUniqueVisitors'=>false
|
||||
'sidebarLabel'=>'Hit Counter',
|
||||
'showRunningTotalValue'=>true,
|
||||
'showDailyValue'=>true,
|
||||
'showDailyUniqueValue'=>true,
|
||||
'showWeeklyValue'=>true,
|
||||
'showWeeklyUniqueValue'=>true,
|
||||
'showMonthlyValue'=>true,
|
||||
'showMonthlyUniqueValue'=>true
|
||||
);
|
||||
}
|
||||
|
||||
@ -18,7 +24,7 @@ class pluginHitCounter extends Plugin {
|
||||
if (!pluginActivated('pluginSimpleStats')) {
|
||||
// Show an alert about the dependency of the plugin
|
||||
$html = '<div class="alert alert-warning" role="alert">';
|
||||
$html .= $L->get('This plugin depends on the following plugins.');
|
||||
$html .= $L->get('plugin-depends-on-warning');
|
||||
$html .= '<ul class="m-0"><li>Simple Stats</li></ul>';
|
||||
$html .= '</div>';
|
||||
|
||||
@ -34,52 +40,158 @@ class pluginHitCounter extends Plugin {
|
||||
|
||||
// Label of the plugin to show in the sidebar
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Label').'</label>';
|
||||
$html .= '<input name="label" type="text" value="'.$this->getValue('label').'">';
|
||||
$html .= '<span class="tip">'.$L->get('This title is almost always used in the sidebar of the site').'</span>';
|
||||
$html .= '<label>'.$L->get('sidebar-label').'</label>';
|
||||
$html .= '<input name="sidebarLabel" type="text" value="'.$this->getValue('sidebarLabel').'">';
|
||||
$html .= '<span class="sidebar-label-tip">'.$L->get('sidebar-label-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Form "select" element for enable or disable Unique visitors properties
|
||||
// Show ongoing running total
|
||||
$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 .= '<label>'.$L->get('show-running-total-lable').'</label>';
|
||||
$html .= '<select name="showRunningTotalValue">';
|
||||
$html .= '<option value="true" '.($this->getValue('showRunningTotalValue')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showRunningTotalValue')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Show daily page hits/visits
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('show-daily-value-label').'</label>';
|
||||
$html .= '<select name="showDailyValue">';
|
||||
$html .= '<option value="true" '.($this->getValue('showDailyValue')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showDailyValue')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('show-daily-unique-value-label').'</label>';
|
||||
$html .= '<select name="showDailyUniqueValue">';
|
||||
$html .= '<option value="true" '.($this->getValue('showDailyUniqueValue')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showDailyUniqueValue')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Show weekly page hits/visits
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('show-weekly-value-label').'</label>';
|
||||
$html .= '<select name="showWeeklyValue">';
|
||||
$html .= '<option value="true" '.($this->getValue('showWeeklyValue')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showWeeklyValue')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('show-weekly-unique-value-label').'</label>';
|
||||
$html .= '<select name="showWeeklyUniqueValue">';
|
||||
$html .= '<option value="true" '.($this->getValue('showWeeklyUniqueValue')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showWeeklyUniqueValue')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Show monthly page hits/visits
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('show-monthly-value-label').'</label>';
|
||||
$html .= '<select name="showMonthlyValue">';
|
||||
$html .= '<option value="true" '.($this->getValue('showMonthlyValue')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showMonthlyValue')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('show-Monthly-unique-value-label').'</label>';
|
||||
$html .= '<select name="showMonthlyUniqueValue">';
|
||||
$html .= '<option value="true" '.($this->getValue('showMonthlyUniqueValue')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showMonthlyUniqueValue')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteSidebar()
|
||||
{
|
||||
// Init counter to 0
|
||||
$counter = 0;
|
||||
global $L;
|
||||
$formatStyle=NumberFormatter::TYPE_INT32;
|
||||
$formatter= new NumberFormatter($locale, $formatStyle);
|
||||
|
||||
// Check if the plugin Simple Stats is activated
|
||||
if (pluginActivated('pluginSimpleStats')) {
|
||||
// Get the object of the plugin Simple Stats
|
||||
global $plugins;
|
||||
$simpleStats = $plugins['all']['pluginSimpleStats'];
|
||||
$currentDate = Date::current('Y-m-d');
|
||||
|
||||
if ($this->getValue('showUniqueVisitors')) {
|
||||
// Get the unique visitors from today
|
||||
$counter = $simpleStats->uniqueVisitors($currentDate);
|
||||
} else {
|
||||
// Get the visits from today
|
||||
$counter = $simpleStats->visits($currentDate);
|
||||
IF ( ($this->getValue('showRunningTotalValue') )
|
||||
|| ($this->getValue('showDailyValue'))
|
||||
|| ($this->getValue('showDailyUniqueValue'))
|
||||
|| ($this->getValue('showWeeklyValue'))
|
||||
|| ($this->getValue('showWeeklyUniqueValue'))
|
||||
|| ($this->getValue('showMonthlyValue'))
|
||||
|| ($this->getValue('showMonthlyUniqueValue')) )
|
||||
{
|
||||
|
||||
$simpleStats = $plugins['all']['pluginSimpleStats'];
|
||||
|
||||
$html = '<div class="plugin plugin-hit-counter">';
|
||||
$html .= '<h2 class="plugin-label">'.$this->getValue('sidebarLabel').'</h2>';
|
||||
|
||||
$html .= '<ul class="child">';
|
||||
|
||||
// Get all the needed values
|
||||
if ($this->getValue('showRunningTotalValue') ) {
|
||||
$runningTotals = json_decode(file_get_contents($simpleStats->workspace().'running-totals.json'),TRUE);
|
||||
$runningTotal = $runningTotals['runningTotals']['pageCounter'];
|
||||
$html .= '<li class="counter">'.($L->get('show-running-total-lable')).' '.$formatter->format($runningTotal).'</li>';
|
||||
}
|
||||
if ( ($this->getValue('showDailyValue')) || ($this->getValue('showDailyUniqueValue')) ) {
|
||||
$currentDate = Date::current('Y-m-d');
|
||||
|
||||
if ($this->getValue('showDailyValue')) {
|
||||
$pageViewsToday = 0;
|
||||
$pageViewsToday = $simpleStats->getPageViewCount($currentDate, 'Daily');
|
||||
$html .= '<li class="counter">'.($L->get('show-daily-value-label')).' '.$formatter->format($pageViewsToday).'</li>';
|
||||
}
|
||||
if ($this->getValue('showDailyUniqueValue')) {
|
||||
$uniqueVisitorsToday = 0;
|
||||
$uniqueVisitorsToday = $simpleStats->getUniqueVisitorCount($currentDate, 'Daily');
|
||||
$html .= '<li class="counter">'.($L->get('show-daily-unique-value-label')).' '.$formatter->format($uniqueVisitorsToday).'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ($this->getValue('showWeeklyValue')) || ($this->getValue('showWeeklyUniqueValue')) ) {
|
||||
$mondayDateThisWeek = date("Y-m-d", strtotime('monday this week'));
|
||||
|
||||
if ($this->getValue('showWeeklyValue')) {
|
||||
$pageViewsThisWeek = 0;
|
||||
$pageViewsThisWeek = $simpleStats->getPageViewCount($mondayDateThisWeek, 'Weekly');
|
||||
$html .= '<li class="counter">'.($L->get('show-weekly-value-label')).' '.$formatter->format($pageViewsThisWeek).'</li>';
|
||||
}
|
||||
if ($this->getValue('showWeeklyUniqueValue')) {
|
||||
$uniqueVisitorsThisWeek = 0;
|
||||
$uniqueVisitorsThisWeek = $simpleStats->getUniqueVisitorCount($mondayDateThisWeek, 'Weekly');
|
||||
$html .= '<li class="counter">'.($L->get('show-weekly-unique-value-label')).' '.$formatter->format($uniqueVisitorsThisWeek).'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ($this->getValue('showMonthlyValue')) || ($this->getValue('showMonthlyUniqueValue')) ) {
|
||||
$firstDateOfThisThisMonth = date("Y-m-d", strtotime('first day of this month'));
|
||||
|
||||
if ($this->getValue('showMonthlyValue')) {
|
||||
$pageViewsThisMonth = 0;
|
||||
$pageViewsThisMonth = $simpleStats->getPageViewCount($firstDateOfThisThisMonth, 'Monthly');
|
||||
$html .= '<li class="counter">'.($L->get('show-monthly-value-label')).' '.$formatter->format($pageViewsThisMonth).'</li>';
|
||||
|
||||
}
|
||||
if ($this->getValue('showMonthlyUniqueValue') ) {
|
||||
$uniqueVisitorsThisMonth = 0;
|
||||
$uniqueVisitorsThisMonth = $simpleStats->getUniqueVisitorCount($firstDateOfThisThisMonth, 'Monthly');
|
||||
$html .= '<li class="counter">'.($L->get('show-monthly-unique-value-label')).' '.$formatter->format($uniqueVisitorsThisMonth).'</li>';
|
||||
}
|
||||
}
|
||||
|
||||
$html .= '</ul>';
|
||||
}
|
||||
}
|
||||
|
||||
// Show in the sidebar the number of visitors
|
||||
$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;
|
||||
}
|
||||
}
|
@ -33,4 +33,34 @@
|
||||
|
||||
.simple-stats-plugin p.unique-today {
|
||||
color: #777777;
|
||||
}
|
||||
}
|
||||
|
||||
.simple-stats-plugin .divTable{
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
.simple-stats-plugin .divTableRow {
|
||||
display: table-row;
|
||||
}
|
||||
.simple-stats-plugin .divTableHeading {
|
||||
background-color: #EEE;
|
||||
display: table-header-group;
|
||||
}
|
||||
.simple-stats-plugin .divTableCell, .divTableHead {
|
||||
border: 0px solid #999999;
|
||||
display: table-cell;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
.simple-stats-plugin .divTableHeading {
|
||||
background-color: #EEE;
|
||||
display: table-header-group;
|
||||
font-weight: bold;
|
||||
}
|
||||
.simple-stats-plugin .divTableFoot {
|
||||
background-color: #EEE;
|
||||
display: table-footer-group;
|
||||
font-weight: bold;
|
||||
}
|
||||
.simple-stats-plugin .divTableBody {
|
||||
display: table-row-group;
|
||||
}
|
||||
|
@ -2,11 +2,57 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Simple Stats",
|
||||
"description": "Anzeige der täglichen Anzahl Seitenaufrufe und Besucher."
|
||||
"description": "Zeigt die Anzahl der Besucher pro Zeitraum in Ihrem Dashboard an."
|
||||
},
|
||||
"visits": "Seitenaufrufe",
|
||||
"visits-today": "Seitenaufrufe heute",
|
||||
"unique-visitors-today": "Besucher heute",
|
||||
"chart": "Chart",
|
||||
"table": "Table"
|
||||
|
||||
"ongoing-counter-label": "Kontinuierlicher Zähler",
|
||||
"ongoing-counter-tip": "Wenn aktiviert, wird eine laufende laufende Summe erfasst.",
|
||||
"enable-section": "aktiviert",
|
||||
"disable-section": "Deaktiviert",
|
||||
|
||||
"reset-counter-label": "Legt den aktuellen Zählerwert fest",
|
||||
"reset-counter-tip-one": "Denken Sie daran, wie -1 zu bleiben, was bedeutet, dass es nicht zurückgesetzt wird; 0 oder eine positiv Zahl setzen den Wert.",
|
||||
"reset-counter-tip-two": "Um eine Null oder Positiv-Nummer zu speichern, rufen Sie die Website auf, um sie auszulösen. Ändern Sie diese Einstellung wieder in -1.",
|
||||
|
||||
"chart-type-label": "Diagrammtyp",
|
||||
"daily-chart": "Täglich",
|
||||
"weekly-chart": "Wöchentlich",
|
||||
"monthly-chart": "Monatlich",
|
||||
"chart-type-tip": "Diese Option ändert die Anzeige des Diagramms standardmäßig.",
|
||||
|
||||
"number-of-days-label": "Wie viele Tage aufbewahren?",
|
||||
"number-of-days-tip": "Setzen Sie den Wert auf Null, um die Anzahl der täglichen Protokolle zu deaktivieren oder festzulegen.",
|
||||
"number-of-weeks-label": "Wie viele Wochen aufbewahren?",
|
||||
"number-of-weeks-tip": "Setzen Sie den Wert auf Null, um die Anzahl der wöchentlichen Protokolle zu deaktivieren oder festzulegen.",
|
||||
"number-of-months-label": "Wie viele Monate aufbewahren?",
|
||||
"number-of-months-tip": "Setzen Sie den Wert auf Null, um die Anzahl der monatlichen Protokolle zu deaktivieren oder zu speichern.",
|
||||
|
||||
"show-content-stats-label": "Inhaltsstatistiken anzeigen",
|
||||
"show-content-stats-tip": "Wenn diese Option aktiviert ist, werden ein Diagramm und eine Tabelle mit verschiedenen Seitentypen im Admin-Dashboard angezeigt.",
|
||||
|
||||
"page-session-active-minutes": "Aktive Minuten der Sitzungssitzung:",
|
||||
"page-session-active-minutes-tip": "Für jede Seite wird eine Sitzung gehalten, um die Aktualisierung von 'F5' zu verhindern, um die Anzahl falsch zu erhöhen.",
|
||||
|
||||
"stats-title-label": "Seitenaufrufe und eindeutige Besucher",
|
||||
|
||||
"page-view-today-label": "Heute aufgerufene Seiten",
|
||||
"unique-visitors-today-label": "Einzigartige Besucher heute",
|
||||
"page-view-this-week-label": "Diese Woche angesehene Seiten",
|
||||
"unique-visitors-this-week-label": "Unique Visitors in dieser Woche",
|
||||
"page-view-this-month-label": "Seit diesem Monat angesehene Seiten",
|
||||
"unique-visitors-this-month-label": "Unique Visitors in diesem Monat",
|
||||
|
||||
"content-statistics-label": "Inhaltsstatistik",
|
||||
"tab-chart-label": "Diagramm",
|
||||
"tab-table-label": "Tabelle",
|
||||
"published-label": "Veröffentlicht",
|
||||
"static-label": "statisch",
|
||||
"drafts-label": "Entwurf",
|
||||
"scheduled-label": "Geplant",
|
||||
"sticky-label": "klebrig",
|
||||
"categories-label": "Kategorien",
|
||||
"tags-label": "Stichworte",
|
||||
|
||||
"end-of-json": "Nicht verwendet, nur ein Kommentar"
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,57 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Simple Stats",
|
||||
"description": "Anzeige der täglichen Anzahl Seitenaufrufe und Besucher."
|
||||
"description": "Zeigt die Anzahl der Besucher pro Zeitraum in Ihrem Dashboard an."
|
||||
},
|
||||
"visits": "Seitenaufrufe",
|
||||
"visits-today": "Seitenaufrufe heute",
|
||||
"unique-visitors-today": "Besucher heute",
|
||||
"chart": "Chart",
|
||||
"table": "Table"
|
||||
|
||||
"ongoing-counter-label": "Kontinuierlicher Zähler",
|
||||
"ongoing-counter-tip": "Wenn aktiviert, wird eine laufende laufende Summe erfasst.",
|
||||
"enable-section": "aktiviert",
|
||||
"disable-section": "Deaktiviert",
|
||||
|
||||
"reset-counter-label": "Legt den aktuellen Zählerwert fest",
|
||||
"reset-counter-tip-one": "Denken Sie daran, wie -1 zu bleiben, was bedeutet, dass es nicht zurückgesetzt wird; 0 oder eine positiv Zahl setzen den Wert.",
|
||||
"reset-counter-tip-two": "Um eine Null oder Positiv-Nummer zu speichern, rufen Sie die Website auf, um sie auszulösen. Ändern Sie diese Einstellung wieder in -1.",
|
||||
|
||||
"chart-type-label": "Diagrammtyp",
|
||||
"daily-chart": "Täglich",
|
||||
"weekly-chart": "Wöchentlich",
|
||||
"monthly-chart": "Monatlich",
|
||||
"chart-type-tip": "Diese Option ändert die Anzeige des Diagramms standardmäßig.",
|
||||
|
||||
"number-of-days-label": "Wie viele Tage aufbewahren?",
|
||||
"number-of-days-tip": "Setzen Sie den Wert auf Null, um die Anzahl der täglichen Protokolle zu deaktivieren oder festzulegen.",
|
||||
"number-of-weeks-label": "Wie viele Wochen aufbewahren?",
|
||||
"number-of-weeks-tip": "Setzen Sie den Wert auf Null, um die Anzahl der wöchentlichen Protokolle zu deaktivieren oder festzulegen.",
|
||||
"number-of-months-label": "Wie viele Monate aufbewahren?",
|
||||
"number-of-months-tip": "Setzen Sie den Wert auf Null, um die Anzahl der monatlichen Protokolle zu deaktivieren oder zu speichern.",
|
||||
|
||||
"show-content-stats-label": "Inhaltsstatistiken anzeigen",
|
||||
"show-content-stats-tip": "Wenn diese Option aktiviert ist, werden ein Diagramm und eine Tabelle mit verschiedenen Seitentypen im Admin-Dashboard angezeigt.",
|
||||
|
||||
"page-session-active-minutes": "Aktive Minuten der Sitzungssitzung:",
|
||||
"page-session-active-minutes-tip": "Für jede Seite wird eine Sitzung gehalten, um die Aktualisierung von 'F5' zu verhindern, um die Anzahl falsch zu erhöhen.",
|
||||
|
||||
"stats-title-label": "Seitenaufrufe und eindeutige Besucher",
|
||||
|
||||
"page-view-today-label": "Heute aufgerufene Seiten",
|
||||
"unique-visitors-today-label": "Einzigartige Besucher heute",
|
||||
"page-view-this-week-label": "Diese Woche angesehene Seiten",
|
||||
"unique-visitors-this-week-label": "Unique Visitors in dieser Woche",
|
||||
"page-view-this-month-label": "Seit diesem Monat angesehene Seiten",
|
||||
"unique-visitors-this-month-label": "Unique Visitors in diesem Monat",
|
||||
|
||||
"content-statistics-label": "Inhaltsstatistik",
|
||||
"tab-chart-label": "Diagramm",
|
||||
"tab-table-label": "Tabelle",
|
||||
"published-label": "Veröffentlicht",
|
||||
"static-label": "statisch",
|
||||
"drafts-label": "Entwurf",
|
||||
"scheduled-label": "Geplant",
|
||||
"sticky-label": "klebrig",
|
||||
"categories-label": "Kategorien",
|
||||
"tags-label": "Stichworte",
|
||||
|
||||
"end-of-json": "Nicht verwendet, nur ein Kommentar"
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,57 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Simple Stats",
|
||||
"description": "Show the number of visitors per day on your dashboard."
|
||||
"description": "Show the number of visitors per period on your dashboard."
|
||||
},
|
||||
"visits": "Visits",
|
||||
"visits-today": "Visits today",
|
||||
"unique-visitors-today": "Unique visitors today",
|
||||
"chart": "Chart",
|
||||
"table": "Table"
|
||||
|
||||
"ongoing-counter-label": "Ongoing Counter:",
|
||||
"ongoing-counter-tip": "When enabled, an ongoing running total is collected.",
|
||||
"enable-section": "Enabled",
|
||||
"disable-section": "Disabled",
|
||||
|
||||
"reset-counter-label": "Set the on-going counter value:",
|
||||
"reset-counter-tip-one": "REMEMBER TO KEEP AS -1, which means it won't reset; 0 or positive number will set value.",
|
||||
"reset-counter-tip-two": "To set - save as zero or positive number, go to website (new session) to trigger, change this back to -1.",
|
||||
|
||||
"chart-type-label": "Chart Type:",
|
||||
"daily-chart": "Daily",
|
||||
"weekly-chart": "Weekly",
|
||||
"monthly-chart": "Monthly",
|
||||
"chart-type-tip": "This option changes what the chart displays by default.",
|
||||
|
||||
"number-of-days-label": "Keep for how many days?",
|
||||
"number-of-days-tip": "Set to zero to disable or set number of daily logs to keep.",
|
||||
"number-of-weeks-label": "Keep for how many weeks?",
|
||||
"number-of-weeks-tip": "Set to zero to disable or set number of weekly logs to keep.",
|
||||
"number-of-months-label": "Keep for how many months?",
|
||||
"number-of-months-tip": "Set to zero to disable or set number of monthly logs to keep.",
|
||||
|
||||
"show-content-stats-label": "Show Content Stats:",
|
||||
"show-content-stats-tip": "When enabled, a chart and table of different page types is displayed in the Admin Dashboard.",
|
||||
|
||||
"page-session-active-minutes": "Page session active minutes:",
|
||||
"page-session-active-minutes-tip": "A session is kept for each page to prevent F5 refreshing to increase counts falsely.",
|
||||
|
||||
"stats-title-label": "Page Views & Unique Visitors",
|
||||
|
||||
"page-view-today-label": "Pages viewed today",
|
||||
"unique-visitors-today-label": "Unique visitors today",
|
||||
"page-view-this-week-label": "Pages viewed this week",
|
||||
"unique-visitors-this-week-label": "Unique visitors this week",
|
||||
"page-view-this-month-label": "Pages viewed this month",
|
||||
"unique-visitors-this-month-label": "Unique visitors this month",
|
||||
|
||||
"content-statistics-label": "Content Statistics",
|
||||
"tab-chart-label": "Chart",
|
||||
"tab-table-label": "Table",
|
||||
"published-label": "Published",
|
||||
"static-label": "Static",
|
||||
"drafts-label": "Drafts",
|
||||
"scheduled-label": "Scheduled",
|
||||
"sticky-label": "Sticky",
|
||||
"categories-label": "Categories",
|
||||
"tags-label": "Tags",
|
||||
|
||||
"end-of-json": "not used, just a comment"
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,58 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Simple Stats",
|
||||
"description": "Muestra el número de visitantes por día en tu panel."
|
||||
"name": "Estadísticas simples",
|
||||
"description": "Muestra el número de visitantes por período en tu panel"
|
||||
},
|
||||
"visits": "Visitas",
|
||||
"visits-today": "Visitas de hoy",
|
||||
"unique-visitors-today": "Visitantes únicos de hoy",
|
||||
"chart": "Gráfico",
|
||||
"table": "Tabla"
|
||||
}
|
||||
|
||||
"ongoing-counter-label": "Contador continuo",
|
||||
"ongoing-counter-tip": "Cuando está habilitado, se recopila un total acumulado en curso",
|
||||
"enable-section": "Habilitado",
|
||||
"disable-section": "Discapacitado",
|
||||
|
||||
"reset-counter-label": "Establezca el valor del contador actual",
|
||||
"reset-counter-tip-one": "RECUERDE MANTENER COMO -1, lo que significa que no se reiniciará; 0 o el número posativo establecerá un valor",
|
||||
"reset-counter-tip-two": "Para establecer, guardar como cero o número posativo, vaya al sitio web para activar, vuelva a cambiar esto a -1.",
|
||||
|
||||
"chart-type-label": "Tipo de gráfico",
|
||||
"daily-chart": "Diario",
|
||||
"weekly-chart": "Semanal",
|
||||
"monthly-chart": "Mensual",
|
||||
"chart-type-tip": "Esta opción cambia lo que el gráfico muestra de forma predeterminada",
|
||||
|
||||
"number-of-days-label": "¿Guardar por cuántos días?",
|
||||
"number-of-days-tip": "Establecido en cero para deshabilitar o establecer el número de registros diarios para mantener.",
|
||||
"number-of-weeks-label": "¿Mantener durante cuántas semanas?",
|
||||
"number-of-weeks-tip": "Establecido en cero para deshabilitar o establecer el número de registros semanales para mantener.",
|
||||
"number-of-months-label": "¿Guardar por cuántos meses?",
|
||||
"number-of-months-tip": "Establecido en cero para deshabilitar o establecer el número de registros mensuales para mantener.",
|
||||
|
||||
"show-content-stats-label": "Mostrar estadísticas de contenido",
|
||||
"show-content-stats-tip-tip": "Cuando está habilitado, se muestra un gráfico y una tabla de diferentes tipos de páginas en el Panel de administración.",
|
||||
|
||||
"page-session-active-minutes": "Página sesión minutos activos:",
|
||||
"page-session-active-minutes-tip": "Se mantiene una sesión para cada página para evitar la actualización de 'F5' para aumentar los conteos falsamente.",
|
||||
|
||||
"stats-title-label": "Vistas de página y visitantes únicos",
|
||||
|
||||
"page-view-today-label": "Páginas vistas hoy",
|
||||
"unique-visitors-today-label": "Visitantes únicos de hoy",
|
||||
"page-view-this-week-label": "Páginas vistas esta semana",
|
||||
"unique-visitors-this-week-label": "Visitantes únicos esta semana",
|
||||
"page-view-this-month-label": "Páginas vistas este mes",
|
||||
"unique-visitors-this-month-label": "Visitantes únicos este mes",
|
||||
|
||||
"content-statistics-label": "Estadísticas de contenido",
|
||||
"tab-chart-label": "Gráfico",
|
||||
"tab-table-label": "Tabla",
|
||||
"published-label": "Publicado",
|
||||
"static-label": "Estático",
|
||||
"drafts-label": "Eorrador",
|
||||
"scheduled-label": "Programado",
|
||||
"sticky-label": "Pegajosa",
|
||||
"categories-label": "Categories",
|
||||
"tags-label": "Etiquetas",
|
||||
|
||||
"end-of-json": "No se usa, solo un comentario"
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,57 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "آمار ساده",
|
||||
"description": "نمایش روزانه بازدیدکنندگان در پیش خوان شما."
|
||||
"description": "نمایش تعداد بازدیدکنندگان در هر دوره در داشبورد خود."
|
||||
},
|
||||
"visits": "بازدیدها",
|
||||
"visits-today": "بازدیدهای امروز",
|
||||
"unique-visitors-today": "بازدید کنندگان منحصر به فرد امروز",
|
||||
"chart": "چارت",
|
||||
"table": "جدول"
|
||||
|
||||
"ongoing-counter-label": "شمارنده در حال اجرا",
|
||||
"ongoing-counter-tip": "هنگامی که فعال شده است، مجموع در حال انجام در حال اجرا است",
|
||||
"enable-section": "فعال",
|
||||
"disable-section": "غیر فعال",
|
||||
|
||||
"reset-counter-label": "تنظیم مقادیر فعلی تنظیم شده",
|
||||
"reset-counter-tip-one": "یادآوری AS-1 را نگه دارید، بدین معناست که تنظیم مجدد تنظیم نمی شود؛ 0 یا عدد مثبت مقدار را تعیین می کند.",
|
||||
"reset-counter-tip-two": "برای تنظیم، صرفه جویی در مقدار صفر یا مثبت، به وب سایت بروید تا باعث شود، این را به -1 تغییر دهید.",
|
||||
|
||||
"chart-type-label": "نوع نمودار",
|
||||
"daily-chart": "روزانه",
|
||||
"weekly-chart": "هفتگی",
|
||||
"monthly-chart": "ماهانه",
|
||||
"chart-type-tip": "این گزینه تغییراتی را که نمودار به طور پیش فرض نمایش می دهد.",
|
||||
|
||||
"number-of-days-label": "برای چند روز نگه دارید؟",
|
||||
"number-of-days-tip": "مقدار صفر برای غیرفعال کردن یا تنظیم تعداد روزنامه ها برای نگهداری تنظیم شده است.",
|
||||
"number-of-weeks-label": "برای چند هفته نگه دارید؟",
|
||||
"number-of-weeks-tip": "برای غیرفعال کردن یا تنظیم تعداد روزنامههای هفتگی برای نگهداری، روی صفر تنظیم کنید.",
|
||||
"number-of-months-label": "چند ماه نگه دارید؟",
|
||||
"number-of-months-tip": "برای غیرفعال کردن یا تنظیم تعدادی از سیاهههای مربوط به ماهانه برای نگهداری، روی صفر تنظیم کنید.",
|
||||
|
||||
"show-content-stats-label": "نمایش آمار محتوا",
|
||||
"show-content-stats-tip": "هنگامی که فعال شد، یک نمودار و جدول انواع صفحه های مختلف در هیئت مدیره داش نمایش داده می شود.",
|
||||
|
||||
"page-session-active-minutes": "دقیقه فعالانه صفحه",
|
||||
"page-session-active-minutes-tip": "یک جلسه برای هر صفحه نگهداری می شود تا از فرمت F5 برای افزایش شمارش غلط جلوگیری شود.",
|
||||
|
||||
"stats-title-label": "بازدید صفحات و بازدید کنندگان منحصر به فرد",
|
||||
|
||||
"page-view-today-label": "صفحات مشاهده شده امروز",
|
||||
"unique-visitors-today-label": "بازدید کنندگان منحصر به فرد امروز",
|
||||
"page-view-this-week-label": "صفحات مشاهده شده در این هفته",
|
||||
"unique-visitors-this-week-label": "بازدید کنندگان منحصر به فرد در این هفته",
|
||||
"page-view-this-month-label": "صفحات مشاهده شده در این ماه",
|
||||
"unique-visitors-this-month-label": "بازدید کنندگان منحصر به فرد در این ماه",
|
||||
|
||||
"content-statistics-label": "آمار محتوا",
|
||||
"tab-chart-label": "نمودار",
|
||||
"tab-table-label": "جدول",
|
||||
"published-label": "منتشر شده",
|
||||
"static-label": "static",
|
||||
"drafts-label": "پیش نویس",
|
||||
"scheduled-label": "برنامه ریزی شده",
|
||||
"sticky-label": "چسبنده",
|
||||
"categories-label": "دسته ها",
|
||||
"tags-label": "برچسب ها",
|
||||
|
||||
"end-of-json": "استفاده نشده است، فقط یک نظر"
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,57 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Statistiques",
|
||||
"description": "Afficher le nombre de visiteurs par jour sur votre tableau de bord."
|
||||
"description": "Affiche le nombre de visiteurs par période sur votre tableau de bord."
|
||||
},
|
||||
"visits": "Visites",
|
||||
"visits-today": "Visites du jour",
|
||||
"unique-visitors-today": "Visiteurs uniques du jour",
|
||||
"chart": "Graphique",
|
||||
"table": "Tableau"
|
||||
|
||||
"ongoing-counter-label": "Compteur en cours",
|
||||
"ongoing-counter-tip": "Lorsque cette option est activée, un total courant est collecté.",
|
||||
"enable-section": "Enabled",
|
||||
"disable-section": "Disabled",
|
||||
|
||||
"reset-counter-label": "Définir la valeur du compteur en cours",
|
||||
"reset-counter-tip-one": "N'OUBLIEZ PAS DE CONSERVER AS -1, ce qui signifie qu'elle ne sera pas réinitialisée; 0 ou le nombre positif définira la valeur.",
|
||||
"reset-counter-tip-two": "Pour définir, enregistrer en tant que nombre zéro ou positif, accédez au site Web à déclencher, remettez-le à -1.",
|
||||
|
||||
"chart-type-label": "Type de graphique",
|
||||
"daily-chart": "Daily",
|
||||
"weekly-chart": "hebdomadaire",
|
||||
"monthly-chart": "mensuelle",
|
||||
"chart-type-tip": "Cette option modifie ce que le graphique affiche par défaut.",
|
||||
|
||||
"number-of-days-label": "Conserver pendant combien de jours?",
|
||||
"number-of-days-tip": "Définissez à zéro pour désactiver ou définir le nombre de journaux quotidiens à conserver.",
|
||||
"number-of-weeks-label": "Garder pendant combien de semaines?",
|
||||
"number-of-weeks-tip": "Définissez à zéro pour désactiver ou définir le nombre de journaux hebdomadaires à conserver.",
|
||||
"number-of-months-label": "Gardez pendant combien de mois?",
|
||||
"number-of-months-tip": "Définissez à zéro pour désactiver ou définir le nombre de journaux mensuels à conserver.",
|
||||
|
||||
"show-content-stats-label": "Afficher les statistiques du contenu",
|
||||
"show-content-stats-tip": "Lorsque cette option est activée, un tableau et un tableau présentant différents types de page sont affichés dans le tableau de bord de l'administrateur.",
|
||||
|
||||
"page-session-active-minutes": "Minutes de session actives:",
|
||||
"page-session-active-minutes-tip": "Une session est conservée pour chaque page afin d’empêcher l’actualisation «F5» afin d’augmenter le nombre de fois.",
|
||||
|
||||
"stats-title-label": "Pages vues & visiteurs uniques",
|
||||
|
||||
"page-view-today-label": "Pages vues aujourd'hui",
|
||||
"unique-visitors-today-label": "Visiteurs uniques aujourd'hui",
|
||||
"page-view-this-week-label": "Pages vues cette semaine",
|
||||
"unique-visitors-this-week-label": "Visiteurs uniques cette semaine",
|
||||
"page-view-this-month-label": "Pages vues ce mois-ci",
|
||||
"unique-visitors-this-month-label": "Visiteurs uniques ce mois-ci",
|
||||
|
||||
"content-statistics-label": "Statistiques du contenu",
|
||||
"tab-chart-label": "Graphique",
|
||||
"tab-table-label": "Tableau",
|
||||
"published-label": "publié",
|
||||
"static-label": "statique",
|
||||
"drafts-label": "drafts",
|
||||
"scheduled-label": "programmé",
|
||||
"sticky-label": "collant",
|
||||
"categories-label": "catégories",
|
||||
"tags-label": "tags",
|
||||
|
||||
"end-of-json": "non utilisé, juste un commentaire"
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,57 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Statistieken",
|
||||
"description": "Toont het aantal bezoeken per dag op het dashboard."
|
||||
"description": "Toont het aantal bezoeken per periode op het dashboard."
|
||||
},
|
||||
"visits": "Aantal bezoeken",
|
||||
"visits-today": "Aantal bezoeken vandaag",
|
||||
"unique-visitors-today": "Unieke bezoekers vandaag",
|
||||
"chart": "Grafiek",
|
||||
"table": "Tabel"
|
||||
|
||||
"ongoing-counter-label": "Lopende teller",
|
||||
"ongoing-counter-tip": "Indien ingeschakeld, wordt een lopend lopend totaal verzameld.",
|
||||
"enable-section": "Ingeschakeld",
|
||||
"disable-section": "Uitgeschakeld",
|
||||
|
||||
"reset-counter-label": "Stel de lopende tellerwaarde in",
|
||||
"reset-counter-tip-one": "ONTHOUD OM ALS -1 TE BLIJVEN, wat betekent dat het niet zal resetten; 0 of positief getal zal de waarde instellen.",
|
||||
"reset-counter-tip-two": "Om in te stellen, opslaan als nul of positief getal, ga naar website om te activeren, verander dit terug naar -1.",
|
||||
|
||||
"chart-type-label": "Diagramtype",
|
||||
"daily-chart": "Daily",
|
||||
"weekly-chart": "Weekly",
|
||||
"monthly-chart": "Maandelijks",
|
||||
"chart-type-tip": "Deze optie verandert wat het diagram standaard weergeeft.",
|
||||
|
||||
"number-of-days-label": "Houd voor hoeveel dagen?",
|
||||
"number-of-days-tip": "Stel in op nul om het aantal te bewaren dagelijkse logs uit te schakelen of in te stellen.",
|
||||
"number-of-weeks-label": "Hoeveel weken bewaren?",
|
||||
"number-of-weeks-tip": "Stel in op nul om het aantal wekelijkse logboeken in te schakelen of in te stellen om te houden.",
|
||||
"number-of-months-label": "Houd voor hoeveel maanden?",
|
||||
"number-of-months-tip": "Stel in op nul om het aantal maandelijkse logboeken dat u wilt behouden uit te schakelen of in te stellen.",
|
||||
|
||||
"show-content-stats-label": "Inhoudsstatistieken weergeven",
|
||||
"show-content-stats-tip": "Indien ingeschakeld, worden een grafiek en een tabel met verschillende paginatypes weergegeven in het Admin Dashboard.",
|
||||
|
||||
"page-session-active-minutes": "Actieve minuten van de sessie:",
|
||||
"page-session-active-minutes-tip": "Voor elke pagina wordt een sessie gehouden om te voorkomen dat 'F5' wordt vernieuwd om het aantal vals te verhogen.",
|
||||
|
||||
"stats-title-label": "Paginaweergaven en unieke bezoekers",
|
||||
|
||||
"page-view-today-label": "Aantal bezoeken vandaag",
|
||||
"unique-visitors-today-label": "Unieke bezoekers vandaag",
|
||||
"page-view-this-week-label": "Pagina's die deze week zijn bekeken",
|
||||
"unique-visitors-this-week-label": "Unieke bezoekers deze week",
|
||||
"page-view-this-month-label": "Pagina's bekeken deze maand",
|
||||
"unique-visitors-this-month-label": "Unieke bezoekers deze maand",
|
||||
|
||||
"content-statistics-label": "Contentstatistieken",
|
||||
"tab-chart-label": "Grafiek",
|
||||
"tab-table-label": "Tabel",
|
||||
"published-label": "gepubliceerd",
|
||||
"static-label": "statisch",
|
||||
"drafts-label": "dammen",
|
||||
"scheduled-label": "scheduled",
|
||||
"sticky-label": "plakkerig",
|
||||
"categories-label": "categorieën",
|
||||
"tags-label": "tags",
|
||||
|
||||
"end-of-json": "niet gebruikt, alleen een opmerking"
|
||||
|
||||
}
|
||||
|
@ -1,12 +1,58 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Простая статистика",
|
||||
"description": "Показывает количество посетителей в панели управления."
|
||||
"name": "простая статистика",
|
||||
"description": "показывать количество посетителей за период на панели мониторинга."
|
||||
},
|
||||
"visits": "Посещения",
|
||||
"visits-today": "Посещений сегодня",
|
||||
"unique-visitors-today": "Уникальных посетителей сегодня",
|
||||
"chart": "Диаграмма",
|
||||
"table": "Таблица"
|
||||
|
||||
"ongoing-counter-label": "постоянной счетчика",
|
||||
"ongoing-counter-tip": "если включено, текущий итог собирается.",
|
||||
"enable-section": "включена",
|
||||
"disable-section": "отключен",
|
||||
|
||||
"reset-counter-label": "установить текущее значение счетчика",
|
||||
"reset-counter-tip-one": "не забудьте сохранить как -1, что означает, что он не будет сброшен; 0 или положительное число установит значение.",
|
||||
"reset-counter-tip-two": "чтобы установить, сохранить как нулевое или позативное число, перейдите на веб-сайт, чтобы вызвать, измените это обратно на -1.",
|
||||
|
||||
"chart-type-label": "тип диаграммы",
|
||||
"daily-chart": "ежедневно",
|
||||
"weekly-chart": "еженедельно",
|
||||
"monthly-chart": "ежемесячно",
|
||||
"chart-type-tip": "эта опция изменяет то, что отображается на графике по умолчанию.",
|
||||
|
||||
"number-of-days-label": "хранить сколько дней?",
|
||||
"number-of-days-tip": "установить на ноль, чтобы отключить или установить количество ежедневных журналов.",
|
||||
"number-of-weeks-label": "сохранить за сколько недель?",
|
||||
"number-of-weeks-tip": "установить на ноль, чтобы отключить или установить количество еженедельных журналов.",
|
||||
"number-of-months-label": "держите на сколько месяцев?",
|
||||
"number-of-months-tip": "установить на ноль, чтобы отключить или установить количество ежемесячных журналов.",
|
||||
|
||||
"show-content-stats-label": "показать статистику контента",
|
||||
"show-content-stats-tip": "при включении в админ панели отображается диаграмма и таблица различных типов страниц.",
|
||||
|
||||
"page-session-active-minutes": "Активные минуты сеанса страницы:",
|
||||
"page-session-active-minutes-tip": "Сессия сохраняется для каждой страницы, чтобы предотвратить обновление «F5» для ложного увеличения числа.",
|
||||
|
||||
"stats-title-label": "Просмотры страниц и уникальные посетители",
|
||||
|
||||
"page-view-today-label": "просмотрено страниц сегодня",
|
||||
"unique-visitors-today-label": "уникальные посетители сегодня",
|
||||
"page-view-this-week-label": "страниц, просмотренных на этой неделе",
|
||||
"unique-visitors-this-week-label": "уникальные посетители на этой неделе",
|
||||
"page-view-this-month-label": "просмотренные в этом месяце страницы",
|
||||
"unique-visitors-this-month-label": "уникальные посетители в этом месяце",
|
||||
|
||||
"content-statistics-label": "статистика контента",
|
||||
"tab-chart-label": "график",
|
||||
"tab-table-label": "таблица",
|
||||
"published-label": "опубликовано",
|
||||
"static-label": "статический",
|
||||
"drafts-label": "черновики",
|
||||
"scheduled-label": "запланировано",
|
||||
"sticky-label": "липкий",
|
||||
"categories-label": "категории",
|
||||
"tags-label": "теги",
|
||||
|
||||
"end-of-json": "не используется, просто комментарий"
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,57 @@
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "Basit İstatistikler",
|
||||
"description": "Yönetici panelinde günlük ziyaretçi sayısını gösterir."
|
||||
"description": "Panonuzda dönem başına ziyaretçi sayısını göster."
|
||||
},
|
||||
"visits": "Ziyaretler",
|
||||
"visits-today": "Bugün yapılan ziyaretler",
|
||||
"unique-visitors-today": "Bugün yapılan benzersiz ziyaretler",
|
||||
"chart": "Grafik",
|
||||
"table": "Tablo"
|
||||
|
||||
"ongoing-counter-label": "Devam eden sayaç",
|
||||
"ongoing-counter-tip": "Etkinleştirildiğinde, devam eden bir toplam çalışma toplanır.",
|
||||
"enable-section": "Etkin",
|
||||
"disable-section": "Devre dışı",
|
||||
|
||||
"reset-counter-label": "Devam eden sayaç değerini ayarlayın",
|
||||
"reset-counter-tip-one": "-1'DEN KEEP UNUTMAYIN, yani sıfırlanmayacak demektir; 0 veya pozitif sayı değeri ayarlayacaktır.",
|
||||
"reset-counter-tip-two": "Ayarlamak, sıfır veya pozitif sayı olarak kaydetmek için, tetiklemek için web sitesine gidin, bunu -1 olarak değiştirin.",
|
||||
|
||||
"chart-type-label": "Grafik Türü",
|
||||
"daily-chart": "Günlük",
|
||||
"weekly-chart": "Haftalık",
|
||||
"monthly-chart": "Aylık",
|
||||
"chart-type-tip": "Bu seçenek, grafiğin varsayılan olarak gösterme şeklini değiştirir.",
|
||||
|
||||
"number-of-days-label": "Kaç günlüğüne saklayın?",
|
||||
"number-of-days-tip": "Saklamak için sıfıra ayarlayın veya saklanacak günlük kayıt sayısını ayarlayın.",
|
||||
"number-of-weeks-label": "Kaç hafta saklayın?",
|
||||
"number-of-weeks-tip": "Devre dışı bırakmak için sıfıra ayarlayın veya saklanacak haftalık günlük sayısını ayarlayın.",
|
||||
"number-of-months-label": "Kaç ay saklayın?",
|
||||
"number-of-months-tip": "Saklamak için sıfıra ayarlayın veya saklanacak aylık günlük sayısını ayarlayın.",
|
||||
|
||||
"show-content-stats-label": "İçerik İstatistiklerini Göster",
|
||||
"show-content-stats-tip": "Etkinleştirildiğinde, Yönetici Kontrol Paneli'nde farklı sayfa türlerinde bir grafik ve tablo görüntülenir.",
|
||||
|
||||
"page-session-active-minutes": "Sayfa oturumu aktif dakikaları:",
|
||||
"page-session-active-minutes-tip": "Sayıları artırmak için 'F5' yenilemesini önlemek için her sayfa için bir oturum düzenlenir.",
|
||||
|
||||
"stats-title-label": "Sayfa Görünümleri ve Benzersiz Ziyaretçiler",
|
||||
|
||||
"page-view-today-label": "Bugün görüntülenen sayfalar",
|
||||
"unique-visitors-today-label": "Bugün benzersiz ziyaretçiler",
|
||||
"page-view-this-week-label": "Bu hafta görüntülenen sayfalar",
|
||||
"unique-visitors-this-week-label": "Bu hafta benzersiz ziyaretçiler",
|
||||
"page-view-this-month-label": "Bu ay görüntülenen sayfalar",
|
||||
"unique-visitors-this-month-label": "Bu ay benzersiz ziyaretçiler",
|
||||
|
||||
"content-statistics-label": "İçerik İstatistikleri",
|
||||
"tab-chart-label": "Grafik",
|
||||
"tab-table-label": "Tablo",
|
||||
"published-label": "Yayınlandı",
|
||||
"static-label": "statik",
|
||||
"drafts-label": "taslaklar",
|
||||
"scheduled-label": "Planlanmış",
|
||||
"sticky-label": "yapışkan",
|
||||
"categories-label": "Kategoriler",
|
||||
"tags-label": "etiketler",
|
||||
|
||||
"end-of-json": "kullanılmamış, sadece yorum"
|
||||
|
||||
}
|
||||
|
@ -14,10 +14,15 @@ class pluginSimpleStats extends Plugin {
|
||||
|
||||
// Fields and default values for the database of this plugin
|
||||
$this->dbFields = array(
|
||||
'label'=>$L->g('Visits'),
|
||||
'numberOfDays'=>7,
|
||||
'excludeAdmins'=>false,
|
||||
'showContentStats'=>false
|
||||
'enableOngoingCounter'=>false,
|
||||
'resetOngoingCounterValue'=>'-1',
|
||||
'chartType'=>'Weekly',
|
||||
'numberOfDaysToKeep'=>7,
|
||||
'numberOfWeeksToKeep'=>7,
|
||||
'numberOfMonthsToKeep'=>13,
|
||||
'showContentStats'=>false,
|
||||
'pageSessionActiveMinutes'=>60,
|
||||
'excludeAdmins'=>false
|
||||
);
|
||||
}
|
||||
|
||||
@ -29,26 +34,76 @@ class pluginSimpleStats extends Plugin {
|
||||
$html .= $this->description();
|
||||
$html .= '</div>';
|
||||
|
||||
// Define ongoing running total counter
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Label').'</label>';
|
||||
$html .= '<input id="jslabel" name="label" type="text" 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 Content Stats').'</label>';
|
||||
$html .= '<select name="showContentStats">';
|
||||
$html .= '<option value="true" '.($this->getValue('showContentStats')===true?'selected':'').'>'.$L->get('Enabled').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showContentStats')===false?'selected':'').'>'.$L->get('Disabled').'</option>';
|
||||
$html .= '<label>'.$L->get('ongoing-counter-label').'</label>';
|
||||
$html .= '<select name="enableOngoingCounter">';
|
||||
$html .= '<option value="true" '.($this->getValue('enableOngoingCounter')===true?'selected':'').'>'.$L->get('enable-section').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('enableOngoingCounter')===false?'selected':'').'>'.$L->get('disable-section').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<span class="tip">'.$L->get('ongoing-counter-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Controls the resetting of the ongoing counter
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('reset-counter-label').'</label>';
|
||||
$html .= '<input id="jsresetOngoingCounterValue" name="resetOngoingCounterValue" type="number" value="'.$this->getValue('resetOngoingCounterValue').'">';
|
||||
$html .= '<span class="tip">'.$L->get('reset-counter-tip-one').'</span>';
|
||||
$html .= '<span class="tip">'.$L->get('reset-counter-tip-two').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Define the chart type
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('chart-type-label').'</label>';
|
||||
$html .= '<select name="chartType">';
|
||||
$html .= '<option value="Daily" '.($this->getValue('chartType')==='Daily'?'selected':'').'>'.$L->get('daily-chart').'</option>';
|
||||
$html .= '<option value="Weekly" '.($this->getValue('chartType')==='Weekly'?'selected':'').'>'.$L->get('weekly-chart').'</option>';
|
||||
$html .= '<option value="Monthly" '.($this->getValue('chartType')==='Monthly'?'selected':'').'>'.$L->get('monthly-chart').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<span class="tip">'.$L->get('chart-type-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
// Define how long to keep stats. Zero also turns unwanted collections off.
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('number-of-days-label').'</label>';
|
||||
$html .= '<input id="jsnumberOfDaysToKeep" name="numberOfDaysToKeep" type="number" value="'.$this->getValue('numberOfDaysToKeep').'">';
|
||||
$html .= '<span class="tip">'.$L->get('number-of-days-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('number-of-weeks-label').'</label>';
|
||||
$html .= '<input id="jsnumberOfWeeksToKeep" name="numberOfWeeksToKeep" type="number" value="'.$this->getValue('numberOfWeeksToKeep').'">';
|
||||
$html .= '<span class="tip">'.$L->get('number-of-weeks-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('number-of-months-label').'</label>';
|
||||
$html .= '<input id="jsnumberOfMonthsToKeep" name="numberOfMonthsToKeep" type="number" value="'.$this->getValue('numberOfMonthsToKeep').'">';
|
||||
$html .= '<span class="tip">'.$L->get('number-of-months-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('show-content-stats-label').'</label>';
|
||||
$html .= '<select name="showContentStats">';
|
||||
$html .= '<option value="true" '.($this->getValue('showContentStats')===true?'selected':'').'>'.$L->get('enable-section').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('showContentStats')===false?'selected':'').'>'.$L->get('disable-section').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '<span class="tip">'.$L->get('show-content-stats-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('page-session-active-minutes').'</label>';
|
||||
$html .= '<input id="jspageSessionActiveMinutes" name="pageSessionActiveMinutes" type="number" value="'.$this->getValue('pageSessionActiveMinutes').'">';
|
||||
$html .= '<span class="tip">'.$L->get('page-session-active-minutes-tip').'</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
// For uses of BLUDIT PRO
|
||||
if (defined('BLUDIT_PRO')) {
|
||||
$html .= '<div>';
|
||||
$html .= '<label>'.$L->get('Exclude administrators users').'</label>';
|
||||
$html .= '<select 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 .= '<option value="true" '.($this->getValue('excludeAdmins')===true?'selected':'').'>'.$L->get('enable-section').'</option>';
|
||||
$html .= '<option value="false" '.($this->getValue('excludeAdmins')===false?'selected':'').'>'.$L->get('disable-section').'</option>';
|
||||
$html .= '</select>';
|
||||
$html .= '</div>';
|
||||
}
|
||||
@ -56,6 +111,13 @@ class pluginSimpleStats extends Plugin {
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function beforeSiteLoad()
|
||||
{
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
}
|
||||
|
||||
public function adminHead()
|
||||
{
|
||||
if (!in_array($GLOBALS['ADMIN_CONTROLLER'], $this->loadOnController)) {
|
||||
@ -75,34 +137,120 @@ class pluginSimpleStats extends Plugin {
|
||||
public function dashboard()
|
||||
{
|
||||
global $L;
|
||||
$label = $this->getValue('label');
|
||||
|
||||
$currentDate = Date::current('Y-m-d');
|
||||
$visitsToday = $this->visits($currentDate);
|
||||
$uniqueVisitors = $this->uniqueVisitors($currentDate);
|
||||
$mondayDateThisWeek = date("Y-m-d", strtotime('monday this week'));
|
||||
$firstDateOfThisThisMonth = date("Y-m-d", strtotime('first day of this month'));
|
||||
|
||||
$pageViewsToday = $this->getPageViewCount($currentDate, 'Daily');
|
||||
$uniqueVisitorsToday = $this->getUniqueVisitorCount($currentDate, 'Daily');
|
||||
$pageViewsThisWeek = $this->getPageViewCount($mondayDateThisWeek, 'Weekly');
|
||||
$uniqueVisitorsThisWeek = $this->getUniqueVisitorCount($mondayDateThisWeek, 'Weekly');
|
||||
$pageViewsThisMonth = $this->getPageViewCount($firstDateOfThisThisMonth, 'Monthly');
|
||||
$uniqueVisitorsThisMonth = $this->getUniqueVisitorCount($firstDateOfThisThisMonth, 'Monthly');
|
||||
$chartType = $this->getValue('chartType');
|
||||
|
||||
$runningTotals = json_decode(file_get_contents($this->workspace().'running-totals.json'),TRUE);
|
||||
$pageCount = $runningTotals['runningTotals']['pageCounter'];
|
||||
|
||||
IF ($chartType == 'Monthly') {
|
||||
$offsetNumber = $numberOfMonthsToKeep = $this->getValue('numberOfMonthsToKeep');
|
||||
|
||||
$chartStartDate = date('Y-m-d' , strtotime ( '-'.$offsetNumber.' month' , strtotime ( $firstDateOfThisThisMonth ) ) );
|
||||
$chartEndDate = date("Y-m-d", strtotime ( $firstDateOfThisThisMonth ) );
|
||||
}
|
||||
ELSEIF ($chartType == 'Weekly') {
|
||||
$offsetNumber = $numberOfWeeksToKeep = $this->getValue('numberOfWeeksToKeep');
|
||||
$chartStartDate = date('Y-m-d' , strtotime ( '-'.$offsetNumber.' week' , strtotime ( $mondayDateThisWeek ) ) );
|
||||
$chartEndDate = date("Y-m-d", strtotime ( $mondayDateThisWeek ) );
|
||||
}
|
||||
ELSE { // $chartType == 'Daily'
|
||||
$offsetNumber = $numberOfDaysToKeep = $this->getValue('numberOfDaysToKeep');
|
||||
$chartStartDate = date('Y-m-d' , strtotime ( '-'.$offsetNumber.' week' , strtotime ( $currentDate ) ) );
|
||||
$chartEndDate = date("Y-m-d", strtotime ( $currentDate) );
|
||||
}
|
||||
|
||||
$html = <<<EOF
|
||||
<div class="simple-stats-plugin">
|
||||
<div class="my-5 pt-4 border-top">
|
||||
<h4 class="pb-3">{$L->get('Visits')}</h4>
|
||||
<h4 class="pb-3">$chartType {$L->get('stats-title-label')}</br>($chartStartDate - $chartEndDate)</h4>
|
||||
<h5 class="pb-3">Total Page Count: $pageCount</h5>
|
||||
<div class="ct-chart ct-perfect-fourth"></div>
|
||||
<p class="legends visits-today">{$L->g('Visits today')}: $visitsToday</p>
|
||||
<p class="legends unique-today">{$L->g('Unique visitors today')}: $uniqueVisitors</p>
|
||||
|
||||
<!- Show all the totals for each of the current periods -->
|
||||
<div class="divTable" style="width: 100%;" >
|
||||
<div class="divTableBody">
|
||||
<div class="divTableRow">
|
||||
<div class="divTableCell">
|
||||
<p class="legends visits-today">{$L->get('page-view-today-label')}: $pageViewsToday</p>
|
||||
<p class="legends unique-today">{$L->get('unique-visitors-today-label')}: $uniqueVisitorsToday</p>
|
||||
</div>
|
||||
<div class="divTableCell">
|
||||
<p class="legends visits-today">{$L->get('page-view-this-week-label')}: $pageViewsThisWeek</p>
|
||||
<p class="legends unique-today">{$L->get('unique-visitors-this-week-label')}: $uniqueVisitorsThisWeek</p>
|
||||
</div>
|
||||
<div class="divTableCell">
|
||||
<p class="legends visits-today">{$L->get('page-view-this-month-label')}: $pageViewsThisMonth</p>
|
||||
<p class="legends unique-today">{$L->get('unique-visitors-this-month-label')}: $uniqueVisitorsThisMonth</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
EOF;
|
||||
|
||||
$numberOfDays = $this->getValue('numberOfDays');
|
||||
$numberOfDays = $numberOfDays - 1;
|
||||
for ($i=$numberOfDays; $i >= 0 ; $i--) {
|
||||
IF ($chartType == 'Monthly') {
|
||||
$numberOfMonthsToKeep = $this->getValue('numberOfMonthsToKeep');
|
||||
$numberOfMonthsToKeep = $numberOfMonthsToKeep - 1;
|
||||
|
||||
for ($i=$numberOfMonthsToKeep; $i >= 0 ; $i--) {
|
||||
|
||||
$dateWithOffset = date('Y-m-d' , strtotime ( '-'.$i.' month' , strtotime ( $firstDateOfThisThisMonth ) ) );
|
||||
|
||||
$visits[$i] = $this->getPageViewCount($dateWithOffset, 'Monthly');
|
||||
$unique[$i] = $this->getUniqueVisitorCount($dateWithOffset, 'Monthly');
|
||||
$days[$i] = Date::format($dateWithOffset, 'Y-m-d', 'M y'); /// M
|
||||
}
|
||||
|
||||
$labels = "'" . implode("','", $days) . "'";
|
||||
$seriesVisits = implode(',', $visits);
|
||||
$seriesUnique = implode(',', $unique);
|
||||
}
|
||||
ELSEIF ($chartType == 'Weekly') {
|
||||
$numberOfWeeksToKeep = $this->getValue('numberOfWeeksToKeep');
|
||||
$numberOfWeeksToKeep = $numberOfWeeksToKeep - 1;
|
||||
|
||||
for ($i=$numberOfWeeksToKeep; $i >= 0 ; $i--) {
|
||||
|
||||
$dateWithOffset = date('Y-m-d' , strtotime ( '-'.$i.' week' , strtotime ( $mondayDateThisWeek ) ) );
|
||||
|
||||
$visits[$i] = $this->getPageViewCount($dateWithOffset, 'Weekly');
|
||||
$unique[$i] = $this->getUniqueVisitorCount($dateWithOffset, 'Weekly');
|
||||
$days[$i] = Date::format($dateWithOffset, 'Y-m-d', 'd M');
|
||||
}
|
||||
|
||||
$labels = "'" . implode("','", $days) . "'";
|
||||
$seriesVisits = implode(',', $visits);
|
||||
$seriesUnique = implode(',', $unique);
|
||||
}
|
||||
ELSE { // $chartType == 'Daily'
|
||||
$numberOfDaysToKeep = $this->getValue('numberOfDaysToKeep');
|
||||
$numberOfDaysToKeep = $numberOfDaysToKeep - 1;
|
||||
|
||||
for ($i=$numberOfDaysToKeep; $i >= 0 ; $i--) {
|
||||
|
||||
$dateWithOffset = Date::currentOffset('Y-m-d', '-'.$i.' day');
|
||||
$visits[$i] = $this->visits($dateWithOffset);
|
||||
$unique[$i] = $this->uniqueVisitors($dateWithOffset);
|
||||
|
||||
$visits[$i] = $this->getPageViewCount($dateWithOffset, 'Daily');
|
||||
$unique[$i] = $this->getUniqueVisitorCount($dateWithOffset, 'Daily');
|
||||
$days[$i] = Date::format($dateWithOffset, 'Y-m-d', 'D');
|
||||
}
|
||||
|
||||
$labels = "'" . implode("','", $days) . "'";
|
||||
$seriesVisits = implode(',', $visits);
|
||||
$seriesUnique = implode(',', $unique);
|
||||
}
|
||||
|
||||
$script = <<<EOF
|
||||
<script>
|
||||
@ -125,25 +273,27 @@ $script = <<<EOF
|
||||
</script>
|
||||
EOF;
|
||||
|
||||
$this->deleteOldLogs();
|
||||
$this->deleteOldLogs( 'Daily', $this->getValue('numberOfDaysToKeep') );
|
||||
$this->deleteOldLogs( 'Weekly', $this->getValue('numberOfWeeksToKeep') );
|
||||
$this->deleteOldLogs( 'Monthly',$this->getValue('numberOfMonthsToKeep') );
|
||||
|
||||
/**
|
||||
* Optional Content Stats Feature
|
||||
*/
|
||||
**/
|
||||
if ($this->getValue('showContentStats')) {
|
||||
|
||||
global $pages, $categories, $tags;
|
||||
|
||||
$data['title'] = $L->get('Statistics');
|
||||
$data['tabTitleChart'] = $L->get('Chart');
|
||||
$data['tabTitleTable'] = $L->get('Table');
|
||||
$data['data'][$L->get('published')] = count($pages->getPublishedDB());
|
||||
$data['data'][$L->get('static')] = count($pages->getStaticDB());
|
||||
$data['data'][$L->get('drafts')] = count($pages->getDraftDB());
|
||||
$data['data'][$L->get('scheduled')] = count($pages->getScheduledDB());
|
||||
$data['data'][$L->get('sticky')] = count($pages->getStickyDB());
|
||||
$data['data'][$L->get('categories')]= count($categories->keys());
|
||||
$data['data'][$L->get('tags')] = count($tags->keys());
|
||||
$data['title'] = $L->get('content-statistics-label');
|
||||
$data['tabTitleChart'] = $L->get('tab-chart-label');
|
||||
$data['tabTitleTable'] = $L->get('tab-table-label');
|
||||
$data['data'][$L->get('published-label')] = count($pages->getPublishedDB());
|
||||
$data['data'][$L->get('static-label')] = count($pages->getStaticDB());
|
||||
$data['data'][$L->get('drafts-label')] = count($pages->getDraftDB());
|
||||
$data['data'][$L->get('scheduled-label')] = count($pages->getScheduledDB());
|
||||
$data['data'][$L->get('sticky-label')] = count($pages->getStickyDB());
|
||||
$data['data'][$L->get('categories-label')]= count($categories->keys());
|
||||
$data['data'][$L->get('tags-label')] = count($tags->keys());
|
||||
$html .= $this->renderContentStatistics($data);
|
||||
}
|
||||
|
||||
@ -152,30 +302,56 @@ EOF;
|
||||
|
||||
public function siteBodyEnd()
|
||||
{
|
||||
$this->addVisitor();
|
||||
}
|
||||
global $page;
|
||||
$pageTitleHash = hash(adler32,$page->title(),false);
|
||||
$pageSessionLimit = (60*$this->getValue('pageSessionActiveMinutes')); // 60*60=360
|
||||
|
||||
// Keep only 7 days of logs, remove the old ones
|
||||
public function deleteOldLogs()
|
||||
// Counters will be increased only once a page title session to prevent F5 increases.
|
||||
if ( (!isset($_SESSION[$pageTitleHash])) || ((time()-$_SESSION[$pageTitleHash]) > $pageSessionLimit ) )
|
||||
{
|
||||
//Set Variable for this session so user cannot increase counter by pressing F5
|
||||
$_SESSION[$pageTitleHash] = time();
|
||||
|
||||
IF ($this->getValue('numberOfDaysToKeep') > 0) {
|
||||
$this->addVisitorDaily();
|
||||
}
|
||||
|
||||
IF ($this->getValue('numberOfWeeksToKeep') > 0) {
|
||||
$this->addVisitorWeekly();
|
||||
}
|
||||
|
||||
IF ($this->getValue('numberOfMonthsToKeep') > 0) {
|
||||
$this->addVisitorMonthly();
|
||||
}
|
||||
|
||||
IF (enableOngoingCounter) {
|
||||
$this->increaseCounter();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Keep only number of logs defined in numberOfDaysToKeep, numberOfWeeksToKeep & numberOfMonthsToKeep.
|
||||
public function deleteOldLogs( $periodType, $numberToKeep )
|
||||
{
|
||||
$logs = Filesystem::listFiles($this->workspace(), '*', 'log', true);
|
||||
$remove = array_slice($logs, 7);
|
||||
$logs = Filesystem::listFiles($this->workspace(), '*-'.$periodType, 'log', true);
|
||||
$remove = array_slice($logs, $numberToKeep);
|
||||
|
||||
foreach ($remove as $log) {
|
||||
Filesystem::rmfile($log);
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the amount of visits by date
|
||||
public function visits($date)
|
||||
// Returns the number of page visits by date per day
|
||||
public function getPageViewCount($date, $periodType)
|
||||
{
|
||||
$file = $this->workspace().$date.'.log';
|
||||
$file = $this->workspace().$date.'-'.$periodType.'.log';
|
||||
$handle = @fopen($file, 'rb');
|
||||
if ($handle===false) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// The amount of visits are the number of lines on the file
|
||||
// The number of page visits are the number of lines on the file
|
||||
$lines = 0;
|
||||
while (!feof($handle)) {
|
||||
$lines += substr_count(fread($handle, 8192), PHP_EOL);
|
||||
@ -184,10 +360,10 @@ EOF;
|
||||
return $lines;
|
||||
}
|
||||
|
||||
// Returns the amount of unique visitors by date
|
||||
public function uniqueVisitors($date)
|
||||
// Returns the number of unique visitors by date
|
||||
public function getUniqueVisitorCount($date, $periodType)
|
||||
{
|
||||
$file = $this->workspace().$date.'.log';
|
||||
$file = $this->workspace().$date.'-'.$periodType.'.log';
|
||||
$lines = @file($file);
|
||||
if (empty($lines)) {
|
||||
return 0;
|
||||
@ -202,22 +378,111 @@ EOF;
|
||||
return count($tmp);
|
||||
}
|
||||
|
||||
// Add a line to the current log
|
||||
public function increaseCounter()
|
||||
{
|
||||
$runningTotals = array();
|
||||
$totalPageViews = 0;
|
||||
$totalUniqueVisitors = 0;
|
||||
$resetOngoingCounterValue = $this->getValue('resetOngoingCounterValue');
|
||||
try
|
||||
{
|
||||
|
||||
if (!file_exists($this->workspace().'running-totals.json') ) {
|
||||
$runningTotals['runningTotals'] = array(
|
||||
'pageCounter' => 0,
|
||||
'uniqueCounter' => 0 // not used at the moment - would need to read today's log file to determin if visitor exists
|
||||
);
|
||||
}
|
||||
else {
|
||||
$runningTotals = json_decode(file_get_contents($this->workspace().'running-totals.json'),TRUE);
|
||||
}
|
||||
|
||||
if ($resetOngoingCounterValue < 0 ) {
|
||||
$runningTotals['runningTotals']['pageCounter']++;
|
||||
}
|
||||
else {
|
||||
$runningTotals['runningTotals']['pageCounter'] = $resetOngoingCounterValue;
|
||||
}
|
||||
|
||||
//Encode the array back into a JSON string.
|
||||
$json = json_encode($runningTotals);
|
||||
|
||||
//Save the file.
|
||||
file_put_contents($this->workspace().'running-totals.json', $json);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
echo 'Caught exception: '.$e->getMessage();
|
||||
}
|
||||
|
||||
// $formatStyle=NumberFormatter::TYPE_INT32;
|
||||
// $formatter= new NumberFormatter($locale, $formatStyle);
|
||||
// echo "Running total = ".$formatter->format($runningTotals['runningTotals']['pageCounter']);
|
||||
|
||||
}
|
||||
|
||||
// Add a line to the current Daily log
|
||||
// The line is a json array with the hash IP of the visitor and the time
|
||||
public function addVisitor()
|
||||
public function addVisitorDaily()
|
||||
{
|
||||
if (Cookie::get('BLUDIT-KEY') && defined('BLUDIT_PRO') && $this->getValue('excludeAdmins')) {
|
||||
return false;
|
||||
}
|
||||
$currentTime = Date::current('Y-m-d H:i:s');
|
||||
|
||||
$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';
|
||||
$logDailyFile = $this->workspace().$currentDate.'-Daily.log';
|
||||
|
||||
return file_put_contents($logFile, $line.PHP_EOL, FILE_APPEND | LOCK_EX)!==false;
|
||||
return file_put_contents($logDailyFile, $line.PHP_EOL, FILE_APPEND | LOCK_EX)!==false;
|
||||
|
||||
}
|
||||
|
||||
// Add a line to the current Weekly log
|
||||
// The line is a json array with the hash IP of the visitor and the time
|
||||
public function addVisitorWeekly()
|
||||
{
|
||||
if (Cookie::get('BLUDIT-KEY') && defined('BLUDIT_PRO') && $this->getValue('excludeAdmins')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$mondayDateTimeThisWeek = date("Y-m-d", strtotime('monday this week')).' '. date('H:i:s', strtotime("now"));
|
||||
|
||||
$ip = TCP::getIP();
|
||||
$hashIP = md5($ip);
|
||||
|
||||
$line = json_encode(array($hashIP, $mondayDateTimeThisWeek));
|
||||
|
||||
$mondayDateThisWeek = date("Y-m-d", strtotime('monday this week'));
|
||||
|
||||
$logWeeklyFile = $this->workspace().$mondayDateThisWeek.'-Weekly.log';
|
||||
|
||||
return file_put_contents($logWeeklyFile, $line.PHP_EOL, FILE_APPEND | LOCK_EX)!==false;
|
||||
|
||||
}
|
||||
|
||||
// Add a line to the current Monthly log
|
||||
// The line is a json array with the hash IP of the visitor and the time
|
||||
public function addVisitorMonthly()
|
||||
{
|
||||
if (Cookie::get('BLUDIT-KEY') && defined('BLUDIT_PRO') && $this->getValue('excludeAdmins')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$firstDateTimeOfThisThisMonth = date("Y-m-d", strtotime('first day of this month')).' '. date('H:i:s', strtotime("now"));
|
||||
|
||||
$ip = TCP::getIP();
|
||||
$hashIP = md5($ip);
|
||||
|
||||
$line = json_encode(array($hashIP, $firstDateTimeOfThisThisMonth));
|
||||
|
||||
$firstDateOfThisThisMonth = date("Y-m-d", strtotime('first day of this month'));
|
||||
|
||||
$logMonthyFile = $this->workspace().$firstDateOfThisThisMonth.'-Monthly.log';
|
||||
|
||||
return file_put_contents($logMonthyFile, $line.PHP_EOL, FILE_APPEND | LOCK_EX)!==false;
|
||||
}
|
||||
|
||||
public function renderContentStatistics($data)
|
||||
@ -267,5 +532,4 @@ EOF;
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user