Plug In RSS_Load suggestion/question
| From: | Luc Saint-Elie | Date: | Wed, 02 Jul 2003 07:34:29 +0000 |
| Subject: | Plug In RSS_Load suggestion/question | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-9803@lists.php.net to get a copy of this message | ||
Hello,
With Smarty plug in rss_load ( http://smarty.incutio.com/?page=SmartyPlugins) the variables are :
Input: file = local file or URL of rss
assign = template var to assign parsed data
caching = true/false (opt, default true)
cache_dir = directory to store cache (opt,default=$smarty->cache_dir)
cache_lifetime = number of seconds cache file is valid (opt, default=3600)
debug_mode = sets onyx debug mode (opt)
Examples: {rss_load
file="http://www.php.net/news.rss" assign="phpnews"} {section name=rss loop=$phpnews.items} <a href="{$phpnews.items[rss].link}"> {$phpnews.items[rss].title}</a><br> {/section}How could I add an option for the case where the distant server is not available something like {rss_load
file="http://www.php.net/news.rss" assign="phpnews" alternate ="Sorry this feed is not available for instance"}BTW: this plug in works very well ! Luc