Keine Ahnung ob schon irgendwo so ein Modul existiert, auf jeden Fall hab' ich für mich kurz eines erstellt. Vielleicht kann es jemand gebrauchen...
Damit das Modul funktioniert, muss im php.ini der Pfad zu dem PEAR Verzeichnis von PHP konfiguriert und das Package XML_RSS installiert sein (für Windows: go-pear.bat im PHP Verzeichnis ausführen und das Package XML_RSS anschliessend installieren, siehe auch pear.php.net):
INPUT ---------------------------------------
Code: Alles auswählen
?>
<br>
Anzahl Feeds pro Channel:
<br>
<input type="text" name="CMS_VAR[0]" class="text_medium" value="<?= "CMS_VALUE[0]" ?>">
<br>
<br>
Maximale Textlänge:
<br>
<input type="text" name="CMS_VAR[1]" class="text_medium" value="<?= "CMS_VALUE[1]" ?>">
<br>
<br>
Newsfeeds (Kommata getrennt)
<br>
<textarea style="width:100%;height:80px" class="text_medium" name="CMS_VAR[2]"><?php echo "CMS_VALUE[2]"; echo "</text"."area>"; ?>
<?php
Code: Alles auswählen
<?php
require_once "XML/RSS.php";
$rss_feeds = split(",", "CMS_VALUE[2]");
$count = "CMS_VALUE[0]";
$maxLength = "CMS_VALUE[1]" == "" ? 0 : "CMS_VALUE[1]";
foreach ($rss_feeds as $rss_feed) {
$rss =& new XML_RSS($rss_feed);
$rss->parse();
$i = 0;
foreach ($rss->getItems() as $item) {
$i++;
echo "<a href=\"$item[link]\" target=\"_blank\">".utf8_decode($item[title])."</a><br>";
if ($item['description'] != "") {
$description = utf8_decode($item['description']);
if ($maxLength != 0 &&
strlen($description) < $maxLength) {
$description = substr($description, 0, $maxLength);
}
echo "$description</tr>";
}
echo "<hr>";
if ($i == $count) {
break;
}
}
}
?>