diff options
author | Andrew Dolgov <[email protected]> | 2009-12-29 22:57:52 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-12-29 22:57:52 +0300 |
commit | 326469fcb5adaee0c8c8d6b6176325980ba83e24 (patch) | |
tree | 4592d8df968bc5135a49c8c49f3b56aee74f8377 | |
parent | 87e3d2dd89cdb7ac47b284fa538a45edfa1669a4 (diff) |
getFeedArticles/getFeedUnread: add support for tag feeds
-rw-r--r-- | functions.php | 16 | ||||
-rw-r--r-- | modules/popup-dialog.php | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/functions.php b/functions.php index 5657e04c9..a0f41210b 100644 --- a/functions.php +++ b/functions.php @@ -2464,6 +2464,15 @@ if ($is_cat) { return getCategoryUnread($link, $n_feed, $owner_uid); + } if ($feed != "0" && $n_feed == 0) { + + $result = db_query($link, "SELECT SUM((SELECT COUNT(int_id) + FROM ttrss_user_entries,ttrss_entries WHERE int_id = post_int_id + AND ref_id = id AND $age_qpart + AND $unread_qpart)) AS count FROM ttrss_tags + WHERE owner_uid = $owner_uid AND tag_name = '$feed'"); + return db_fetch_result($result, 0, "count"); + } else if ($n_feed == -1) { $match_part = "marked = true"; } else if ($n_feed == -2) { @@ -4472,13 +4481,8 @@ foreach (array_keys($tags) as $tag) { $unread = $tags[$tag]; - $class = "tag"; - - if ($unread > 0) { - $class .= "Unread"; - } - + printFeedEntry($tag, $class, $tag, $unread, "images/tag.png", $link); } diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index 57237823e..bfc1f2483 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -442,7 +442,7 @@ print "<div class=\"infoBoxContents\">"; print __("Showing most popular tags ")." (<a - href='javascript:toggleTags(true)'>".__('browse more')."</a>):<br/>"; + href='javascript:toggleTags(true)'>".__('more tags')."</a>):<br/>"; print "<div class=\"tagCloudContainer\">"; |