From b7f4bda2987193da0399aed302df0c5624e0f9ce Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 26 Aug 2005 04:11:37 +0100 Subject: support for feed-specific images (channel->url) --- backend.php | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 6dd80a414..e34cde944 100644 --- a/backend.php +++ b/backend.php @@ -178,30 +178,36 @@ $result = pg_query("UPDATE ttrss_entries SET unread = false,last_read = NOW() WHERE id = '$id'"); - $result = pg_query("SELECT title,link,content FROM ttrss_entries + $result = pg_query("SELECT title,link,content,feed_id, + (SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url + FROM ttrss_entries WHERE id = '$id'"); if ($result) { $line = pg_fetch_assoc($result); -/* print ""; - print ""; - print ""; - print "
Title:".$line["title"]."
Link:".$line["link"]."
"; - - print $line["content"]; */ - + if ($line["icon_url"]) { + $feed_icon = ""; + } else { + $feed_icon = " "; + } - print ""; + print "
"; + print " - "; + + "; print " - "; - - print ""; - print "
Title:".$line["title"]."
".$line["title"]." 
Link:".$line["link"]."
" . $line["content"] . "
"; + ".$line["link"]." +   "; + print "" . $line["content"] . " + $feed_icon + "; + print ""; + } } -- cgit v1.2.3