Hi,
falls noch wer sucht. auf Joomla Version 1.0.15 war das eine erfolgreiche Lösung:
fatchrss 1.2
Paste den code in die mod_fatchrss.php im modules Verzeichniss
PHP-Code:
<?php
/**
* @version $Id$
* @copyright (C) 2005 - Benoît Chesneau <benoit@bchesneau.info>
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $mosConfig_live_site, $mosConfig_absolute_path, $cur_template;
$cacheDir = $mosConfig_absolute_path .'/cache/';
$LitePath = $mosConfig_absolute_path .'/includes/Cache/Lite.php';
require_once( $mosConfig_absolute_path .'/includes/domit/xml_domit_rss_lite.php' );
$url = $params->get( 'url' );
$cache = $params->get( 'cache' );
$rss_title = $params->get( 'rss_title' );
$rss_descr = $params->get( 'rss_descr' );
$item_descr = $params->get( 'item_descr' );
$nbitems = $params->get( 'nbitems' );
$target = $params->get( 'target' );
$utf8 = $params->get( 'utf8' );
$moduleclass_sfx = $params->get( 'moduleclass_sfx', '' );
?>
<div id="rsscontent<?php echo $moduleclass_sfx; ?>">
<?php
if ( $url ) {
$rssDoc =& new xml_domit_rss_document_lite();
$rssDoc->useCacheLite(true, $LitePath, $cacheDir, 3600);
if ( empty($cache) ) {
$rssDoc->disableCache();
}
$rssDoc->loadRSS( $url );
$totalChannels = $rssDoc->getChannelCount();
for ( $i = 0; $i < $totalChannels; $i++ ) {
$currChannel =& $rssDoc->getChannel($i);
if ( $rss_title || $rss_descr ) {
?>
<div id="rss_channel<?php echo $moduleclass_sfx; ?>">
<?php
if ($rss_title != 0) {
?>
<h2><a href="<?php echo $currChannel->getLink(); ?>" target="_new"><?php echo htmlentities($currChannel->getTitle(),ENT_QUOTES,'UTF-8'); ?></a></h2>
<?php
}
if ( $rss_descr ) {
?>
<span><font face="Arial, Helvetica, sans-serif" size="2"><strong><?php echo htmlentities($currChannel->getDescription(),ENT_QUOTES,'UTF-8'); ?></strong></font></span><br><br>
<?php
}
?>
</div>
<?php
}
$actualItems = $currChannel->getItemCount();
if ($actualItems < $nbitems) {
$totalItems = $actualItems;
} else {
$totalItems = $nbitems;
}
?>
<div id="items<?php echo $moduleclass_sfx; ?>">
<table border="0" cellpadding="0" cellspacing="0">
<?php
for ($j = 0; $j < $totalItems; $j++) {
$currItem =& $currChannel->getItem($j);
?>
<tr><td height="5" valign="top"> <font face="Arial, Helvetica, sans-serif" size="2"><a href="<?php echo $currItem->getLink(); ?>" target="<?php echo $target; ?>">
<?php
if($utf8)
{
echo htmlentities($currItem->getTitle(),ENT_QUOTES,'UTF-8');
}
else
{
echo htmlentities($currItem->getTitle(),ENT_QUOTES,'UTF-8');
}
?>
</a></font>
<?php
if ( $item_descr ) {
?>
<span><?php echo htmlentities($currItem->getDescription(),ENT_QUOTES,'UTF-8'); ?></span>
<?php
}
?>
</td></tr><tr><td height="5"></td></tr>
<?php
}
?>
</table>
</div>
<?php
}
}
?>
</div>
Lesezeichen