From 2c532137a5ed9d091d45c4f44d4c4762a3afcac9 Mon Sep 17 00:00:00 2001 From: Christopher Date: Sun, 15 Oct 2023 00:38:55 +0200 Subject: [PATCH 1/8] News System angepasst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Das News-System für die Webseite wurde angepasst und vereinfacht in der abfrage. --- pages/news/exports/10-18-2022_22-57-39.json | 5 ---- pages/news/exports/11-08-2022_21-04-57.json | 5 ---- pages/news/news-class.php | 33 +++++++++++++-------- 3 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 pages/news/exports/10-18-2022_22-57-39.json delete mode 100644 pages/news/exports/11-08-2022_21-04-57.json diff --git a/pages/news/exports/10-18-2022_22-57-39.json b/pages/news/exports/10-18-2022_22-57-39.json deleted file mode 100644 index 64cbd31..0000000 --- a/pages/news/exports/10-18-2022_22-57-39.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Änderungen am Discord.", - "text": "Liebe Mitglieder, in vergangenen Monaten gab es wenig Änderungen bezüglich der Struktur, Regeln oder Funktionen auf unserem Discord. In den nächsten Tagen wollen wir deshalb einiges verändern oder auf den aktuellen Stand bringen. Wir bitten daher um Verständnis, sollte mal ein Chat nicht wie gewohnt funktionieren. \n\nDanke euch 🙂", - "image": "https://media.discordapp.net/attachments/651895824153968679/911968131336003584/2017-07-15_16.41.05.png" -} \ No newline at end of file diff --git a/pages/news/exports/11-08-2022_21-04-57.json b/pages/news/exports/11-08-2022_21-04-57.json deleted file mode 100644 index c6aa0a4..0000000 --- a/pages/news/exports/11-08-2022_21-04-57.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "title": "Entwickler gesucht!", - "text": "Wir suchen derzeit neue Teammitglieder im bereich Java Entwicklung. Unter https://ifheroes.de/index.php?page=jobs könnt ihr mehr erfahren.", - "image": "https://cdn.discordapp.com/attachments/437648990515888130/1039629664227954769/1080x360.jpg" -} \ No newline at end of file diff --git a/pages/news/news-class.php b/pages/news/news-class.php index b155aa0..6e637ee 100644 --- a/pages/news/news-class.php +++ b/pages/news/news-class.php @@ -2,23 +2,25 @@ $location_scandir = "./pages/news/exports/"; $files = scandir($location_scandir, SCANDIR_SORT_DESCENDING); ///bekomme alle dateien im Ordner Exports und sortiere alphabetisch -$n = '0'; ///definiere einen counter und setzte diesen auf 0 +$num_availe = count(scandir($location_scandir))-2; /// prüfung wie viele files sind vorhanden -while ($n < 2) { /// währen die Variable "n" kleiner als 2 ist gebe die Json Infos aus - $content = file_get_contents($location_scandir . $files[$n]); /// bekomme alle inhalte von files, oben und setzte diese in einen Counter - $files_url = $files[$n]; /// Definiert eine Variable für eine URL die nachher auf files verweist +if($num_availe == 1){ + echo "nur einer".file_get_contents($location_scandir.$files[0]); + $json_scandir = json_decode(file_get_contents($location_scandir.$files[0]), true); +} elseif($num_availe == 0){ +//// anmerkung zum Discord für news und mehr und weiter zur Status seite #todo +} elseif ($num_availe >2){ + $json_scandir = json_decode(file_get_contents($location_scandir.$files[0]), true); + $json_scandir2 = json_decode(file_get_contents($location_scandir.$files[1]), true); - $n++; /// füge dem counter +1 hinzu bei jedem durchlauf der while schleife - $json_scandir = json_decode($content, true); /// decode json datei - -?> + ?>
- "> + ">

@@ -26,9 +28,14 @@
+
+ "> +
+

+
+
+
+
\ No newline at end of file +} From 8f703f2b7d2d44e39e4109f3dd9e1f7da78856ce Mon Sep 17 00:00:00 2001 From: Christopher Date: Sat, 28 Oct 2023 23:19:55 +0200 Subject: [PATCH 2/8] 28.10. / Q4 2023 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #20 Survival auf Startseite eingefügt #21 Datum nun in Feed Beiträgen abrufbar --- pages/games/games-class.php | 29 ------------------ pages/home.php | 33 +++++++++++++++++++++ pages/navbar.php | 11 +++++-- pages/news/exports/10-18-2022_22-57-39.json | 5 ++++ pages/news/exports/10-23-2022_22-57-38.json | 5 ++++ pages/news/news-class.php | 21 +++++++++++-- pages/news/news-thread-overview.php | 16 +++++++++- 7 files changed, 84 insertions(+), 36 deletions(-) create mode 100644 pages/news/exports/10-18-2022_22-57-39.json create mode 100644 pages/news/exports/10-23-2022_22-57-38.json diff --git a/pages/games/games-class.php b/pages/games/games-class.php index f6f7a86..d128174 100644 --- a/pages/games/games-class.php +++ b/pages/games/games-class.php @@ -1,32 +1,3 @@ - -
-
-
-

games[0]->survival_title; ?>

-
- games[0]->survival_text; ?> -

-

- - - -

-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
diff --git a/pages/home.php b/pages/home.php index cd67e05..e22c771 100644 --- a/pages/home.php +++ b/pages/home.php @@ -54,6 +54,39 @@ + + + + + +
+
+

games[0]->survival_title; ?>

+
+
+
+
+
+ games[0]->survival_text; ?> +

+

+ + + +

+
+
+
+ +
+
+
+
+ + +
+
+
-