🛡️ Bot Protection Plugin – Dokumentation / Documentation - Version 1.0.1

🔐 Beschreibung & Struktur

Dieses Plugin schützt deine gesamte Piwigo-Webseite vor unerwünschten Bots und direkten Zugriffen. Es blockiert bekannte User-Agents, verhindert Aufrufe ohne Referer und protokolliert blockierte Zugriffe.

🔧 Struktur:

/_data/bot_protection/
├── bot_log.txt                  → Logdatei für blockierte Zugriffe
├── blocked_bots.txt             → Liste blockierter User-Agents (Blacklist)
├── blocked_ips.txt              → Manuell gesperrte IP-Adressen
├── ip_log.txt                   → Überblick, welche IPs aktiv blockiert wurden
├── visitor_stats.json           → Besuchszähler & Tagesstatistik
├── bot_stats.json               → Statistik blockierter Bots (nach User-Agent)
├── whitelist_stats.json         → Nutzungsstatistik freigegebener Bots
└── whitelisted_bots.txt         → Liste erlaubter User-Agents (Whitelist)
└── whitelisted_ips.txt          → für zulässige IP-Adressen

/plugins/bot_protection/
├── main.inc.php                 → Initialisierung & zentraler Einstiegspunkt
├── admin.php                    → Einstiegspunkt für das Admin-Interface
├── css/
│   └── style.css                → Plugin-Layout und Tab-Design
├── include/
│   ├── bot_protection.php       → Schutzlogik (Bot-Erkennung & Blockierung)
│   └── visitor_counter.php      → Besucherzähler mit IP-Hashing
├── admin/
│   └── bot_protection_admin.php → Verarbeitung & Anzeige im Adminbereich
├── template/
│   └── bot_protection.tpl       → Smarty-Template für Admin-Oberfläche
└── language/
    ├── de_DE/plugin.lang.php    → Deutsche Sprachdatei
    ├── en_UK/plugin.lang.php    → Englische Sprachdatei
    └── fr_FR/plugin.lang.php    → Französische Sprachdatei
    

⚙️ Funktionen:

📍 Zugriff im Adminbereich:

Nach der Aktivierung findest du den Menüpunkt unter: Plugins → Bot Protection

🔐 Description & Structure

This plugin protects your entire Piwigo website from unwanted bots and direct access. It blocks known User-Agents, prevents requests without a referer, and logs all blocked attempts.

🔧 Structure:

/_data/bot_protection/
├── bot_log.txt                  → Log file for blocked access attempts
├── blocked_bots.txt             → List of blocked user agents (blacklist)
├── blocked_ips.txt              → Manually blocked IP addresses
├── ip_log.txt                   → Overview of which IPs were actively blocked
├── visitor_stats.json           → Visitor counter & daily statistics
├── bot_stats.json               → Bot block statistics (by user agent)
├── whitelist_stats.json         → Usage stats for whitelisted bots
├── whitelisted_bots.txt         → List of allowed user agents (whitelist)
└── whitelisted_ips.txt          → for permissible IP addresses

/plugins/bot_protection/
├── main.inc.php                 → Initialization & plugin entry point
├── admin.php                    → Entry point for the admin interface
├── css/
│   └── style.css                → Plugin layout and tab styling
├── include/
│   ├── bot_protection.php       → Protection logic (bot detection & blocking)
│   └── visitor_counter.php      → Visitor counter with IP hashing
├── admin/
│   └── bot_protection_admin.php → Admin page logic and data handling
├── template/
│   └── bot_protection.tpl       → Smarty template for admin interface
└── language/
    ├── de_DE/plugin.lang.php    → German translation
    ├── en_UK/plugin.lang.php    → English translation
    └── fr_FR/plugin.lang.php    → French translation
    

⚙️ Features:

📍 Access in admin panel:

After activation, find the menu entry under: Plugins → Bot Protection

🔐 Description & Structure

Ce plugin protège l’ensemble de votre site Piwigo contre les robots indésirables et les accès directs. Il bloque les agents utilisateurs connus, empêche les requêtes sans référent et enregistre toutes les tentatives bloquées.

🔧 Structure :

/_data/bot_protection/
├── bot_log.txt                  → Journal des accès bloqués
├── blocked_bots.txt             → Liste des user-agents bloqués (liste noire)
├── blocked_ips.txt              → Adresses IP bloquées manuellement
├── ip_log.txt                   → Aperçu des adresses IP ayant été bloquées activement
├── visitor_stats.json           → Compteur de visiteurs & statistiques par jour
├── bot_stats.json               → Statistiques des bots bloqués (par agent)
├── whitelist_stats.json         → Statistiques d’accès des bots autorisés
├── whitelisted_bots.txt         → Liste des user-agents autorisés (liste blanche)
└── whitelisted_ips.txt          → pour les adresses IP autorisées

/plugins/bot_protection/
├── main.inc.php                 → Point d’entrée principal & initialisation
├── admin.php                    → Point d’entrée de l’interface d’administration
├── css/
│   └── style.css                → Style et mise en page des onglets
├── include/
│   ├── bot_protection.php       → Logique de protection (détection & blocage)
│   └── visitor_counter.php      → Compteur de visiteurs avec hachage IP
├── admin/
│   └── bot_protection_admin.php → Traitement des données et affichage admin
├── template/
│   └── bot_protection.tpl       → Template Smarty pour l’interface d’administration
└── language/
    ├── de_DE/plugin.lang.php    → Traduction allemande
    ├── en_UK/plugin.lang.php    → Traduction anglaise
    └── fr_FR/plugin.lang.php    → Traduction française
    

⚙️ Fonctionnalités :

📍 Accès depuis l’interface d’administration :

Après activation, retrouvez l’entrée de menu sous : Plugins → Bot Protection