core/api/modules/rss/index.html

43 lines
1.6 KiB
HTML
Raw Normal View History

2023-01-02 21:33:36 +05:00
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:yandex="http://news.yandex.ru"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:turbo="http://turbo.yandex.ru"
version="2.0">
<channel>
<atom:link href="https://{$smarty.server.HTTP_HOST}/rss/{$smarty.get.id}" rel="self" type="application/rss+xml" />
<title>{$global_settings.site_name}</title>
<link>https://{$smarty.server.HTTP_HOST}</link>
<description>{$description}</description>
<image>
<url>https://{$smarty.server.HTTP_HOST}/img/{$smarty.server.HTTP_HOST}/rsslogo.png</url>
<link>https://{$smarty.server.HTTP_HOST}</link>
<title>{$global_settings.site_name}</title>
</image>
<lastBuildDate>{$smarty.now|date_format:"%d %b %Y %H:%M:%S"} +0500</lastBuildDate>
{section name=go loop=$rss}
{if $rss[go].id}
<item turbo="true">
<title>{$rss[go].title}</title>
<link>https://{$smarty.server.HTTP_HOST}{if $rss[go].alias}/{$rss[go].alias}.html{else}/page/{$rss[go].id}{/if}</link>
<turbo:content>
<![CDATA[
{$rss[go].txt}
]]>
</turbo:content>
<description>{$rss[go].txt|substr:200}</description>
{if ($rss[go].t)}
<pubDate>{$rss[go].t|date_format:"%d %b %Y %H:%M:%S"} +0500</pubDate>
<guid>https://{$smarty.server.HTTP_HOST}{if $rss[go].alias}/{$rss[go].alias}.html{else}/page/{$rss[go].id}{/if}</guid>
{else}
<pubDate>{$ntime|date_format:"%d %b %Y %H:%M:%S"} +0500</pubDate>
<guid>https://{$smarty.server.HTTP_HOST}{if $rss[go].alias}/{$rss[go].alias}.html{else}/page/{$rss[go].id}{/if}</guid>
{/if}
</item>
{/if}
{/section}
</channel>
</rss>