Create your own XML or RSS-feed reader with plain Smarty, there are no external modules or plug-ins needed!
Create a new content page and set WYSIWYG off.
Copy the following code in the content of the page. Note, this template is just an example: with the parameters below you can change it to your liking.
In the first line you can add the URL of the feed you want to display at your website.
The number "2" in the $cnt line above, is the number of feed items that will be shown at your page.
In the latest Smarty releases due to security settings PHP functions aren't available by default... If you do want to use PHP functions, you have to enable them by adding this line to your CMSMS config.php file:
This config variable loosens some of the security configuration for Smarty templates. Particularly enabling this option allows the use of any PHP function as a Smarty plugin. You better not use this option if you are allowing content to be submitted for display on your website from untrusted sources!
If the feed reader works without this line, you better not add it!
The next example is the output of the template described above and displays the official CMS Made Simple™ RSS News feed:
No feed found...
The photo's in that feed are included in the description/content field and not seperately attached. Your options are more limited by this.
Change the feed or contact the owner of that website and let him change it...
Hello thank's for this but i can't import the image how i can proceed if you have an idea ?
I want to import rss flux from this wordpress blog : http://blog.colvert.com
Any idea to help me please ?
I i'm using this methode, but i have a problem with caching.
I can use your Cache remote file plugin for this but i don't seem to get it working.
Thank you, Joni!!
I updated the post with a check if the feed is present and added the enclosure tag to retrieve the item image URL from the news feed.
Bravo, Rolf. This is exactly what I am looking for on a page for a client!!!