From: Andrew Dolgov Date: Mon, 14 Nov 2011 07:51:12 +0000 (+0400) Subject: cdm: display comments link X-Git-Tag: 1.5.7~12 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=13992673e4c7f6706a720c11b239c60519a0fd62;p=tt-rss.git cdm: display comments link --- diff --git a/functions.php b/functions.php index 0fd2a802..90f9e8a0 100644 --- a/functions.php +++ b/functions.php @@ -3700,6 +3700,8 @@ tag_cache, always_display_enclosures, note, + num_comments, + comments, unread,feed_id,marked,published,link,last_read,orig_feed_id, ".SUBSTRING_FOR_DATE."(last_read,1,19) as last_read_noms, $vfeed_query_part @@ -5554,6 +5556,24 @@ (+)"; + $num_comments = $line["num_comments"]; + $entry_comments = ""; + + if ($num_comments > 0) { + if ($line["comments"]) { + $comments_url = $line["comments"]; + } else { + $comments_url = $line["link"]; + } + $entry_comments = "$num_comments comments"; + } else { + if ($line["comments"] && $line["link"] != $line["comments"]) { + $entry_comments = "comments"; + } + } + + if ($entry_comments) $reply['content'] .= " ($entry_comments)"; + $reply['content'] .= "
"; $reply['content'] .= "