Sat, October 31, 2020, 07:03:34
 
Home · Latest · Trends  /  HTML, XML
1

Smarty XML / RSS example file

<?xml version="1.0" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Site Name</title>
<description>Site Description</description>
<link>http://www.example.com</link>
{section name=foo loop=$foo}
<item>
<title>{$foo[foo].progname|stripslashes|replace:"'":''|replace:'"':''|escape:'htmlall':'UTF-8'|replace:'&':' '}</title>
<description>{$foo[foo].longdesc|htmlspecialchars_decode|strip_tags|escape|truncate:200}</description>
<link>http://www.example.com/article.php?id={$foo[foo].articleid}</link>
<guid>http://www.example.com/article.php?id={$foo[foo].articleid}</guid>
<pubDate>{$foo[foo].date|date_format:"%a, %e %b %Y %H:%M:%S"} GMT</pubDate>
</item>
{/section}
</channel>
</rss>
rated 1 times [  1] [ 0]  / comments: 0 / hits: 1309  / 3 years ago, fri, feb 9, 2018, 06:41:38
More From » HTML, XML
 

Comments

There are no comments for this Snippet yet
Username
 
Your Comment
 
Share
Snippets
How to get clean file name / image name with extension from the URL with PHP?
3 years ago, mon, dec 4, 2017
CSS show image in a textarea with background tag
3 years ago, thu, dec 7, 2017
Redirect www to non-www URLs using htaccess
3 years ago, mon, feb 19, 2018
Posted
Nica Radi

Nica Radi

Member since Oct 29, 2017
Total Code Snippets: 4
Total Comments: 1
Location: n/a
Following
User not following anyone yet.