From 22d1f3db53d40b5c05e74f46c03828b143bfb2c1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 9 Aug 2007 16:48:23 +0100 Subject: limit the amount of tags shown in CDM --- functions.php | 14 +++++++++++++- tt-rss.css | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index ff64a0a70..11d1d8c04 100644 --- a/functions.php +++ b/functions.php @@ -4044,13 +4044,25 @@ $tags = get_article_tags($link, $id); $tags_str = ""; + $full_tags_str = ""; foreach ($tags as $tag) { $num_tags++; - $tags_str .= "$tag, "; + $full_tags_str .= "$tag, "; + if ($num_tags < 5) { + $tags_str .= "$tag, "; + } else if ($num_tags == 5) { + $tags_str .= "..."; + } } $tags_str = preg_replace("/, $/", "", $tags_str); + $full_tags_str = preg_replace("/, $/", "", $full_tags_str); + + $all_tags_div = "...
All Tags: $full_tags_str
"; + + $tags_str = preg_replace("/\.\.\.$/", "$all_tags_div", $tags_str); + if ($tags_str == "") $tags_str = "no tags"; diff --git a/tt-rss.css b/tt-rss.css index 39ae0bdc8..7cdbaf0b3 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -849,6 +849,22 @@ td.hlFeed { background-color : white; } */ +div.cdmAllTags { + width : 75%; + float : left; + background-color : white; + border : 1px solid #c0c0c0; + display : none; + z-index : 3; + top : auto; + left : auto; + position : absolute; +} + +span.cdmAllTagsCtr:hover div { + display : block; +} + div.cdmArticle { border-color : #a0a0a0; border-width : 0px 0px 1px 0px; -- cgit v1.2.3