1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-19 15:51:28 +00:00

display slash:comments in view mode

This commit is contained in:
Andrew Dolgov
2005-12-10 08:28:55 +01:00
parent eb40e11b14
commit 11b0dce2a7
2 changed files with 77 additions and 47 deletions

View File

@@ -631,7 +631,8 @@
$result = db_query($link, "SELECT title,link,content,feed_id,comments,int_id,
SUBSTRING(updated,1,16) as updated,
(SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url
(SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url,
num_comments
FROM ttrss_entries,ttrss_user_entries
WHERE id = '$id' AND ref_id = id");
@@ -669,10 +670,26 @@
$feed_icon = " ";
}
if ($line["comments"] && $line["link"] != $line["comments"]) {
/* if ($line["comments"] && $line["link"] != $line["comments"]) {
$entry_comments = "(<a href=\"".$line["comments"]."\">Comments</a>)";
} else {
$entry_comments = "";
} */
$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 href=\"$comments_url\">$num_comments comments</a>)";
} else {
if ($line["comments"] && $line["link"] != $line["comments"]) {
$entry_comments = "(<a href=\"".$line["comments"]."\">Comments</a>)";
}
}
print "<div class=\"postReply\">";