[258] | 1 | <?php |
---|
| 2 | $seiten_id = 'news'; |
---|
| 3 | $version = '$Id: news.php 649 2014-08-28 13:40:34Z sven $'; |
---|
| 4 | $titel = "What's new?"; |
---|
[649] | 5 | $menu_version = 2; |
---|
| 6 | |
---|
[258] | 7 | $neues_menu = <<< MENU |
---|
[649] | 8 | - datum: July 2014 |
---|
| 9 | titel: "Historic workshop device" |
---|
| 10 | text: "<em>A historic 5-bit character decoder</em> from the university. Here it is used as a decryption engine in our experimental workshop." |
---|
| 11 | bild: /shared/photos/kommunikationstechnik/telegrafenalphabet.jpg |
---|
| 12 | link: /de/kommunikationstechnik/faxtechnik.php#decoder |
---|
[483] | 13 | |
---|
[649] | 14 | - datum: June 2014 |
---|
| 15 | titel: "Art installation with cards" |
---|
| 16 | text: "Our Cardpunch IBM029 were on jorney: For some time, it were part of an art installation in Tübingen (Baden-Wüttemberg, near Stuttgart)." |
---|
| 17 | bild: /shared/photos/rechnertechnik/tuebingen.jpg |
---|
| 18 | link: http://www.kunst-stoff.fr/tresorraum/wir-die-iborgs/ |
---|
| 19 | |
---|
| 20 | - datum: May 2014 |
---|
| 21 | titel: "Facit papertape device" |
---|
| 22 | untertitel: "IBM1130" |
---|
| 23 | text: "Periphery of the 1130: Facit tape devices" |
---|
| 24 | bild: /shared/photos/rechnertechnik/facit4000.jpg |
---|
| 25 | link: /en/computer/ibm1130.php#1130 |
---|
| 26 | |
---|
| 27 | - datum: January 2014 |
---|
| 28 | titel: "IBM 1130" |
---|
| 29 | text: "A new callenge: IBM 1130 Mainframe" |
---|
| 30 | bild: /shared/photos/rechnertechnik/ibm-1130.jpg |
---|
| 31 | link: /en/computer/ibm1130.php#ibm1130 |
---|
| 32 | |
---|
| 33 | - datum: December 2013 |
---|
| 34 | titel: Reproducing punch |
---|
| 35 | untertitel: A new IBM device |
---|
| 36 | text: "Recruit: A large IBM reproducing punch from the early days of computing" |
---|
| 37 | bild: /shared/photos/rechnertechnik/ibm-514.jpg |
---|
| 38 | link: /en/computer/punchcard.php#reproducing |
---|
| 39 | |
---|
| 40 | - datum: September 2013 |
---|
| 41 | titel: "Gamma 55 is up und running" |
---|
| 42 | text: "Success! The BULL GAMMA 55 is up and running! An historical moment." |
---|
| 43 | bild: /shared/photos/rechnertechnik/leser617.jpg |
---|
| 44 | link: /en/computer/gamma55.php#ge-55 |
---|
| 45 | |
---|
[258] | 46 | MENU; |
---|
| 47 | // ende der menue-Eintraege |
---|
| 48 | |
---|
[649] | 49 | if(!require("../lib/news.php")) return; |
---|
[258] | 50 | ?> |
---|
[598] | 51 | |
---|
[313] | 52 | <h2>What's new?</h2> |
---|
[258] | 53 | |
---|
[102] | 54 | <p>This is a news feed for the recent changes on our homepage. The latest |
---|
| 55 | posts are on top.</p> |
---|
[100] | 56 | |
---|
[649] | 57 | <!-- |
---|
| 58 | ACHTUNG, Testlauf im ENGLISCHEN: |
---|
[140] | 59 | |
---|
[649] | 60 | Der Inhalt der Neuigkeiten-Datei im englischen ist nun nicht mehr "doppelt-gemoppelt", sondern |
---|
| 61 | wird nur noch einmal gewartet, und zwar in dem obigen Auflistungsbereich. Im Bereich hier unten |
---|
| 62 | wird der obige Inhalt nur noch in die gewohnte HTML-Formatierung gebracht. |
---|
[562] | 63 | |
---|
[649] | 64 | - Sven, 28. August 2014 |
---|
| 65 | --> |
---|
[562] | 66 | |
---|
[649] | 67 | <ul class="news-feed news-ng"> |
---|
| 68 | <?php /* soll funktion werden in news.php */ |
---|
| 69 | //function print_newsfeed() { |
---|
| 70 | // global $neues_menu, $lib; |
---|
| 71 | require $lib.'/spyc.php'; |
---|
| 72 | $data = Spyc::YAMLLoad($neues_menu); |
---|
| 73 | $fields = array('titel', 'datum', 'text'); |
---|
[594] | 74 | |
---|
[649] | 75 | $news_ul_content = ''; |
---|
| 76 | foreach($data as $e) { |
---|
| 77 | if(!array_reduce(array_map(function($x) use ($fields,$e){ return isset($e[$x]); }, $fields), |
---|
| 78 | function($a,$b){ return $a && $b;}, true)) { |
---|
| 79 | print "<li><a href='#'>Fehler in Formatierung!<em>Dieser Menüeintrag ist falsch formatiert</em></a></li>"; |
---|
| 80 | $this->log->WARN("<h5>Neuigkeiten-Liste: Fehler in Formatierung</h5><p>Ein Eintrag in der Neuigkeisten-Liste ist falsch formatiert. Ich erwarte zu jedem Menüeintrag die Felder ".implode(", ", $fields).". Eine der Angaben fehlt oder ist fehlerhaft formatiert: <pre>".var_export($e, true)."</pre>"); |
---|
| 81 | } else { |
---|
| 82 | ?><li><a href="<?php print isset($e['link']) ? $e['link'] : '#'; ?>"> |
---|
| 83 | <h3><?php print $e['datum']; ?></h3> |
---|
| 84 | <?php print isset($e['bild']) ? "<img src='$e[bild]' alt='$e[titel]'>" : ''; ?> |
---|
| 85 | <?php print $e['text']; ?> |
---|
| 86 | </a></li> |
---|
| 87 | <?php |
---|
| 88 | } |
---|
| 89 | } |
---|
| 90 | //} |
---|
[598] | 91 | |
---|
[483] | 92 | |
---|
[649] | 93 | // print_newsfeed(); |
---|
| 94 | ?> |
---|
| 95 | </ul> |
---|
[483] | 96 | |
---|
| 97 | |
---|
[121] | 98 | |
---|