Ok I found the issue. I think the module was thought to read Atom feeds, not RSS feeds, which don't have the same rules for the name of the tags.
Indeed, Atom feeds look like that :
Code: Select all
<feed>
<entry>
...
</entry>
</feed>
Even though RSS feeds look like :
Code: Select all
<rss>
<channel>
<item>
...
</item>
</channel>
</rss>
In my case, I wanted to read a RSS feed. If you are in the same case, edit the file : root_of_your_site/modules/XMLMadeSimple/action.default.php with a text editor then replace all the "$xml->entry" by "$xml->channel->item" (3 places).
So you should have :
Code: Select all
if (isset($xml->channel->item))
{
if (isset($params['max_items']))
{
$entries = array();
foreach ($xml->channel->item as $entry)
{
$entries[] = $entry;
}
$feeds = array_slice($entries, 0, $params['max_items']);
}
else
{
$feeds = $xml->channel->item;
}
$this->smarty->assign('feeds', $feeds);
}
Then, you have to use the $feeds array in your template, which takes the max_items limit into account.
Here is an exemple of what you can write in the 'default' template :
Code: Select all
{foreach from=$feeds item=actu}
<h3>{$actu->title}</h3>
{$actu->pubDate}<br/>
{$actu->description}<br/>
<a class="liresuite" href="{$actu->link}">read more</a>
{/foreach}
<p>These news come from <a href="{$xml->channel->link}">{$xml->channel->title}</a>.</p>
Hoping this message could help other CMSMS developers...
Bye !
Cécile