Stadionzeitung Untersteinach vorbereiten und Instagram aktualisieren

This commit is contained in:
2026-10-16 22:50:26 +02:00
parent 5a107a955a
commit 33b73087cf
33 changed files with 773 additions and 3 deletions

View File

@@ -393,6 +393,21 @@ if (is_file($szFile)) {
if (is_file($szFile)) {
$szData = $szData ?? (json_decode((string) file_get_contents($szFile), true) ?: []);
foreach ($szData['issues'] ?? [] as $ausgabe) {
if (is_array($ausgabe['rueckblick'] ?? null)) {
$rueckblick = $ausgabe['rueckblick'];
$foto = $rueckblick['image'] ?? [];
if (empty($foto['base']) || empty($foto['widths'])) {
$errors[] = "Stadionzeitung '{$ausgabe['slug']}': Foto zum Spielrückblick fehlt.";
}
foreach ($foto['widths'] ?? [] as $w) {
if (!is_file(PUBLIC_PATH . '/assets/' . ($foto['base'] ?? '') . "-{$w}.jpg")) {
$errors[] = "Stadionzeitung '{$ausgabe['slug']}': Rückblick-Foto fehlt ({$w}px).";
}
}
if (trim((string) ($rueckblick['credit'] ?? '')) === '') {
$errors[] = "Stadionzeitung '{$ausgabe['slug']}': Bildnachweis zum Spielrückblick fehlt.";
}
}
foreach ($ausgabe['galerie']['bilder'] ?? [] as $bild) {
foreach ($bild['widths'] ?? [] as $w) {
$datei = PUBLIC_PATH . '/assets/' . ($bild['base'] ?? '') . "-{$w}.jpg";