diff options
Diffstat (limited to 'classes/feeds.php')
-rw-r--r-- | classes/feeds.php | 49 |
1 files changed, 18 insertions, 31 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index f21bb3ce5..5ca607c58 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -288,8 +288,6 @@ class Feeds extends Handler_Protected { $expand_cdm = get_pref('CDM_EXPANDED'); while ($line = $this->dbh->fetch_assoc($result)) { - $class = ($lnum % 2) ? "even" : "odd"; - $id = $line["id"]; $feed_id = $line["feed_id"]; $label_cache = $line["label_cache"]; @@ -316,6 +314,8 @@ class Feeds extends Handler_Protected { array_push($topmost_article_ids, $id); } + $class = ""; + if (sql_bool_to_bool($line["unread"])) { $class .= " Unread"; ++$num_unread; @@ -409,23 +409,6 @@ class Feeds extends Handler_Protected { if (!isset($rgba_cache[$feed_id])) { $rgba_cache[$feed_id] = join(",", _color_unpack($fav_color)); } - - $rgba = $rgba_cache[$feed_id]; - - if (sql_bool_to_bool($line["unread"])) - $endalpha = '0.3'; - else - $endalpha = '0.1'; - - // W3C definition seems to work in FF and Chrome - $row_background = "background-image : linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba($rgba, $endalpha) 100%);"; - - /* $row_background = "background-image : -moz-linear-gradient(left, rgba(255, 255, 255, 0) 50%, rgba($rgba, 0.2) 100%);". - "background-image : linear-gradient(to right, rgba(255, 255, 255, 0) 50%, rgba($rgba, 0.2) 100%);"; - "background-image : -webkit-gradient(linear, left top, right top, color-stop(50%, rgba(255,255,255,0)), - color-stop(100%, rgba($rgba, 0.2)));"; */ - } else { - $row_background = ""; } if (!get_pref('COMBINED_DISPLAY_MODE')) { @@ -451,7 +434,7 @@ class Feeds extends Handler_Protected { $mouseover_attrs = "onmouseover='postMouseIn(event, $id)' onmouseout='postMouseOut($id)'"; - $reply['content'] .= "<div class='hl $class' id='RROW-$id' $mouseover_attrs style='$row_background'>"; + $reply['content'] .= "<div class='hl $class' id='RROW-$id' $mouseover_attrs>"; $reply['content'] .= "<div class='hlLeft'>"; @@ -487,14 +470,14 @@ class Feeds extends Handler_Protected { if (!get_pref('VFEED_GROUP_BY_FEED')) { if (@$line["feed_title"]) { - $reply['content'] .= "<div class=\"hlFeed\"> - <a href=\"#\" onclick=\"viewfeed($feed_id)\">". - truncate_string($line["feed_title"],30)."</a> - </div>"; + $rgba = @$rgba_cache[$feed_id]; + + $reply['content'] .= "<a class=\"hlFeed\" style=\"background : rgba($rgba, 0.3)\" href=\"#\" onclick=\"viewfeed($feed_id)\">". + truncate_string($line["feed_title"],30)."</a>"; } } - $reply['content'] .= "<span title='$date_entered_fmt'>$updated_fmt</span> + $reply['content'] .= "<div title='$date_entered_fmt'>$updated_fmt</div> </span>"; $reply['content'] .= "<div class=\"hlRight\">"; @@ -514,8 +497,10 @@ class Feeds extends Handler_Protected { } else { - $line["tags"] = get_article_tags($id, $_SESSION["uid"], $line["tag_cache"]); - unset($line["tag_cache"]); + if ($line["tag_cache"]) + $tags = explode(",", $line["tag_cache"]); + else + $tags = false; $line["content"] = sanitize($line["content_preview"], sql_bool_to_bool($line['hide_images']), false, $entry_site_url); @@ -595,8 +580,11 @@ class Feeds extends Handler_Protected { if (!get_pref('VFEED_GROUP_BY_FEED')) { if (@$line["feed_title"]) { + $rgba = @$rgba_cache[$feed_id]; + $reply['content'] .= "<div class=\"hlFeed\"> - <a href=\"#\" onclick=\"viewfeed($feed_id)\">". + <a href=\"#\" style=\"background-color: rgba($rgba,0.3)\" + onclick=\"viewfeed($feed_id)\">". truncate_string($line["feed_title"],30)."</a> </div>"; } @@ -627,7 +615,6 @@ class Feeds extends Handler_Protected { } $reply['content'] .= "</div>"; - $reply['content'] .= "<div class=\"cdmContentInner\">"; if ($line["orig_feed_id"]) { @@ -682,7 +669,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= $p->hook_article_left_button($line); } - $tags_str = format_tags_string($line["tags"], $id); + $tags_str = format_tags_string($tags, $id); $reply['content'] .= "<img src='images/tag.png' alt='Tags' title='Tags'> <span id=\"ATSTR-$id\">$tags_str</span> @@ -719,7 +706,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= "</div>"; $reply['content'] .= "</div>"; - $reply['content'] .= "</div>"; + $reply['content'] .= "</div><hr/>"; $reply['content'] .= "</div>"; |