From 21703604b2754f19c17fb9a0229c03de5b6649ad Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 25 Nov 2005 09:20:32 +0100 Subject: show tags in article view mode --- backend.php | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 1ff981ace..01ea67eed 100644 --- a/backend.php +++ b/backend.php @@ -525,8 +525,8 @@ $addheader = $_GET["addheader"]; - $result = db_query($link, "SELECT title,link,content,feed_id,comments, - (SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url + $result = db_query($link, "SELECT title,link,content,feed_id,comments,int_id, + (SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url FROM ttrss_entries,ttrss_user_entries WHERE id = '$id' AND ref_id = id"); @@ -557,16 +557,35 @@ print "
"; - print "
"; + print "
"; + + print " + "; + + $tmp_result = db_query($link, "SELECT DISTINCT tag_name FROM + ttrss_tags WHERE post_int_id = " . $line["int_id"] . " + ORDER BY tag_name"); + + $tags_str = ""; + + while ($tmp_line = db_fetch_assoc($tmp_result)) { + $tag = $tmp_line["tag_name"]; + $tags_str .= "$tag / "; + } + + $tags_str = preg_replace("/ \/ $/", "", $tags_str); - print " - "; - print " - "; - + $entry_comments + "; + +/* if ($tags_str) { + print " + "; + } */ + print "
Title:" . $line["title"] . "
Title:" . $line["title"] . "
Link: + ".$line["link"]." - $entry_comments
$tags_str
Tags:$tags_str
"; print "
" . $feed_icon . "
"; @@ -800,6 +819,12 @@ if (sprintf("%d", $feed) != 0) { + if ($feed > 0) { + $feed_kind = "Feeds"; + } else { + $feed_kind = "Labels"; + } + $result = db_query($link, "SELECT id,title,updated,unread,feed_id,marked,link,last_read, SUBSTRING(last_read,1,19) as last_read_noms, @@ -818,6 +843,8 @@ } else { // browsing by tag + $feed_kind = "Tags"; + $result = db_query($link, "SELECT ttrss_entries.id as id,title,updated,unread,feed_id, marked,link,last_read, -- cgit v1.2.3