Repository navigation
Post Prune 1.0.0-beta4
Pre-releaseBeta: Erst auf einem Testboard oder mit Backup + Trockenlauf einsetzen. · Use it on a test board first, or with a backup + dry run.
Deutsch
Update von 1.0.0-beta3 (oder älter)
Wie bei 1.0.0-beta3. Ab 1.0.0-beta3 ist phpBB 3.3.3 oder neuer nötig (1.0.0-beta1 lief noch ab 3.3.0); ein älteres Board zuerst aktualisieren.
- Backup von Datenbank und
files/. - Die neuen Dateien hochladen und
ext/uflagmey/postprune/überschreiben. - ACP → Anpassen → Erweiterungen verwalten: „Post Prune“ deaktivieren und wieder aktivieren. Nicht „Arbeitsdaten löschen“ wählen, das entfernt alle Einstellungen.
Von 1.0.0-beta3 aus ändert sich an der Datenbank nichts; Einstellungen, Geltungsbereich und markierte Themen bleiben erhalten. Von 1.0.0-beta1/-beta2 aus bleiben die Foren-Einstellungen erhalten, der Geltungsbereich steht überall auf „Ganzes Forum“ (Verhalten wie bisher). Ohne Schritt 3 geht nichts kaputt: Die Extension arbeitet wie die Vorversion weiter, nur die neuen Funktionen fehlen; sobald der Cache geleert ist, weist das ACP auf den fehlenden Schritt hin.
Nach dem Zurückspielen eines Datenbank-Backups immer den Cache leeren (ACP → Allgemein → „Cache leeren“), erst dann die Erweiterung deaktivieren/aktivieren. Bis dahin laufen die Seiten des Boards und die übrigen geplanten Aufgaben von phpBB normal weiter; Post Prune löscht nichts und schreibt einmal pro Zyklus „Post Prune: Datenbankschema passt nicht zum Cache – bitte Cache leeren“ ins Fehler-Protokoll.
Änderungen seit 1.0.0-beta3
- ACP, Forum-Formular, „Markierte Themen“: Die Liste erscheint jetzt wie die übrigen Feldinhalte im ACP: ohne Aufzählungspunkte, in normaler Schriftgröße, ein Thema pro Zeile (Titel als Link, dahinter „(ID n)“). Der Hinweis „In diesem Forum sind N Themen markiert …“ und „Keine Themen markiert …“ stehen ebenfalls in normaler Schrift (bisher fett, klein, grau).
- README: „Update von einer früheren Version“ nennt jetzt auch 1.0.0-beta3 als Ausgangsstand.
- Sonst keine Änderungen; Funktion, Datenbank und Sprachdateien sind unverändert. Alle Änderungen seit 1.0.0-beta2 siehe Release 1.0.0-beta3.
Post Prune löscht in ausgewählten Foren oder in ausgewählten Themen einzelne Beiträge samt Dateianhängen automatisch und endgültig, sobald sie älter als N Tage sind. Gedacht z. B. für eine Witzeecke, die files/ füllt (Anfrage auf phpBB.de, t=248190).
- Pro Forum einstellbar: Aus / Trockenlauf / Aktiv, Geltungsbereich (ganzes Forum oder nur markierte Themen), 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-beta4.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.3 oder neuer (3.3.x), getestet mit 3.3.17 und 3.3.19 (MariaDB 10.11); PHP 7.2+ (getestet mit PHP 8.3).
English
Updating from 1.0.0-beta3 (or older)
Same as for 1.0.0-beta3. Since 1.0.0-beta3, phpBB 3.3.3 or newer is required (1.0.0-beta1 still ran on 3.3.0 and later); update an older board first.
- Backup of database and
files/. - Upload the new files, overwriting
ext/uflagmey/postprune/. - ACP → Customise → Manage extensions: disable and enable “Post Prune” again. Do not choose “Delete data”, that removes all settings.
From 1.0.0-beta3 nothing changes in the database; settings, scope and marked topics are kept. From 1.0.0-beta1/-beta2 the forum settings are kept and the scope is “Whole forum” everywhere (same behaviour as before). Skipping step 3 breaks nothing: the extension keeps working like the previous version, only the new features are missing; once the cache is purged, the ACP points out the missing step.
After restoring a database backup always purge the cache (ACP → General → “Purge the cache”), and only then disable/enable the extension. Until then the board's pages and phpBB's other scheduled tasks keep working normally; Post Prune deletes nothing and writes “Post Prune: database schema does not match the cache – please purge the cache” to the error log once per cycle.
Changes since 1.0.0-beta3
- ACP, forum form, “Marked topics”: the list now looks like the other field contents in the ACP: no bullets, normal font size, one topic per line (title as link, followed by “(ID n)”). The notice “N topics are marked in this forum …” and “No topics marked …” are shown in normal type as well (previously bold, small, grey).
- README: “Updating from an earlier version” now also names 1.0.0-beta3 as starting point.
- No other changes; function, database and language files are unchanged. For all changes since 1.0.0-beta2 see release 1.0.0-beta3.
Post Prune automatically and permanently deletes individual posts, including their attachments, in selected forums or selected topics once they are older than N days.
- Per forum: Off / Dry run / Active, scope (whole forum or marked topics only), 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-beta4.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.3 or newer (3.3.x), tested with 3.3.17 and 3.3.19 (MariaDB 10.11); PHP 7.2+ (tested with PHP 8.3).
postprune-1.0.0-beta4.zip SHA-256: 59382c1ee40b90c0521d571f251381f6702b19b4fb2f4ede2a82dc17a50a2edf