Skip to content

Post Prune 1.0.0-beta2

Pre-release
Pre-release

Choose a tag to compare

@uflagmey uflagmey released this 11 Nov 16:20
· 51 commits to main since this release

Beta: Erst auf einem Testboard oder mit Backup + Trockenlauf einsetzen. · Use it on a test board first, or with a backup + dry run.

Deutsch

Änderungen seit 1.0.0-beta1

  • Trockenlauf protokolliert auch 0 Kandidaten: Pro abgeschlossenem Zyklus gibt es immer einen Eintrag im Administrations-Protokoll („Im Forum „…“ würde kein Beitrag gelöscht“). So sieht man, dass der Cron gelaufen ist. Der Aktiv-Modus ist unverändert.
  • HTML5-Markup statt XHTML in den Log-Texten und im ACP-Formular (<br>, <input …>, checked, selected).
  • README: neuer Abschnitt „Erste Schritte / Häufige Stolpersteine“ (Einstellungen finden, Verwechslung mit „Automatisches Löschen inaktiver Themen“, Cron und Seitenaufrufe, Checkliste ohne Protokolleintrag).

Post Prune löscht in ausgewählten Foren einzelne Beiträge samt Dateianhängen automatisch und endgültig, sobald sie älter als N Tage sind. Gedacht z. B. für eine Witze-Ecke, die files/ füllt (Anfrage auf phpBB.de, t=248190).

  • Pro Forum einstellbar: Aus / Trockenlauf / Aktiv, Alter in Tagen, Startbeitrag behalten, wichtige Themen und Bekanntmachungen ausnehmen, Beitragszähler reduzieren (Standard: nein).
  • Gelöscht wird nur über die phpBB-Kernfunktion delete_posts(): Anhänge samt Dateien, Suchindex, Meldungen und Benachrichtigungen werden mit entfernt, Themen, Foren und Statistik synchronisiert.
  • Standardmäßig höchstens 200 Beiträge pro Cron-Lauf, ein Rückstand wird in Portionen abgearbeitet.
  • „Startbeitrag behalten“ lässt Themen dauerhaft stehen. Um ganze Themen zu entfernen, mit dem Themen-Pruning von phpBB kombinieren.
  • Die Löschung ist unwiderruflich. Empfehlung: erst Backup, dann Trockenlauf (Ergebnis im Administrations-Protokoll), dann Aktiv.

Installation: postprune-1.0.0-beta2.zip unten herunterladen, entpacken, den Ordner uflagmey/postprune/ nach ext/ hochladen und im ACP aktivieren. Nicht „Source code (zip)“ bzw. „Code → Download ZIP“ verwenden. Das ist der Quellcode mit falscher Ordnerstruktur.

Voraussetzungen: phpBB 3.3.x, PHP 7.2+ (getestet mit PHP 8.3). Getestet auf phpBB 3.3.17 und 3.3.19 mit MariaDB 10.11.

English

Changes since 1.0.0-beta1

  • Dry run also logs 0 candidates: every completed cycle writes one admin log entry (“No posts in forum “…” would be deleted”), so you can see that the cron ran. Active mode is unchanged.
  • HTML5 markup instead of XHTML in the log texts and the ACP form (<br>, <input …>, checked, selected).
  • README: new section “Getting started / common pitfalls” (finding the settings, not confusing it with “Prune forums”, cron and page requests, checklist when no log entry appears).

Post Prune automatically and permanently deletes individual posts, including their attachments, in selected forums once they are older than N days.

  • Per forum: Off / Dry run / Active, age in days, keep the first post, skip stickies and announcements, reduce user post counts (default: no).
  • Deletion goes exclusively through phpBB's core function delete_posts(): attachments and their files, search index entries, reports and notifications are removed, and topics, forums and statistics are resynced.
  • By default at most 200 posts per cron run; a backlog is worked off in portions.
  • “Keep first post” leaves topics in place permanently. To remove whole topics, combine it with phpBB's topic pruning.
  • Deletion is irreversible. Recommended: backup first, then dry run (result in the admin log), then Active.

Installation: download postprune-1.0.0-beta2.zip below, unpack it, upload the folder uflagmey/postprune/ to ext/ and enable it in the ACP. Do not use “Source code (zip)” or “Code → Download ZIP”: that is the source code with the wrong folder layout.

Requirements: phpBB 3.3.x, PHP 7.2+ (tested with PHP 8.3). Tested on phpBB 3.3.17 and 3.3.19 with MariaDB 10.11.


postprune-1.0.0-beta2.zip SHA-256: 5932b7cc56437644323d8e21b20d522b5f48013cb5dd6b3ec6c188d16c18bda6