Skip to content

Instantly share code, notes, and snippets.

@sashabeep
Last active June 16, 2023 12:56
Show Gist options
  • Save sashabeep/06f34e494ff276c676a04e9de2606a14 to your computer and use it in GitHub Desktop.
Save sashabeep/06f34e494ff276c676a04e9de2606a14 to your computer and use it in GitHub Desktop.
Turbo RSS doclister Evolution CMS
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:yandex="http://news.yandex.ru"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:turbo="http://turbo.yandex.ru"
version="2.0">
<channel>
<title>[(site_name)]</title>
<link>[(site_url)]</link>
<description>[*description*]</description>
[[DocLister? &parents=`10` &format=`rss` &tpl=`rss_tpl` &depth=`3` &prepare=`rss_prepare` &display=`50` &dateFormat='%s' ]]
</channel>
</rss>
<?php
$data['content'] = str_replace("assets/", "https://my-web-site.ru/assets/", $data['content']); //full links
$data['content'] = preg_replace('/(<[^>]+) style=".*?"/i', '$1', $data['content']);
$data['rss_time'] = date(DATE_RFC822, $data['date']);
return($data);
<item turbo="true">
<link>[(site_url)][~[+id+]~]</link>
<turbo:source>[(site_url)][~[+id+]~]</turbo:source>
<turbo:topic>[+pagetitle+]</turbo:topic>
<pubDate>[+rss_time+]</pubDate>
<turbo:content>
<![CDATA[ [+content+] ]]>
</turbo:content>
</item>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment