[MrssFormat] Add icon to feed
This commit is contained in:
parent
5d0ee926a5
commit
e46a480c5d
1 changed files with 2 additions and 0 deletions
|
@ -15,6 +15,7 @@ class MrssFormat extends FormatAbstract{
|
||||||
$extraInfos = $this->getExtraInfos();
|
$extraInfos = $this->getExtraInfos();
|
||||||
$title = $this->xml_encode($extraInfos['name']);
|
$title = $this->xml_encode($extraInfos['name']);
|
||||||
$uri = $this->xml_encode(!empty($extraInfos['uri']) ? $extraInfos['uri'] : 'https://github.com/sebsauvage/rss-bridge');
|
$uri = $this->xml_encode(!empty($extraInfos['uri']) ? $extraInfos['uri'] : 'https://github.com/sebsauvage/rss-bridge');
|
||||||
|
$icon = $this->xml_encode('http://icons.better-idea.org/icon?url='. $uri .'&size=64');
|
||||||
|
|
||||||
$items = '';
|
$items = '';
|
||||||
foreach($this->getItems() as $item){
|
foreach($this->getItems() as $item){
|
||||||
|
@ -45,6 +46,7 @@ EOD;
|
||||||
<title>{$title}</title>
|
<title>{$title}</title>
|
||||||
<link>http{$https}://{$httpHost}{$httpInfo}/</link>
|
<link>http{$https}://{$httpHost}{$httpInfo}/</link>
|
||||||
<description>{$title}</description>
|
<description>{$title}</description>
|
||||||
|
<image url="{$icon}" title="{$title}" link="{$uri}"/>
|
||||||
<atom:link rel="alternate" type="text/html" href="{$uri}" />
|
<atom:link rel="alternate" type="text/html" href="{$uri}" />
|
||||||
<atom:link rel="self" href="http{$https}://{$httpHost}{$serverRequestUri}" />
|
<atom:link rel="self" href="http{$https}://{$httpHost}{$serverRequestUri}" />
|
||||||
{$items}
|
{$items}
|
||||||
|
|
Loading…
Reference in a new issue