Fix blog RSS list page

This commit is contained in:
leosw 2019-01-23 13:42:34 +01:00
parent f215a6cf08
commit 2aa41e692d
2 changed files with 10 additions and 9 deletions

View File

@ -15,6 +15,7 @@ $config['include_folder']=basename(__DIR__);
$config['abs_root_folder']=str_replace($config['include_folder'],"",__DIR__); $config['abs_root_folder']=str_replace($config['include_folder'],"",__DIR__);
// This is the relative folder to the root of the website from the DocumentRoot (can also be called subfolder) // This is the relative folder to the root of the website from the DocumentRoot (can also be called subfolder)
$config['rel_root_folder']=str_replace($_SERVER['DOCUMENT_ROOT'],"",$config['abs_root_folder']); $config['rel_root_folder']=str_replace($_SERVER['DOCUMENT_ROOT'],"",$config['abs_root_folder']);
$config['web_root_folder']="kabano.test";
if($config['rel_root_folder']=="") $config['rel_root_folder']="/"; if($config['rel_root_folder']=="") $config['rel_root_folder']="/";
// Here all the absolute paths to specific folders // Here all the absolute paths to specific folders

View File

@ -14,25 +14,25 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>Kabano</title> <title>Kabano</title>
<link><?=$config['rel_root_folder']?></link> <link><?=$config['web_root_folder']?></link>
<atom:link href="<?=$config['rel_root_folder']?>blog/rss" rel="self" type="application/rss+xml" /> <atom:link href="<?=$config['web_root_folder']?>blog/rss" rel="self" type="application/rss+xml" />
<description>L'actualité du blog officiel de Kabano : Plateforme collaborative de recensement de cabanes et refuges.</description> <description>L'actualité du blog officiel de Kabano : Plateforme collaborative de recensement de cabanes et refuges.</description>
<language>fr</language> <language>fr</language>
<image> <image>
<url><?=$config['views_url']?>img/header_rss.svg</url> <url><?=$config['web_root_folder']?>views/img/header_rss.svg</url>
<title>Kabano</title> <title>Kabano</title>
<link><?=$config['rel_root_folder']?></link> <link><?=$config['web_root_folder']?></link>
<height>44</height> <height>44</height>
<width>154</width> <width>154</width>
</image> </image>
<? foreach ($blogArticles_list as $row) { ?> <? foreach ($blogArticles->objs as $row) { ?>
<item> <item>
<title><?=$row->title?></title> <title><?=$row->name?></title>
<link><?=$config['rel_root_folder']?>blog/<?=$row->url?></link> <link><?=$config['web_root_folder']?>blog/<?=$row->permalink?></link>
<guid><?=$config['rel_root_folder']?>blog/<?=$row->url?></guid> <guid><?=$config['web_root_folder']?>blog/<?=$row->permalink?></guid>
<pubDate><?=$row->lastedit?></pubDate> <pubDate><?=gmdate(DATE_RFC822, strtotime($row->update_date))?></pubDate>
<description><![CDATA[ <description><![CDATA[
<?=$row->content_html?> <?=$row->content_html?>
]]></description> ]]></description>