From 560394770f2a5338f34659ecede028f2ce902aae Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Sun, 2 Apr 2006 10:52:14 +0000 Subject: [PATCH] =?UTF-8?q?diverses=20am=C3=A9liorations=20des=20flux=20RS?= =?UTF-8?q?S=20(Nicolas=20Krebs,=20#193)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/backend-breves.html | 3 ++- dist/backend.html | 3 ++- ecrire/action/rss.php | 29 ++++++++++++++++++++--------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/dist/backend-breves.html b/dist/backend-breves.html index 7a926ef2e1..86634c94fc 100644 --- a/dist/backend-breves.html +++ b/dist/backend-breves.html @@ -27,9 +27,10 @@ <item> <title>[(#TITRE|supprimer_numero|texte_backend)]</title> <link>[(#URL_BREVE|url_absolue)]</link> + [<guid isPermaLink="true">(#URL_BREVE|url_absolue)</guid>] [<dc:date>(#DATE|date_iso)</dc:date>] <dc:format>text/html</dc:format> - <dc:language>#LANG</dc:language> + [<dc:language>(#LANG)</dc:language>] [(#REM) Le bloc qui suit diffuse diffuse la rubrique et les mots-cles a la mode RSS ]<BOUCLE_rubrique_rss(RUBRIQUES){id_rubrique}>[<category[ domain="(#URL_RUBRIQUE|url_absolue)"]>(#TITRE|supprimer_numero|texte_backend)</category>]</BOUCLE_rubrique_rss> diff --git a/dist/backend.html b/dist/backend.html index 94a7c98a03..090e261b3a 100644 --- a/dist/backend.html +++ b/dist/backend.html @@ -26,9 +26,10 @@ <item> <title>[(#TITRE|supprimer_numero|texte_backend)]</title> <link>[(#URL_ARTICLE|url_absolue)]</link> + [<guid isPermaLink="true">(#URL_ARTICLE|url_absolue)</guid>] [<dc:date>(#DATE|date_iso)</dc:date>] <dc:format>text/html</dc:format> - <dc:language>#LANG</dc:language> + [<dc:language>(#LANG)</dc:language>] [<dc:creator>(#LESAUTEURS|supprimer_tags|texte_backend)</dc:creator>] [(#REM) diff --git a/ecrire/action/rss.php b/ecrire/action/rss.php index b4c5d98407..1bbe61f45a 100644 --- a/ecrire/action/rss.php +++ b/ecrire/action/rss.php @@ -55,16 +55,23 @@ function affiche_rss_rss($rss, $intro = '') { if (is_array($rss)) { usort($rss, 'trier_par_date'); foreach ($rss as $article) { - if ($article['email']) - $article['author'].=' <'.$article['email'].'>'; $u .= ' <item> <title>'.texte_backend($article['title']).'</title> <link>'.texte_backend(url_absolue($article['url'])).'</link> + <guid isPermaLink="true">'.texte_backend(url_absolue($article['url'])).'</guid> <dc:date>'.date_iso($article['date']).'</dc:date> - <dc:format>text/html</dc:format> - <dc:language>'.texte_backend($article['lang']).'</dc:language> - <dc:creator>'.texte_backend($article['author']).'</dc:creator> + <dc:format>text/html</dc:format>'; + if ($article['lang']) $u .= ' + <dc:language>'.texte_backend($article['lang']).'</dc:language>'; + if ($article['author']) { + if ($article['email']) + $article['author'].=' <'.$article['email'].'>'; + + $u .= ' + <dc:creator>'.texte_backend($article['author']).'</dc:creator>'; + } + $u .= ' <description>'.texte_backend(liens_absolus($article['description'])).'</description> </item> '; @@ -107,11 +114,15 @@ function affiche_rss_atom($rss, $intro = '') { <id>'.texte_backend(url_absolue($article['url'])).'</id> <link rel="alternate" type="text/html" href="'.texte_backend(url_absolue($article['url'])).'"/> <published>'.date_iso($article['date']).'</published> - <updated>'.date_iso($article['date']).'</updated> + <updated>'.date_iso($article['date']).'</updated>'; + if ($article['author']) { + $u .= ' <author><name>'.texte_backend($article['author']).'</name>'; - if ($article['email']) - $u .= '<email>'.texte_backend($article['email']).'</email>'; - $u .= '</author> + if ($article['email']) + $u .= '<email>'.texte_backend($article['email']).'</email>'; + $u .= '</author>'; + } + $u .=' <summary type="html">'.texte_backend(liens_absolus($article['description'])).'</summary> </entry> '; -- GitLab