feat : TrendingParser + flux RSS tendances + page publique /tendances (v1.6.4)
- TrendingParser : lit les logs Apache, compte les visiteurs uniques (IPs, HTTP 200), supporte plusieurs préfixes (/post/, /book/) et un seul parse via topGrouped() - /trending?period=… : flux RSS des 50 articles les plus consultés, 10 périodes de 10 min à 1 an, cache TTL adaptatif - /tendances : page publique avec sélecteur de période, top 20 articles, tableau des flux RSS et section méthodologie - /admin/stats : remplace AccessLogParser (hits) par TrendingParser (visiteurs uniques) - Page d'accueil : rubrique Tendances alimentée par les logs 1h (fallback DB) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ $_activeGroup = trim($_GET['group'] ?? '');
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
<p class="text-muted small mb-4">14 derniers jours · cache 10 min</p>
|
||||
<p class="text-muted small mb-4">14 derniers jours · visiteurs uniques · cache 60 s</p>
|
||||
|
||||
<div class="row g-4">
|
||||
|
||||
@@ -61,7 +61,7 @@ $_activeGroup = trim($_GET['group'] ?? '');
|
||||
<div class="progress-bar" style="width:<?= $pct ?>%"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end fw-semibold pe-3"><?= number_format($hits, 0, ',', '\u{202F}') ?></td>
|
||||
<td class="text-end fw-semibold pe-3"><?= number_format($hits, 0, ',', '\u{202F}') ?> <span class="text-muted fw-normal">vis.</span></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
@@ -106,7 +106,7 @@ $_activeGroup = trim($_GET['group'] ?? '');
|
||||
<div class="progress-bar bg-success" style="width:<?= $pct ?>%"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end fw-semibold pe-3"><?= number_format($hits, 0, ',', '\u{202F}') ?></td>
|
||||
<td class="text-end fw-semibold pe-3"><?= number_format($hits, 0, ',', '\u{202F}') ?> <span class="text-muted fw-normal">vis.</span></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
||||
@@ -159,7 +159,7 @@ function _renderCard(array $post, array $privateCats, array $allCats, \Parsedown
|
||||
<?php if (!empty($popularPosts)): ?>
|
||||
<section class="home-section">
|
||||
<h2 class="home-section-title">
|
||||
Tendances <span class="home-section-title-sub">· 10 derniers jours</span>
|
||||
Tendances <span class="home-section-title-sub">· 1 heure</span>
|
||||
</h2>
|
||||
<div class="post-grid">
|
||||
<?php foreach ($popularPosts as $_pp): ?>
|
||||
|
||||
Reference in New Issue
Block a user