| 002 24.11.2013, 18:05 Uhr
 meikel
 
 
   
 
 | 
 | Zitat: |  | MarioG schrieb Ich hab die rss-Sache damals geschrieben.
 | 
 Tach Kollege.
 
 
 | Zitat: |  | Ich kann mich nicht mehr genau daran erinnern, warum ich das bbc-parsing nicht mit darein genommen hatte. Evtl. aus Performancegründen oder so. | 
 Das muß nicht geparst werden. Die ubb Codes im Original wären mir fast lieber.
 Hier mal mein Anzeigescript:
 
 
 | PHP-Quellcode: |  | <?php
 
 $_SERVER['TEST']['CHARSET'] = 'iso-8859-1';
 $_SERVER['TEST']['CSS'] = '
 a:link { color: #1B6ECC; text-decoration: none; }
 a:visited { color: #1B6ECC; text-decoration: none; }
 a:hover { color: #69B271; text-decoration: none; }
 a:active { color: #1B6ECC; text-decoration: none; }
 a.bglink:link { color: #454545; text-decoration: underline; }
 a.bglink:visited { color: #454545; text-decoration: underline; }
 a.bglink:hover { color: #454545; text-decoration: none; }
 a.bglink:active { color: #454545; text-decoration: underline; }
 a.hefo:link { color: #ECECEC; text-decoration: underline; }
 a.hefo:visited { color: #ECECEC; text-decoration: underline; }
 a.hefo:hover { color: #ECECEC; text-decoration: none; }
 a.hefo:active { color: #ECECEC; text-decoration: underline; }
 body { background-color: #FAFAFA; color: #323232; }
 h1 { color: #ECECEC; font-size: 18px; padding: 0px; margin: 0px; font-weight: bold; font-family: Verdana, Helvetica }
 .border-col { background-color: #DEDEDE; }
 .cella { background-color: #FAFAFA; }
 .cellb { background-color: #F5F5F5; }
 .color4 { background-color: #1B6ECC; }
 .tbbutton { font-family: Verdana; font-size: 8pt; }
 .tbinput { background-color: #EEEEEE; font-family: Verdana; font-size: 8pt; }
 .tbselect { background-color: #EEEEEE; font-family: Verdana; font-size: 8pt; }
 .tbtextarea { background-color: #EEEEEE; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; }
 .smallfont { font-family: Verdana, Helvetica; font-size:10px; }
 .stdfont { font-family: Verdana, Helvetica; font-size:12px; }
 ';
 
 $url = 'http://www.robotrontechnik.de/html/forum/thwb/rss.php';
 $xml = simplexml_load_string(file_get_contents($url));
 printf('<h4>%s</h4>', utf8_decode($xml->channel->description));
 
 foreach ($xml->channel->item as $nachricht) {
 $desc = utf8_decode($nachricht->description);
 # das ist der jämmerliche Versuch, wenigstens die Quellcode Anzeige
 # etwas aufzubohren
 $desc = str_replace('Quellcode:#CODE_BEGIN#', PB, $desc);
 $desc = str_replace('#CODE_END#', PE, $desc);
 $desc = str_replace(str_repeat(SP, 12),NL , $desc);
 $desc = str_replace(str_repeat(SP, 10),'' , $desc);
 #############
 printf('<h4><a href="%1$s">%2$s</a></h4><p>%3$s%4$s</p>',
 $nachricht->link,
 utf8_decode($nachricht->title),
 (!empty($desc))
 ? sprintf ('%s', $desc)
 : '',
 BR . BR . NL
 );
 }
 
 ?>
 
 
 | 
 Was da fehlt:
 auto_prepend_file - diverse Variable und Konstanten ob_start()
 im auto_append_file - Ausgabepuffer ins Template packen und das "angemalte Script" anzeigen
 
 http://mod.php.developer.vc/affenformular-2/
 
 Der rss reader is etwas bunter:
 http://feeds.meikel.net/Spiegel/
 |