]> git.wh0rd.org Git - tt-rss.git/commitdiff
cdm: display comments link
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 14 Nov 2011 07:51:12 +0000 (11:51 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 14 Nov 2011 07:51:12 +0000 (11:51 +0400)
functions.php

index 0fd2a802ffb0a369fdf55ff2e11e96f6cdfa0fa5..90f9e8a0906f5aeb32f7e6cf64f69dda0c0fe36c 100644 (file)
                                                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
                                                <a title=\"".__('Edit tags for this article')."\"
                                                href=\"#\" onclick=\"editArticleTags($id, $feed_id, true)\">(+)</a>";
 
+                                       $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 = "<a target='_blank' href=\"$comments_url\">$num_comments comments</a>";
+                                       } else {
+                                               if ($line["comments"] && $line["link"] != $line["comments"]) {
+                                                       $entry_comments = "<a target='_blank' href=\"".$line["comments"]."\">comments</a>";
+                                               }
+                                       }
+
+                                       if ($entry_comments) $reply['content'] .= "&nbsp;($entry_comments)";
+
                                        $reply['content'] .= "<div style=\"float : right\">";
 
                                        $reply['content'] .= "<img src=\"images/art-zoom.png\"