From b19dda6112aff4ed870c242a2f6c3511797ce1c0 Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Tue, 30 Apr 2013 15:30:28 +0200 Subject: [PATCH] [add] snippet and via input in RSS and ATOM --- index.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 6931edd..3dede55 100644 --- a/index.php +++ b/index.php @@ -943,7 +943,9 @@ function showRSS() // If user wants permalinks first, put the final link in description if ($usepermalinks===true) $descriptionlink = '(Link)'; if (strlen($link['description'])>0) $descriptionlink = '
'.$descriptionlink; - echo ''."\n\n"; + $via = '
via '.text2clickable(htmlspecialchars($link['via'])); + $snippet = '
'.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['snippet'])))).''; + echo ''."\n\n"; $i++; } echo ''; @@ -1003,8 +1005,9 @@ function showATOM() // If user wants permalinks first, put the final link in description if ($usepermalinks===true) $descriptionlink = htmlspecialchars('(Link)'); if (strlen($link['description'])>0) $descriptionlink = '<br>'.$descriptionlink; - - $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$descriptionlink."\n"; + $via = htmlspecialchars('
via '.(text2clickable(htmlspecialchars($link['via'])))); + $snippet = htmlspecialchars('
'.nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['snippet'])))).''); + $entries.=''.htmlspecialchars(nl2br(keepMultipleSpaces(text2clickable(htmlspecialchars($link['description']))))).$snippet.$via.$descriptionlink."\n"; if ($link['tags']!='') // Adding tags to each ATOM entry (as mentioned in ATOM specification) { foreach(explode(' ',$link['tags']) as $tag)